aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-03-11 08:58:56 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-03-11 08:58:56 -0500
commit359248902e92c286cdb1dd4a9e978fab30334508 (patch)
tree14596dd14dadc5ed40f95ac9ab4af717d42b9749 /test
parentnosound support in profile files (diff)
downloadfirejail-359248902e92c286cdb1dd4a9e978fab30334508.tar.gz
firejail-359248902e92c286cdb1dd4a9e978fab30334508.tar.zst
firejail-359248902e92c286cdb1dd4a9e978fab30334508.zip
testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/sound.exp79
-rw-r--r--test/sound.profile1
-rwxr-xr-xtest/test.sh3
3 files changed, 83 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
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --nosound speaker-test\r"
8expect {
9 timeout {puts "TESTING ERROR 1\n";exit}
10 "Child process initialized"
11}
12expect {
13 timeout {puts "TESTING ERROR 2\n";exit}
14 "parent is shutting down"
15}
16sleep 2
17
18send -- "firejail --nosound aplay -l\r"
19expect {
20 timeout {puts "TESTING ERROR 3\n";exit}
21 "Child process initialized"
22}
23expect {
24 timeout {puts "TESTING ERROR 4\n";exit}
25 "List of PLAYBACK" {puts "TESTING ERROR 3\n";exit}
26 "no soundcards found"
27}
28expect {
29 timeout {puts "TESTING ERROR 5\n";exit}
30 "parent is shutting down"
31}
32sleep 2
33
34
35send -- "firejail --profile=sound.profile speaker-test\r"
36expect {
37 timeout {puts "TESTING ERROR 11\n";exit}
38 "Child process initialized"
39}
40expect {
41 timeout {puts "TESTING ERROR 12\n";exit}
42 "parent is shutting down"
43}
44sleep 2
45
46send -- "firejail --profile=sound.profile aplay -l\r"
47expect {
48 timeout {puts "TESTING ERROR 13\n";exit}
49 "Child process initialized"
50}
51expect {
52 timeout {puts "TESTING ERROR 14\n";exit}
53 "List of PLAYBACK" {puts "TESTING ERROR 3\n";exit}
54 "no soundcards found"
55}
56expect {
57 timeout {puts "TESTING ERROR 15\n";exit}
58 "parent is shutting down"
59}
60sleep 2
61
62
63send -- "firejail aplay -l\r"
64expect {
65 timeout {puts "TESTING ERROR 23\n";exit}
66 "Child process initialized"
67}
68expect {
69 timeout {puts "TESTING ERROR 24\n";exit}
70 "List of PLAYBACK"
71}
72expect {
73 timeout {puts "TESTING ERROR 25\n";exit}
74 "parent is shutting down"
75}
76sleep 2
77
78puts "\n"
79
diff --git a/test/sound.profile b/test/sound.profile
new file mode 100644
index 000000000..2f83a0bbb
--- /dev/null
+++ b/test/sound.profile
@@ -0,0 +1 @@
nosound
diff --git a/test/test.sh b/test/test.sh
index cb3cd728a..2dcb89f2a 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -6,6 +6,9 @@
6 6
7./fscheck.sh 7./fscheck.sh
8 8
9echo "TESTING: sound (sound.exp)"
10./sound.exp
11
9echo "TESTING: nice (nice.exp)" 12echo "TESTING: nice (nice.exp)"
10./nice.exp 13./nice.exp
11 14