Results for builtin-kill.test.sh

statusoshosh-cpp
pass 1717
ok 11
FAIL 22
total2020
caseoshosh-cppdescription
0pass pass kill -15 kills the process with SIGTERM
1pass pass kill -KILL kills the process with SIGKILL
2pass pass kill -n 9 specifies the signal number
3pass pass kill -s TERM specifies the signal name
4pass pass kill -terM -SigterM isn't case sensitive
5ok ok kill HUP pid gives the correct error
detailsdetails
6pass pass kill -l shows signals
7pass pass kill -L also shows signals
8pass pass kill -l 10 TERM translates between names and numbers
9FAIL FAIL kill -L checks for invalid input
detailsdetails
10pass pass kill -l with exit code
11pass pass kill -l with 128 is invalid
12pass pass kill -l 0 returns EXIT
13pass pass kill -l 0 INT lists both signals
14pass pass kill -9999 is an invalid signal
15FAIL FAIL kill -15 %% kills current job
detailsdetails
16pass pass kill -15 %- kills previous job
17pass pass kill multiple pids at once
18pass pass kill pid and job at once
19pass pass Numeric signal out of range - OSH may send it anyway
34 passed, 2 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh5 kill HUP pid gives the correct error

stdout:
2
stderr:
  builtin kill HUP $pid
               ^~~
[ stdin ]:3: 'kill' got invalid process ID 'HUP'
osh-cpp5 kill HUP pid gives the correct error

stdout:
2
stderr:
  builtin kill HUP $pid
               ^~~
[ stdin ]:3: 'kill' got invalid process ID 'HUP'
osh9 kill -L checks for invalid input

[osh stdout] Expected 'USR1\nUSR2\nstatus=1\n\n10\n12\nstatus=1\n\n' Got 'USR1\nstatus=2\n\n10\nstatus=2\n\n'

stdout:
USR1
status=2

10
status=2

stderr:
  builtin kill -L 10 BAD 12
                     ^~~
[ stdin ]:3: 'kill' can't translate name 'BAD' to a number
  builtin kill -L USR1 9999 USR2
                       ^~~~
[ stdin ]:7: 'kill' can't translate number '9999' to a name
osh-cpp9 kill -L checks for invalid input

[osh-cpp stdout] Expected 'USR1\nUSR2\nstatus=1\n\n10\n12\nstatus=1\n\n' Got 'USR1\nstatus=2\n\n10\nstatus=2\n\n'

stdout:
USR1
status=2

10
status=2

stderr:
  builtin kill -L 10 BAD 12
                     ^~~
[ stdin ]:3: 'kill' can't translate name 'BAD' to a number
  builtin kill -L USR1 9999 USR2
                       ^~~~
[ stdin ]:7: 'kill' can't translate number '9999' to a name
osh15 kill -15 %% kills current job

[osh stdout] Expected 'kill=0\nwait=143\nwait=127\n' Got 'kill=0\nwait=143\nwait=2\n'

stdout:
kill=0
wait=143
wait=2
stderr:
  wait %%
       ^
[ stdin ]:9: 'wait' expected PID or jobspec, got '%%'
osh-cpp15 kill -15 %% kills current job

[osh-cpp stdout] Expected 'kill=0\nwait=143\nwait=127\n' Got 'kill=0\nwait=143\nwait=2\n'

stdout:
kill=0
wait=143
wait=2
stderr:
  wait %%
       ^
[ stdin ]:9: 'wait' expected PID or jobspec, got '%%'