Commit d30ae468 authored by netblue30's avatar netblue30

testing

parent 1c539a83
......@@ -147,7 +147,7 @@ uninstall:
rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg
DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES"
DISTFILES_TEST = "test/rlimit test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils"
DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils"
dist:
mv config.status config.status.old
......@@ -225,13 +225,10 @@ test-arguments:
test-fs:
cd test/fs; ./fs.sh | grep TESTING
test-rlimit:
cd test/rlimit; ./rlimit.sh | grep TESTING
test-fcopy:
cd test/fcopy; ./fcopy.sh | grep TESTING
test: test-profiles test-fcopy test-fs test-utils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments test-rlimit
test: test-profiles test-fcopy test-fs test-utils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments
echo "TEST COMPLETE"
##########################################
......
......@@ -95,4 +95,19 @@ if [ "$?" -eq 0 ];
then
echo "TESTING: ibus (test/environment/ibus.exp)"
./ibus.exp
else
echo "TESTING SKIP: ibus not configured"
fi
echo "TESTING: rlimit (test/rlimit/rlimit.exp)"
./rlimit.exp
echo "TESTING: rlimit profile (test/rlimit/rlimit-profile.exp)"
./rlimit-profile.exp
echo "TESTING: rlimit errors (test/rlimit/rlimit-bad.exp)"
./rlimit-bad.exp
echo "TESTING: rlimit errors profile (test/rlimit/rlimit-bad-profile.exp)"
./rlimit-bad-profile.exp
#!/usr/bin/expect -f
set timeout 10
spawn $env(SHELL)
match_max 100000
send -- "firejail --profile=rlimit-bad1.profile\r"
expect {
timeout {puts "TESTING ERROR 4\n";exit}
"Invalid rlimit option"
}
after 100
send -- "firejail --profile=rlimit-bad2.profile\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
"Invalid rlimit option"
}
after 100
send -- "firejail --profile=rlimit-bad3.profile\r"
expect {
timeout {puts "TESTING ERROR 6\n";exit}
"Invalid rlimit option"
}
after 100
send -- "firejail --profile=rlimit-bad4.profile\r"
expect {
timeout {puts "TESTING ERROR 7\n";exit}
"Invalid rlimit option"
}
after 100
puts "\nall done\n"
#!/usr/bin/expect -f
set timeout 10
spawn $env(SHELL)
match_max 100000
send -- "firejail --rlimit-fsize=-1024\r"
expect {
timeout {puts "TESTING ERROR 0\n";exit}
"invalid rlimt fsize"
}
after 100
send -- "firejail --rlimit-nofile=asdf\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"invalid rlimt nofile"
}
after 100
send -- "firejail --rlimit-nproc=100.23\r"
expect {
timeout {puts "TESTING ERROR 2\n";exit}
"invalid rlimt nproc"
}
after 100
send -- "firejail --rlimit-sigpending=2345-78\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
"invalid rlimt sigpending"
}
after 100
puts "\nall done\n"
rlimit-sigpending 67asd56
\ No newline at end of file
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2016 Firejail Authors
# License GPL v2
export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
echo "TESTING: rlimit (test/rlimit/rlimit.exp)"
./rlimit.exp
echo "TESTING: rlimit profile (test/rlimit/rlimit-profile.exp)"
./rlimit-profile.exp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment