diff options
author | netblue30 <netblue30@yahoo.com> | 2018-04-01 07:48:11 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-04-01 07:48:11 -0400 |
commit | 1fb1bfe20fbde64d769e846b1581ce021d03e864 (patch) | |
tree | b284305324ca31fa5c0b2b318a9dbeaae146da55 /test/utils/name.exp | |
parent | merges (diff) | |
download | firejail-1fb1bfe20fbde64d769e846b1581ce021d03e864.tar.gz firejail-1fb1bfe20fbde64d769e846b1581ce021d03e864.tar.zst firejail-1fb1bfe20fbde64d769e846b1581ce021d03e864.zip |
testing
Diffstat (limited to 'test/utils/name.exp')
-rwxr-xr-x | test/utils/name.exp | 174 |
1 files changed, 174 insertions, 0 deletions
diff --git a/test/utils/name.exp b/test/utils/name.exp new file mode 100755 index 000000000..f00b5866e --- /dev/null +++ b/test/utils/name.exp | |||
@@ -0,0 +1,174 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | |||
11 | send -- "firejail --name=ftest\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | after 100 | ||
17 | |||
18 | spawn $env(SHELL) | ||
19 | send -- "firejail --name=ftest\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "Child process initialized" | ||
23 | } | ||
24 | after 100 | ||
25 | |||
26 | spawn $env(SHELL) | ||
27 | send -- "firejail --name=ftest\r" | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 2\n";exit} | ||
30 | "Child process initialized" | ||
31 | } | ||
32 | after 100 | ||
33 | |||
34 | spawn $env(SHELL) | ||
35 | send -- "firejail --name=ftest\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 3\n";exit} | ||
38 | "Child process initialized" | ||
39 | } | ||
40 | after 100 | ||
41 | |||
42 | spawn $env(SHELL) | ||
43 | send -- "firejail --name=ftest\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 4\n";exit} | ||
46 | "Child process initialized" | ||
47 | } | ||
48 | after 100 | ||
49 | |||
50 | spawn $env(SHELL) | ||
51 | send -- "firejail --name=ftest\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 5\n";exit} | ||
54 | "Child process initialized" | ||
55 | } | ||
56 | after 100 | ||
57 | |||
58 | spawn $env(SHELL) | ||
59 | send -- "firejail --name=ftest\r" | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 6\n";exit} | ||
62 | "Child process initialized" | ||
63 | } | ||
64 | after 100 | ||
65 | |||
66 | spawn $env(SHELL) | ||
67 | send -- "firejail --name=ftest\r" | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 7\n";exit} | ||
70 | "Child process initialized" | ||
71 | } | ||
72 | after 100 | ||
73 | |||
74 | spawn $env(SHELL) | ||
75 | send -- "firejail --name=ftest\r" | ||
76 | expect { | ||
77 | timeout {puts "TESTING ERROR 8\n";exit} | ||
78 | "Child process initialized" | ||
79 | } | ||
80 | after 100 | ||
81 | |||
82 | spawn $env(SHELL) | ||
83 | send -- "firejail --name=ftest\r" | ||
84 | expect { | ||
85 | timeout {puts "TESTING ERROR 9\n";exit} | ||
86 | "Child process initialized" | ||
87 | } | ||
88 | after 100 | ||
89 | |||
90 | spawn $env(SHELL) | ||
91 | send -- "firejail --name=ftest\r" | ||
92 | expect { | ||
93 | timeout {puts "TESTING ERROR 10\n";exit} | ||
94 | "Child process initialized" | ||
95 | } | ||
96 | after 100 | ||
97 | |||
98 | spawn $env(SHELL) | ||
99 | send -- "firejail --name=ftest\r" | ||
100 | expect { | ||
101 | timeout {puts "TESTING ERROR 11\n";exit} | ||
102 | "Child process initialized" | ||
103 | } | ||
104 | after 100 | ||
105 | |||
106 | spawn $env(SHELL) | ||
107 | send -- "firejail --list\r" | ||
108 | expect { | ||
109 | timeout {puts "TESTING ERROR 12\n";exit} | ||
110 | ":ftest:" | ||
111 | } | ||
112 | expect { | ||
113 | timeout {puts "TESTING ERROR 13\n";exit} | ||
114 | ":ftest-1:" | ||
115 | } | ||
116 | expect { | ||
117 | timeout {puts "TESTING ERROR 14\n";exit} | ||
118 | ":ftest-2:" | ||
119 | } | ||
120 | expect { | ||
121 | timeout {puts "TESTING ERROR 15\n";exit} | ||
122 | ":ftest-3:" | ||
123 | } | ||
124 | expect { | ||
125 | timeout {puts "TESTING ERROR 16\n";exit} | ||
126 | ":ftest-4:" | ||
127 | } | ||
128 | expect { | ||
129 | timeout {puts "TESTING ERROR 17\n";exit} | ||
130 | ":ftest-5:" | ||
131 | } | ||
132 | expect { | ||
133 | timeout {puts "TESTING ERROR 18\n";exit} | ||
134 | ":ftest-6:" | ||
135 | } | ||
136 | expect { | ||
137 | timeout {puts "TESTING ERROR 19\n";exit} | ||
138 | ":ftest-7:" | ||
139 | } | ||
140 | expect { | ||
141 | timeout {puts "TESTING ERROR 20\n";exit} | ||
142 | ":ftest-8:" | ||
143 | } | ||
144 | expect { | ||
145 | timeout {puts "TESTING ERROR 21\n";exit} | ||
146 | ":ftest-9:" | ||
147 | } | ||
148 | expect { | ||
149 | timeout {puts "TESTING ERROR 22\n";exit} | ||
150 | ":ftest-" | ||
151 | } | ||
152 | expect { | ||
153 | timeout {puts "TESTING ERROR 23\n";exit} | ||
154 | ":ftest-" | ||
155 | } | ||
156 | after 100 | ||
157 | |||
158 | send -- "firejail --shutdown=ftest-5\r" | ||
159 | expect { | ||
160 | timeout {puts "TESTING ERROR 11\n";exit} | ||
161 | "Sending SIGTERM" | ||
162 | } | ||
163 | sleep 1 | ||
164 | |||
165 | spawn $env(SHELL) | ||
166 | send -- "firejail --list\r" | ||
167 | expect { | ||
168 | timeout {puts "TESTING ERROR 12\n";exit} | ||
169 | ":ftest-5:" {puts "TESTING ERROR 15\n";exit} | ||
170 | ":ftest-9:" | ||
171 | } | ||
172 | |||
173 | after 100 | ||
174 | puts "all done\n" | ||