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);