diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-16 16:40:12 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-16 16:40:12 -0500 |
commit | 98159c098b6afedfed20eecdc80719dae1f914ff (patch) | |
tree | d44407914904e81dcb4bd582bdae11e558705c3d /test | |
parent | fcopy part 1 (diff) | |
download | firejail-98159c098b6afedfed20eecdc80719dae1f914ff.tar.gz firejail-98159c098b6afedfed20eecdc80719dae1f914ff.tar.zst firejail-98159c098b6afedfed20eecdc80719dae1f914ff.zip |
fcopy part 2
Diffstat (limited to 'test')
-rwxr-xr-x | test/fcopy/cmdline.exp | 10 | ||||
-rwxr-xr-x | test/fcopy/filecopy.exp | 6 | ||||
-rwxr-xr-x | test/fcopy/linkcopy.exp | 46 |
3 files changed, 10 insertions, 52 deletions
diff --git a/test/fcopy/cmdline.exp b/test/fcopy/cmdline.exp index 95e221321..24bb19351 100755 --- a/test/fcopy/cmdline.exp +++ b/test/fcopy/cmdline.exp | |||
@@ -43,14 +43,4 @@ expect { | |||
43 | } | 43 | } |
44 | after 100 | 44 | after 100 |
45 | 45 | ||
46 | send -- "/usr/lib/firejail/fcopy foo1 foo2\r" | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 6\n";exit} | ||
49 | "cannot find destination directory" | ||
50 | } | ||
51 | after 100 | ||
52 | |||
53 | |||
54 | |||
55 | |||
56 | puts "\nall done\n" | 46 | puts "\nall done\n" |
diff --git a/test/fcopy/filecopy.exp b/test/fcopy/filecopy.exp index 9927e18fe..d1f0a4424 100755 --- a/test/fcopy/filecopy.exp +++ b/test/fcopy/filecopy.exp | |||
@@ -13,7 +13,7 @@ match_max 100000 | |||
13 | send -- "rm -fr dest/*\r" | 13 | send -- "rm -fr dest/*\r" |
14 | after 100 | 14 | after 100 |
15 | 15 | ||
16 | send -- "/usr/lib/firejail/fcopy src/dircopy.exp dest\r" | 16 | send -- "/usr/lib/firejail/fcopy dircopy.exp dest\r" |
17 | after 100 | 17 | after 100 |
18 | 18 | ||
19 | send -- "find dest\r" | 19 | send -- "find dest\r" |
@@ -31,7 +31,7 @@ after 100 | |||
31 | send -- "ls -al dest\r" | 31 | send -- "ls -al dest\r" |
32 | expect { | 32 | expect { |
33 | timeout {puts "TESTING ERROR 2\n";exit} | 33 | timeout {puts "TESTING ERROR 2\n";exit} |
34 | "lrwxrwxrwx" | 34 | "rwxr-xr-x" |
35 | } | 35 | } |
36 | after 100 | 36 | after 100 |
37 | 37 | ||
@@ -45,7 +45,7 @@ expect { | |||
45 | send -- "file dest/dircopy.exp\r" | 45 | send -- "file dest/dircopy.exp\r" |
46 | expect { | 46 | expect { |
47 | timeout {puts "TESTING ERROR 5\n";exit} | 47 | timeout {puts "TESTING ERROR 5\n";exit} |
48 | "symbolic link" | 48 | "ASCII text" |
49 | } | 49 | } |
50 | 50 | ||
51 | send -- "rm -fr dest/*\r" | 51 | send -- "rm -fr dest/*\r" |
diff --git a/test/fcopy/linkcopy.exp b/test/fcopy/linkcopy.exp index b87f24a59..9927e18fe 100755 --- a/test/fcopy/linkcopy.exp +++ b/test/fcopy/linkcopy.exp | |||
@@ -13,7 +13,7 @@ match_max 100000 | |||
13 | send -- "rm -fr dest/*\r" | 13 | send -- "rm -fr dest/*\r" |
14 | after 100 | 14 | after 100 |
15 | 15 | ||
16 | send -- "/usr/lib/firejail/fcopy src dest\r" | 16 | send -- "/usr/lib/firejail/fcopy src/dircopy.exp dest\r" |
17 | after 100 | 17 | after 100 |
18 | 18 | ||
19 | send -- "find dest\r" | 19 | send -- "find dest\r" |
@@ -23,60 +23,28 @@ expect { | |||
23 | } | 23 | } |
24 | expect { | 24 | expect { |
25 | timeout {puts "TESTING ERROR 1\n";exit} | 25 | timeout {puts "TESTING ERROR 1\n";exit} |
26 | "dest/a" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 2\n";exit} | ||
30 | "dest/a/b" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3\n";exit} | ||
34 | "dest/a/b/file4" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 4\n";exit} | ||
38 | "dest/a/file3" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 5\n";exit} | ||
42 | "dest/dircopy.exp" | 26 | "dest/dircopy.exp" |
43 | } | 27 | } |
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 6\n";exit} | ||
46 | "dest/file2" | ||
47 | } | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 7\n";exit} | ||
50 | "dest/file1" | ||
51 | } | ||
52 | after 100 | 28 | after 100 |
53 | 29 | ||
54 | 30 | ||
55 | send -- "ls -al dest\r" | 31 | send -- "ls -al dest\r" |
56 | expect { | 32 | expect { |
57 | timeout {puts "TESTING ERROR 8\n";exit} | 33 | timeout {puts "TESTING ERROR 2\n";exit} |
58 | "drwx--x--x" | 34 | "lrwxrwxrwx" |
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 9\n";exit} | ||
62 | "rwxrwxrwx" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 10\n";exit} | ||
66 | "rw-r--r--" | ||
67 | } | 35 | } |
68 | after 100 | 36 | after 100 |
69 | 37 | ||
70 | send -- "diff -q src/a/b/file4 dest/a/b/file4; echo done\r" | 38 | send -- "diff -q dircopy.exp dest/dircopy.exp; echo done\r" |
71 | expect { | 39 | expect { |
72 | timeout {puts "TESTING ERROR 11\n";exit} | 40 | timeout {puts "TESTING ERROR 3\n";exit} |
73 | "differ" {puts "TESTING ERROR 12\n";exit} | 41 | "differ" {puts "TESTING ERROR 4\n";exit} |
74 | "done" | 42 | "done" |
75 | } | 43 | } |
76 | 44 | ||
77 | send -- "file dest/dircopy.exp\r" | 45 | send -- "file dest/dircopy.exp\r" |
78 | expect { | 46 | expect { |
79 | timeout {puts "TESTING ERROR 13\n";exit} | 47 | timeout {puts "TESTING ERROR 5\n";exit} |
80 | "symbolic link" | 48 | "symbolic link" |
81 | } | 49 | } |
82 | 50 | ||