Script started on Thu Jun 28 09:16:36 2018
bash-4.2$ make test
gcc -o g310a g310a.c -Wall -g
sh ./C731.sh
Error: Failed to open /dev/mcos0.
ERROR: opening /dev/mcos0
fork(): error with child process after fork
fork: Permission denied
waitpid: No child processes
*** C731T001: g310a OK
fork01      1  TPASS  :  fork() returned 14513
fork01      2  TPASS  :  child pid and fork() return agree: 14513
*** C731T002: fork01 OK (2)
fork02      0  TINFO  :  Inside parent
fork02      0  TINFO  :  Inside child
fork02      0  TINFO  :  exit status of wait 0
fork02      1  TPASS  :  test 1 PASSED
*** C731T003: fork02 OK (1)
fork03      0  TINFO  :  process id in parent of child from fork : 14669
fork03      1  TPASS  :  test 1 PASSED
*** C731T004: fork03 OK (1)
fork04      1  TPASS  :  Env var TERM unchanged after fork(): xterm
fork04      2  TPASS  :  Env var NoTSetzWq unchanged after fork(): getenv() does not find variable set
fork04      3  TPASS  :  Env var TESTPROG unchanged after fork(): FRKTCS04
*** C731T005: fork04 OK (3)
fork07      0  TINFO  :  Forking 100 children
fork07      0  TINFO  :  Forked all 100 children, now collecting
fork07      0  TINFO  :  Collected all 100 children
fork07      1  TPASS  :  100/100 children read correctly from an inheritted fd
*** C731T006: fork07 OK (1)
fork08      0  TINFO  :  parent forksval: 1
fork08      0  TINFO  :  parent forksval: 2
fork08      0  TINFO  :  second child got char: b
fork08      1  TPASS  :  Test passed in childnumber 2
fork08      0  TINFO  :  exit status of wait  expected 0 got 0
fork08      1  TPASS  :  parent test PASSED
fork08      0  TINFO  :  exit status of wait  expected 0 got 0
fork08      2  TPASS  :  parent test PASSED
fork08      0  TINFO  :  exit status of wait  expected 0 got 0
fork08      3  TPASS  :  parent test PASSED
fork08      0  TINFO  :  Number of processes forked is 2
*** C731T007: fork08 OK (4)
bash-4.2$ exit
exit

Script done on Thu Jun 28 09:17:21 2018
