diff options
author | 2022-01-11 20:57:49 -0500 | |
---|---|---|
committer | 2022-01-11 20:57:49 -0500 | |
commit | f094521fe8d4eda1d5074aa14e2200f624adcdaf (patch) | |
tree | 793f262866412e93cdc64f8bee9d860898b1ab21 /test/fcopy/src | |
parent | fix scan-build (diff) | |
download | firejail-f094521fe8d4eda1d5074aa14e2200f624adcdaf.tar.gz firejail-f094521fe8d4eda1d5074aa14e2200f624adcdaf.tar.zst firejail-f094521fe8d4eda1d5074aa14e2200f624adcdaf.zip |
fix fcopy testing
Diffstat (limited to 'test/fcopy/src')
-rwxr-xr-x | test/fcopy/src/dircopy.exp | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/test/fcopy/src/dircopy.exp b/test/fcopy/src/dircopy.exp deleted file mode 100755 index 0882561e5..000000000 --- a/test/fcopy/src/dircopy.exp +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2022 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | # | ||
7 | # copy directory src to dest | ||
8 | # | ||
9 | set timeout 10 | ||
10 | spawn $env(SHELL) | ||
11 | match_max 100000 | ||
12 | |||
13 | send -- "rm -fr dest/*\r" | ||
14 | after 100 | ||
15 | |||
16 | send -- "fcopy src dest\r" | ||
17 | after 100 | ||
18 | |||
19 | send -- "find dest\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 0\n";exit} | ||
22 | "dest/" | ||
23 | } | ||
24 | after 100 | ||
25 | |||
26 | send -- "find dest\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 0\n";exit} | ||
29 | "dest/" | ||
30 | } | ||
31 | after 100 | ||
32 | |||
33 | send -- "find dest\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 1\n";exit} | ||
36 | "dest/a" | ||
37 | } | ||
38 | after 100 | ||
39 | |||
40 | send -- "find dest\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 2\n";exit} | ||
43 | "dest/a/b" | ||
44 | } | ||
45 | after 100 | ||
46 | |||
47 | send -- "find dest\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 3\n";exit} | ||
50 | "dest/a/b/file4" | ||
51 | } | ||
52 | after 100 | ||
53 | |||
54 | send -- "find dest\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 4\n";exit} | ||
57 | "dest/a/file3" | ||
58 | } | ||
59 | after 100 | ||
60 | |||
61 | send -- "find dest\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 5\n";exit} | ||
64 | "dest/dircopy.exp" | ||
65 | } | ||
66 | after 100 | ||
67 | |||
68 | send -- "find dest\r" | ||
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 6\n";exit} | ||
71 | "dest/file2" | ||
72 | } | ||
73 | after 100 | ||
74 | |||
75 | send -- "find dest\r" | ||
76 | expect { | ||
77 | timeout {puts "TESTING ERROR 7\n";exit} | ||
78 | "dest/file1" | ||
79 | } | ||
80 | after 100 | ||
81 | |||
82 | |||
83 | send -- "ls -al dest\r" | ||
84 | expect { | ||
85 | timeout {puts "TESTING ERROR 8\n";exit} | ||
86 | "drwxr-xr-x" { puts "umask 0022\n" } | ||
87 | "drwxrwxr-x" { puts "umask 0002\n" } | ||
88 | } | ||
89 | expect { | ||
90 | timeout {puts "TESTING ERROR 9\n";exit} | ||
91 | "a" | ||
92 | } | ||
93 | expect { | ||
94 | timeout {puts "TESTING ERROR 10\n";exit} | ||
95 | "lrwxrwxrwx" | ||
96 | } | ||
97 | expect { | ||
98 | timeout {puts "TESTING ERROR 11\n";exit} | ||
99 | "dircopy.exp" | ||
100 | } | ||
101 | expect { | ||
102 | timeout {puts "TESTING ERROR 12\n";exit} | ||
103 | "rwxr-xr-x" { puts "umask 0022\n" } | ||
104 | "rwxrwxr-x" { puts "umask 0002\n" } | ||
105 | } | ||
106 | expect { | ||
107 | timeout {puts "TESTING ERROR 13\n";exit} | ||
108 | "file1" | ||
109 | } | ||
110 | expect { | ||
111 | timeout {puts "TESTING ERROR 14\n";exit} | ||
112 | "rw-r--r--" { puts "umask 0022\n" } | ||
113 | "rw-rw-r--" { puts "umask 0002\n" } | ||
114 | } | ||
115 | expect { | ||
116 | timeout {puts "TESTING ERROR 15\n";exit} | ||
117 | "file2" | ||
118 | } | ||
119 | after 100 | ||
120 | |||
121 | send -- "stty -echo\r" | ||
122 | after 100 | ||
123 | send -- "diff -q src/a/b/file4 dest/a/b/file4; echo done\r" | ||
124 | expect { | ||
125 | timeout {puts "TESTING ERROR 16\n";exit} | ||
126 | "differ" {puts "TESTING ERROR 17\n";exit} | ||
127 | "done" | ||
128 | } | ||
129 | |||
130 | send -- "file dest/dircopy.exp\r" | ||
131 | expect { | ||
132 | timeout {puts "TESTING ERROR 18\n";exit} | ||
133 | "symbolic link" | ||
134 | } | ||
135 | |||
136 | send -- "rm -fr dest/*\r" | ||
137 | after 100 | ||
138 | |||
139 | puts "\nall done\n" | ||