stress2: Fix cleanup

This commit is contained in:
Peter Holm 2021-09-02 07:07:44 +00:00
parent d5c541c267
commit 9d1eb47fa1

View File

@ -42,13 +42,13 @@ while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do
./mmap3
done
echo "Expect Segmentation faults"
trap "ls /tmp/mmap3* | grep -E 'mmap3\.[0-9]{6}\.[0-9]{4}$' | xargs rm -v" \
EXIT INT
trap "ls /tmp/mmap3* 2>/dev/null | grep -E 'mmap3\.[0-9]{6}\.[0-9]{4}$' | \
xargs rm -v" EXIT INT
start=`date '+%s'`
while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do
./mmap3 random
done
rm -f mmap3 mmap3.core
rm -f /tmp/mmap3 mmap3.core
exit
EOF