diff options
author | netblue30 <netblue30@yahoo.com> | 2016-03-11 08:58:56 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-03-11 08:58:56 -0500 |
commit | 359248902e92c286cdb1dd4a9e978fab30334508 (patch) | |
tree | 14596dd14dadc5ed40f95ac9ab4af717d42b9749 /test/sound.exp | |
parent | nosound support in profile files (diff) | |
download | firejail-359248902e92c286cdb1dd4a9e978fab30334508.tar.gz firejail-359248902e92c286cdb1dd4a9e978fab30334508.tar.zst firejail-359248902e92c286cdb1dd4a9e978fab30334508.zip |
testing
Diffstat (limited to 'test/sound.exp')
-rwxr-xr-x | test/sound.exp | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/test/sound.exp b/test/sound.exp new file mode 100755 index 000000000..7df50bf16 --- /dev/null +++ b/test/sound.exp | |||
@@ -0,0 +1,79 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --nosound speaker-test\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 2\n";exit} | ||
14 | "parent is shutting down" | ||
15 | } | ||
16 | sleep 2 | ||
17 | |||
18 | send -- "firejail --nosound aplay -l\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | "Child process initialized" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "List of PLAYBACK" {puts "TESTING ERROR 3\n";exit} | ||
26 | "no soundcards found" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 5\n";exit} | ||
30 | "parent is shutting down" | ||
31 | } | ||
32 | sleep 2 | ||
33 | |||
34 | |||
35 | send -- "firejail --profile=sound.profile speaker-test\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 11\n";exit} | ||
38 | "Child process initialized" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 12\n";exit} | ||
42 | "parent is shutting down" | ||
43 | } | ||
44 | sleep 2 | ||
45 | |||
46 | send -- "firejail --profile=sound.profile aplay -l\r" | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 13\n";exit} | ||
49 | "Child process initialized" | ||
50 | } | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 14\n";exit} | ||
53 | "List of PLAYBACK" {puts "TESTING ERROR 3\n";exit} | ||
54 | "no soundcards found" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 15\n";exit} | ||
58 | "parent is shutting down" | ||
59 | } | ||
60 | sleep 2 | ||
61 | |||
62 | |||
63 | send -- "firejail aplay -l\r" | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 23\n";exit} | ||
66 | "Child process initialized" | ||
67 | } | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 24\n";exit} | ||
70 | "List of PLAYBACK" | ||
71 | } | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 25\n";exit} | ||
74 | "parent is shutting down" | ||
75 | } | ||
76 | sleep 2 | ||
77 | |||
78 | puts "\n" | ||
79 | |||