aboutsummaryrefslogtreecommitdiffstats
path: root/test/private-lib/gnome-calculator.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/private-lib/gnome-calculator.exp')
-rwxr-xr-xtest/private-lib/gnome-calculator.exp85
1 files changed, 0 insertions, 85 deletions
diff --git a/test/private-lib/gnome-calculator.exp b/test/private-lib/gnome-calculator.exp
deleted file mode 100755
index e9d2c8208..000000000
--- a/test/private-lib/gnome-calculator.exp
+++ /dev/null
@@ -1,85 +0,0 @@
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10# gnome-calculator uses quiet at the top of the profile
11# we need to use --ignore
12send -- "firejail --ignore=quiet gnome-calculator\r"
13expect {
14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Reading profile /etc/firejail/gnome-calculator.profile"
16}
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 "Child process initialized"
20}
21sleep 3
22
23spawn $env(SHELL)
24send -- "firejail --list\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 ":firejail"
28}
29expect {
30 timeout {puts "TESTING ERROR 3.1\n";exit}
31 "gnome-calculator"
32}
33after 100
34
35# grsecurity exit
36send -- "file /proc/sys/kernel/grsecurity\r"
37expect {
38 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
39 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
40 "cannot open" {puts "grsecurity not present\n"}
41}
42
43send -- "firejail --name=blablabla\r"
44expect {
45 timeout {puts "TESTING ERROR 4\n";exit}
46 "Child process initialized"
47}
48sleep 2
49
50spawn $env(SHELL)
51send -- "firemon --seccomp\r"
52expect {
53 timeout {puts "TESTING ERROR 5\n";exit}
54 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
55 ":firejail --ignore=quiet gnome-calculator"
56}
57expect {
58 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
59 "Seccomp: 2"
60}
61expect {
62 timeout {puts "TESTING ERROR 5.1\n";exit}
63 "name=blablabla"
64}
65after 100
66send -- "firemon --caps\r"
67expect {
68 timeout {puts "TESTING ERROR 6\n";exit}
69 ":firejail --ignore=quiet gnome-calculator"
70}
71expect {
72 timeout {puts "TESTING ERROR 6.1\n";exit}
73 "CapBnd:"
74}
75expect {
76 timeout {puts "TESTING ERROR 6.2\n";exit}
77 "0000000000000000"
78}
79expect {
80 timeout {puts "TESTING ERROR 6.3\n";exit}
81 "name=blablabla"
82}
83after 100
84
85puts "\nall done\n"