-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
The way I see it this code does not do what it is supposed to.
assignment-autotest/test/shared/script-helpers
Lines 519 to 532 in 4d05932
| echo "Waiting for aesdsocket application with pid $PID to terminate" | |
| wait_exit=1 | |
| while [ $wait_exit -ne 0 ]; do | |
| kill -0 ${PID} | |
| wait_exit=$? | |
| if [ $wait_exit -ne 0 ]; then | |
| ps -q $PID | grep "defunct" | |
| wait_exit=$? | |
| if [ $wait_exit -ne 0 ]; then | |
| echo "aesdsocket still running" | |
| sleep 1 | |
| fi | |
| fi | |
| done |
Expected Behaviour:
The test should wait until the demonized server with pid ${PID} has finished.
Actual Behaviour:
In case the process is still running, the first kill -0 ${PID} in Line 522 succeeds and the loop stops.
The test continues with the demon still running...
Why is this a problem:
This causes an issue if the server takes longer to shutdown.
The demonized server is still running and might not yet have deleted the temp file /tmp/aesdsocketdata.
This may cause the following valgrind tests to fail.
Metadata
Metadata
Assignees
Labels
No labels