aboutsummaryrefslogtreecommitdiff
path: root/tests/killall.test
AgeCommit message (Collapse)Author
2019-09-22Avoid spurious test failures when fork() coincides with signal being sent,Rob Landley
then pgrep finds child that hasn't exec("sleep") yet. So add 1/10 sec sleep to let exec() happen before pgrep. While we're there fix spurious "terminated" messages and reorder test file creation so it fits in 80 columns.
2019-07-25killall: implement -w.Elliott Hughes
This isn't currently used in AOSP, but it is used in some of the other codebases I can easily search, and it's a better fix for test flakiness than inserting a sleep.
2019-07-25killall.test: fix flakiness.Elliott Hughes
And when I say "fix", I mean "hack around in the worst possible way". Android+mksh is often slow enough that we can do the pgrep before the killed process has actually exited. (I'm seeing roughly 100% failure rate on cloud x86 emulators, and about 75% on a real Pixel 2.)
2019-07-06killall: better handling of long names.Elliott Hughes
Change names_to_pid() so that we can actually match shell scripts with long names (the code to get the shell script's name was correct, but there was an extra test preventing us from actually comparing it to the sought name). In kill.c itself, remove a dead test for -l and switch to the FLAG() macro. Also extend the tests to explicitly cover long and short names.
2019-06-25killall.test: don't assume the shell is /bin/sh.Elliott Hughes
The killall test still fails with toybox. Seems like right now killall and pidof share name to pid logic, but playing about with the desktop killall (which does pass this test), it seems like killall actually behaves more like pgrep than pidof (which does seem to be this limited on the desktop too)...
2017-12-19killall should kill scripts too.Elliott Hughes
Found running LTP file system tests on Android. Bug: http://b/70627145