stress2: Fix broken random number generation

This commit is contained in:
Peter Holm 2022-06-29 12:28:18 +02:00
parent 026502d9ed
commit bc49526a56
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ for i in `jot 20`; do
mksnap_ffs $mntpoint $mntpoint/.snap/snap$i
sleep 1
done
i=$(($(date '+%S') % 20 + 1))
i=$(($(date '+%s') % 20 + 1))
echo "rm -f $mntpoint/.snap/snap$i"
rm -f $mntpoint/.snap/snap$i
wait

View File

@ -74,7 +74,7 @@ for i in `jot 20`; do
sleep 1
done
# Remove random snapshot file
i=$((`date +%S` % 20 + 1))
i=$((`date +%s` % 20 + 1))
echo "rm -f $mntpoint/.snap/snap$i"
rm -f $mntpoint/.snap/snap$i
wait