mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests 131: kill locktest process in cleanup & better error msgs
I occasionally get failures in 131 like: gethostbyname: Success 1) perror is the wrong thing for gethostbyname errors, so this is confusing 2) the locktest thread doesn't get killed, so the fs is busy and the next test fails when it can't unmount Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -34,6 +34,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
kill $locktest_pid2
|
||||
kill $locktest_pid1
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
@@ -60,11 +62,13 @@ fi
|
||||
|
||||
# Start the server
|
||||
src/locktest -p $PORT $TESTFILE > $testdir/server.out 2>&1 &
|
||||
locktest_pid1=$!
|
||||
|
||||
sleep 1
|
||||
|
||||
# Start the client
|
||||
src/locktest -p $PORT -h localhost $TESTFILE > $testdir/client.out 2>&1
|
||||
locktest_pid2=$!
|
||||
result=$?
|
||||
if [ $result -eq 0 ]; then
|
||||
echo success!
|
||||
|
||||
Reference in New Issue
Block a user