diff options
author | 2021-09-22 20:12:58 +0200 | |
---|---|---|
committer | 2021-09-22 20:12:58 +0200 | |
commit | 921c9cc153174434c6464498274ae0ae9ca51efd (patch) | |
tree | 88a1df516d51b04432998458c177929113de6720 /test/environment/rlimit-join.exp | |
parent | hardcode PATH for internal use (diff) | |
download | firejail-921c9cc153174434c6464498274ae0ae9ca51efd.tar.gz firejail-921c9cc153174434c6464498274ae0ae9ca51efd.tar.zst firejail-921c9cc153174434c6464498274ae0ae9ca51efd.zip |
join: add support for rlimit options
Diffstat (limited to 'test/environment/rlimit-join.exp')
-rwxr-xr-x | test/environment/rlimit-join.exp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/environment/rlimit-join.exp b/test/environment/rlimit-join.exp new file mode 100755 index 000000000..aa8a203c0 --- /dev/null +++ b/test/environment/rlimit-join.exp | |||
@@ -0,0 +1,36 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2021 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | cd /home | ||
8 | spawn $env(SHELL) | ||
9 | match_max 100000 | ||
10 | |||
11 | send -- "firejail --noprofile --name=\"rlimit testing\"\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | spawn $env(SHELL) | ||
19 | send -- "firejail --rlimit-nofile=1234 --join=\"rlimit testing\"\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "Switching to pid" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
26 | send -- "cat /proc/self/limits\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 2\n";exit} | ||
29 | "Max open files 1234 1234" | ||
30 | } | ||
31 | after 100 | ||
32 | |||
33 | send -- "exit\r" | ||
34 | after 100 | ||
35 | |||
36 | puts "\nall done\n" | ||