diff options
author | 2023-02-28 09:51:26 -0500 | |
---|---|---|
committer | 2023-02-28 09:51:26 -0500 | |
commit | 27c4d069f322fbeca07c88e0e96208233103a5db (patch) | |
tree | fb4b4fdc75eb5e633ab55b8228a60f54176446a0 /test/ssh/scp.exp | |
parent | fix cppcheck/scan-build problems (diff) | |
download | firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip |
chroot testing
Diffstat (limited to 'test/ssh/scp.exp')
-rwxr-xr-x | test/ssh/scp.exp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/test/ssh/scp.exp b/test/ssh/scp.exp deleted file mode 100755 index a803e7131..000000000 --- a/test/ssh/scp.exp +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "ssh firejail-test@0\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"} | ||
14 | "an existing sandbox was detected" {puts "OK\n"} | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | send -- "rm -f testfile\r" | ||
19 | after 100 | ||
20 | send -- "exit\r" | ||
21 | sleep 1 | ||
22 | |||
23 | send -- "echo 12345 > testfile\r" | ||
24 | after 100 | ||
25 | send -- "scp testfile firejail-test@0:~/testfile\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 1\n";exit} | ||
28 | "100%" | ||
29 | } | ||
30 | sleep 1 | ||
31 | |||
32 | |||
33 | send -- "ssh firejail-test@0\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 2\n";exit} | ||
36 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"} | ||
37 | "an existing sandbox was detected" {puts "OK\n"} | ||
38 | } | ||
39 | sleep 1 | ||
40 | send -- "cat testfile\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 3\n";exit} | ||
43 | "12345" | ||
44 | } | ||
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | |||
49 | send -- "rm testfile\r" | ||
50 | after 100 | ||
51 | send -- "scp firejail-test@0:~/testfile testfile\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 4\n";exit} | ||
54 | "100%" | ||
55 | } | ||
56 | sleep 1 | ||
57 | send -- "cat testfile\r" | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 5\n";exit} | ||
60 | "12345" | ||
61 | } | ||
62 | after 100 | ||
63 | send -- "rm testfile\r" | ||
64 | sleep 1 | ||
65 | |||
66 | puts "\nall done\n" | ||