summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/format/format.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/format/format.sh')
-rwxr-xr-xsrc/third_party/wiredtiger/test/format/format.sh41
1 files changed, 4 insertions, 37 deletions
diff --git a/src/third_party/wiredtiger/test/format/format.sh b/src/third_party/wiredtiger/test/format/format.sh
index dd9e10ab89d..861ded0890a 100755
--- a/src/third_party/wiredtiger/test/format/format.sh
+++ b/src/third_party/wiredtiger/test/format/format.sh
@@ -367,28 +367,6 @@ report_failure()
echo "$name: failure status reported" > $dir/$status
}
-# Wait for a process to die. Handle both child and non-child processes.
-# $1 pid
-# Return <exit code> of process if child or 127 if non-child
-wait_for_process()
-{
- pid=$1
- ret=127
-
- if [ `pstree -p $$ | grep -w $pid | wc -l` -gt "0" ]; then
- # Can still produce "wait: pid XXXX is not a child of this shell" due to process
- # ending between the steps, can be safely ignored.
- wait $pid
- ret=$?
- else
- while [ -d "/proc/$pid/" ]; do
- sleep 1
- done
- fi
-
- return $ret
-}
-
# Resolve/cleanup completed jobs.
resolve()
{
@@ -421,28 +399,17 @@ resolve()
}
# Kill the process group to catch any child processes.
- if [ `ps -eo ppid | grep -w $pid | wc -l` -gt "0" ]; then
- kill -KILL -- -$pid
- fi
- # Kill the process.
- kill -KILL $pid
- wait_for_process $pid
-
msg "job in $dir killed"
+ kill -KILL -- -$pid
+ wait $pid
# Remove jobs we killed, they count as neither success or failure.
rm -rf $dir $log
continue
}
- wait_for_process $pid
+ wait $pid
eret=$?
- # Check for Sanitizer failures, have to do this prior to success because both can be reported.
- grep -E -i 'Sanitizer' $log > /dev/null && {
- report_failure $dir
- continue
- }
-
# Remove successful jobs.
grep 'successful run completed' $log > /dev/null && {
rm -rf $dir $log
@@ -501,7 +468,7 @@ resolve()
continue
}
- # Check for the library abort message or an error from format.
+ # Check for the library abort message, or an error from format.
grep -E \
'aborting WiredTiger library|format alarm timed out|run FAILED' \
$log > /dev/null && {