generic/233,270: unlimit the max locked memory size for io_uring
[xfstests-dev.git] / tests / generic / 270
index 55779f5e790211b103999cb6ab4b371bb34c1159..e93940ef911f0822c3102bc4f5d2884844db9578 100755 (executable)
@@ -37,6 +37,12 @@ _workout()
        cp $FSSTRESS_PROG  $tmp.fsstress.bin
        $SETCAP_PROG cap_chown=epi  $tmp.fsstress.bin
 
+       # io_uring accounts memory it needs under the rlimit memlocked option,
+       # which can be quite low on some setups (especially 64K pagesize). root
+       # isn't under this restriction, but regular users are. To avoid the
+       # io_uring_queue_init fail on ENOMEM, set max locked memory to unlimited
+       # temporarily.
+       ulimit -l unlimited
        (su $qa_user -c "$tmp.fsstress.bin $args" &) > /dev/null 2>&1
 
        echo "Run dd writers in parallel"
@@ -54,7 +60,6 @@ _workout()
 
 # real QA test starts here
 _supported_fs generic
-_supported_os Linux
 _require_quota
 _require_user
 _require_scratch