From 94878af15147e82f5a3ca7d8234518b653ae9225 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 22 Oct 2024 12:04:58 +0200 Subject: [PATCH] test: set soft ulimit when the current soft limit is higher than the new value, ulimit fails to set the hard limit as (tested on Rawhide): [root@rawhide ~]# ulimit -n -H 1048575 -bash: ulimit: open files: cannot modify limit: Invalid argument to avoid the problem, set also the soft limit: [root@rawhide ~]# ulimit -n -H 12345678 [root@rawhide ~]# ulimit -n -H 1048575 -bash: ulimit: open files: cannot modify limit: Invalid argument [root@rawhide ~]# ulimit -n -SH 1048575 [root@rawhide ~]# ulimit -n -H 1048575 commit 71d5ee0e04eb61802b7c59166d88eac19c563ff7 introduced the issue. Signed-off-by: Giuseppe Scrivano --- test/system/030-run.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 3d75b1aa2b..597f407be9 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -1315,7 +1315,7 @@ EOF default_value=$output # Set the current ulimit smaller than the default value - ulimit -n -H $((default_value - 1)) + ulimit -n -SH $((default_value - 1)) run_podman run --rm $IMAGE sh -c 'ulimit -n -H'