From 1126db20f0c184a2c37fbdb56858aff12379e766 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 9 Feb 2016 11:34:51 -0500 Subject: chroot testing --- test/chroot-resolvconf.exp | 14 ++++++++++++++ test/test-root.sh | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100755 test/chroot-resolvconf.exp (limited to 'test') diff --git a/test/chroot-resolvconf.exp b/test/chroot-resolvconf.exp new file mode 100755 index 000000000..2d0da2fb0 --- /dev/null +++ b/test/chroot-resolvconf.exp @@ -0,0 +1,14 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --chroot=/tmp/chroot /bin/bash\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "invalid /tmp/chroot/etc/resolv.conf file" +} + +puts "\nall done\n" + diff --git a/test/test-root.sh b/test/test-root.sh index ee3b7aeb2..c5441037b 100755 --- a/test/test-root.sh +++ b/test/test-root.sh @@ -72,3 +72,10 @@ then echo "TESTING: firemon --cgroup" ./firemon-cgroup.exp fi + +echo "TESTING: chroot resolv.conf" +rm -f tmpfile +touch tmpfile +ln -s tmp /tmp/chroot/etc/resolv.conf +./chroot-resolvconf.exp +rm -f tmpfile \ No newline at end of file -- cgit v1.2.3-54-g00ecf