summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger
diff options
context:
space:
mode:
authorSiddhartha Mahajan <siddhartha.mahajan8899@mongodb.com>2022-08-12 02:21:13 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-12 02:51:04 +0000
commit9dbd6d2bad0a6e9095a94b805bd637913ca42816 (patch)
treebb4cc053cb0ed661d7ec02102684e02fd1448e86 /src/third_party/wiredtiger
parent9a50725a60aa45bfeebe5d1d2301c72d2e2d2d01 (diff)
downloadmongo-9dbd6d2bad0a6e9095a94b805bd637913ca42816.tar.gz
Import wiredtiger: 7e97e06ff3b4c8eb71625478ce3c96a6c9073adc from branch mongodb-master
ref: 2624757995..7e97e06ff3 for: 6.1.0-rc0 WT-9721 Fix format.sh resolve function (#8196)
Diffstat (limited to 'src/third_party/wiredtiger')
-rw-r--r--src/third_party/wiredtiger/import.data2
-rwxr-xr-xsrc/third_party/wiredtiger/test/format/format.sh41
2 files changed, 38 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 155f55b8e18..8848ce99ba9 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "2624757995771c1c7001ef53ca18c70804232d06"
+ "commit": "7e97e06ff3b4c8eb71625478ce3c96a6c9073adc"
}
diff --git a/src/third_party/wiredtiger/test/format/format.sh b/src/third_party/wiredtiger/test/format/format.sh
index 861ded0890a..dd9e10ab89d 100755
--- a/src/third_party/wiredtiger/test/format/format.sh
+++ b/src/third_party/wiredtiger/test/format/format.sh
@@ -367,6 +367,28 @@ 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()
{
@@ -399,17 +421,28 @@ 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 $pid
+ wait_for_process $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
@@ -468,7 +501,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 && {