aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment/nice.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 07:50:35 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 07:50:35 -0400
commita3207cdca569d78ee6a9723c7c0dfdf10cd15845 (patch)
treeb1925e299c26d57edc4b471a342f8e1d8accf186 /test/environment/nice.exp
parenttesting (diff)
downloadfirejail-a3207cdca569d78ee6a9723c7c0dfdf10cd15845.tar.gz
firejail-a3207cdca569d78ee6a9723c7c0dfdf10cd15845.tar.zst
firejail-a3207cdca569d78ee6a9723c7c0dfdf10cd15845.zip
testing
Diffstat (limited to 'test/environment/nice.exp')
-rwxr-xr-xtest/environment/nice.exp83
1 files changed, 83 insertions, 0 deletions
diff --git a/test/environment/nice.exp b/test/environment/nice.exp
new file mode 100755
index 000000000..7e5731c63
--- /dev/null
+++ b/test/environment/nice.exp
@@ -0,0 +1,83 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --nice=15\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17send -- "top -b -n 1\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "netblue"
21}
22expect {
23 timeout {puts "TESTING ERROR 2\n";exit}
24 "15"
25}
26expect {
27 timeout {puts "TESTING ERROR 3\n";exit}
28 "bash"
29}
30expect {
31 timeout {puts "TESTING ERROR 4\n";exit}
32 "netblu"
33}
34expect {
35 timeout {puts "TESTING ERROR 5\n";exit}
36 "15"
37}
38expect {
39 timeout {puts "TESTING ERROR 6\n";exit}
40 "top"
41}
42
43sleep 1
44send -- "exit\r"
45sleep 1
46
47send -- "firejail --profile=nice.profile\r"
48expect {
49 timeout {puts "TESTING ERROR 10\n";exit}
50 "Child process initialized"
51}
52sleep 1
53
54send -- "top -b -n 1\r"
55expect {
56 timeout {puts "TESTING ERROR 11\n";exit}
57 "netblue"
58}
59expect {
60 timeout {puts "TESTING ERROR 12\n";exit}
61 "15"
62}
63expect {
64 timeout {puts "TESTING ERROR 13\n";exit}
65 "bash"
66}
67expect {
68 timeout {puts "TESTING ERROR 14\n";exit}
69 "netblu"
70}
71expect {
72 timeout {puts "TESTING ERROR 15\n";exit}
73 "15"
74}
75expect {
76 timeout {puts "TESTING ERROR 16\n";exit}
77 "top"
78}
79
80
81
82puts "\nall done\n"
83