The branch main has been updated by pho:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ac19e54390a0ff3c273cac514f404e867e26682a

commit ac19e54390a0ff3c273cac514f404e867e26682a
Author:     Peter Holm <[email protected]>
AuthorDate: 2022-07-15 08:19:39 +0000
Commit:     Peter Holm <[email protected]>
CommitDate: 2022-07-15 08:19:39 +0000

    stress2: Enable more swap disk usage
---
 tools/test/stress2/misc/swap6.sh         | 2 +-
 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);
 

Reply via email to