mirror of
https://github.com/versity/scoutfs.git
synced 2026-06-04 02:36:28 +00:00
Have run-tests monitor sync before crashing
There have been a few failures where output is generated just before we crash but it didn't have a chance to be written. Add a best-effort background sync before crashing. There's a good chance it'll hang if the system is stuck so we don't wait for it directly, just for .. some time to pass. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -505,7 +505,10 @@ crash_monitor()
|
||||
fi
|
||||
|
||||
if [ "$bad" != 0 ]; then
|
||||
echo "run-tests monitor triggering crash"
|
||||
echo "run-tests monitor syncing and triggering crash"
|
||||
# hail mary, the sync could well hang
|
||||
(echo s > /proc/sysrq-trigger) &
|
||||
sleep 5
|
||||
echo c > /proc/sysrq-trigger
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user