Skip to content

Commit

Permalink
test: set soft ulimit
Browse files Browse the repository at this point in the history
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 71d5ee0 introduced the issue.

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Oct 22, 2024
1 parent 4319fac commit 94878af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 94878af

Please sign in to comment.