aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 07:42:47 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 07:42:47 -0400
commit9366b9ddd35168f9a42f374a887f3669ffbab234 (patch)
tree38631d1041646f3170e0099bf7cac02964470b7a /test/utils
parenttesting (diff)
downloadfirejail-9366b9ddd35168f9a42f374a887f3669ffbab234.tar.gz
firejail-9366b9ddd35168f9a42f374a887f3669ffbab234.tar.zst
firejail-9366b9ddd35168f9a42f374a887f3669ffbab234.zip
testing
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/ls.exp41
-rwxr-xr-xtest/utils/utils.sh3
2 files changed, 44 insertions, 0 deletions
diff --git a/test/utils/ls.exp b/test/utils/ls.exp
new file mode 100755
index 000000000..1936c0aff
--- /dev/null
+++ b/test/utils/ls.exp
@@ -0,0 +1,41 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "rm -f lstesting\r"
8sleep 1
9send -- "firejail --private --name=test\r"
10expect {
11 timeout {puts "TESTING ERROR 0\n";exit}
12 "Child process initialized"
13}
14sleep 2
15send -- "echo my_testing > lstesting\r"
16sleep 2
17
18
19spawn $env(SHELL)
20send -- "firejail --ls=test ~/.\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "lstesting"
24}
25sleep 1
26send -- "firejail --get=test ~/lstesting\r"
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Transfer complete"
30}
31sleep 1
32send -- "cat lstesting\r"
33expect {
34 timeout {puts "TESTING ERROR 3\n";exit}
35 "my_testing"
36}
37sleep 1
38send -- "rm -f lstesting\r"
39
40sleep 1
41puts "\nall done\n"
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 23cbc6b35..474c026d1 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -75,3 +75,6 @@ echo "TESTING: firemon --seccomp (test/utils/seccomp.exp)"
75echo "TESTING: firemon --caps (test/ustil/caps.exp)" 75echo "TESTING: firemon --caps (test/ustil/caps.exp)"
76./caps.exp 76./caps.exp
77 77
78echo "TESTING: file transfer (test/ustil/ls.exp)"
79./ls.exp
80