diff options
author | Peter Holm <pho@FreeBSD.org> | 2022-07-15 08:19:39 +0000 |
---|---|---|
committer | Peter Holm <pho@FreeBSD.org> | 2022-07-15 08:19:39 +0000 |
commit | ac19e54390a0ff3c273cac514f404e867e26682a (patch) | |
tree | 5140a62af01b51e22732575902b13cee9a8f42b7 | |
parent | b4a666180180719272e16d9bfade5b7fc500b6be (diff) | |
download | src-ac19e54390a0ff3c273cac514f404e867e26682a.tar.gz src-ac19e54390a0ff3c273cac514f404e867e26682a.zip |
stress2: Enable more swap disk usage
-rwxr-xr-x | tools/test/stress2/misc/swap6.sh | 2 | ||||
-rw-r--r-- | tools/test/stress2/testcases/swap/swap.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tools/test/stress2/misc/swap6.sh b/tools/test/stress2/misc/swap6.sh index 30a3fd8e703a..ee929ee79018 100755 --- a/tools/test/stress2/misc/swap6.sh +++ b/tools/test/stress2/misc/swap6.sh @@ -33,7 +33,7 @@ . ../default.cfg [ `sysctl -n vm.swap_total` -eq 0 ] && exit 0 -min=5 # percent swap usage +min=10 # percent swap usage (cd ../testcases/swap; ./swap -t 10m -i 100 -l 100 -h > /dev/null) & sleep 1 mx=0 diff --git a/tools/test/stress2/testcases/swap/swap.c b/tools/test/stress2/testcases/swap/swap.c index 75bfe7856aed..c54605a4b0fe 100644 --- a/tools/test/stress2/testcases/swap/swap.c +++ b/tools/test/stress2/testcases/swap/swap.c @@ -155,10 +155,8 @@ test(void) c[i] = 0; i += page; } -#if 0 - if (op->hog != 1) - usleep(1000); -#endif + if (arc4random() % 100 < 10) + usleep(10000); } free((void *)c); |