aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-14 07:53:22 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-14 07:53:22 -0500
commit745742f17378cde52591c1aa8e112445022abb2d (patch)
treeefc2e0bd25435a5ba89d6db2d3bd6981270ed6ea /test
parenttesting (diff)
downloadfirejail-745742f17378cde52591c1aa8e112445022abb2d.tar.gz
firejail-745742f17378cde52591c1aa8e112445022abb2d.tar.zst
firejail-745742f17378cde52591c1aa8e112445022abb2d.zip
cleanup
Diffstat (limited to 'test')
-rwxr-xr-xtest/rlimit/rlimit.sh14
-rwxr-xr-xtest/root/private.exp33
2 files changed, 47 insertions, 0 deletions
diff --git a/test/rlimit/rlimit.sh b/test/rlimit/rlimit.sh
new file mode 100755
index 000000000..d85497176
--- /dev/null
+++ b/test/rlimit/rlimit.sh
@@ -0,0 +1,14 @@
1#!/bin/bash
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8
9echo "TESTING: rlimit (test/rlimit/rlimit.exp)"
10./rlimit.exp
11
12echo "TESTING: rlimit profile (test/rlimit/rlimit-profile.exp)"
13./rlimit-profile.exp
14
diff --git a/test/root/private.exp b/test/root/private.exp
new file mode 100755
index 000000000..4040081ee
--- /dev/null
+++ b/test/root/private.exp
@@ -0,0 +1,33 @@
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 --private\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 2
16
17send -- "ls -l /home\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "total 0"
21}
22after 100
23
24send -- "ls -l /root\r"
25expect {
26 timeout {puts "TESTING ERROR 2\n";exit}
27 "total 0"
28}
29after 100
30
31send -- "exit\r"
32after 100
33puts "\nall done\n"