From 38276c9c64c8a0e086f2fb84402c5105c1483216 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Thu, 12 Apr 2018 12:45:43 -0400 Subject: cleanup seccomp run files --- test/filters/seccomp-run-files.exp | 98 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100755 test/filters/seccomp-run-files.exp (limited to 'test/filters/seccomp-run-files.exp') diff --git a/test/filters/seccomp-run-files.exp b/test/filters/seccomp-run-files.exp new file mode 100755 index 000000000..a72b9aef7 --- /dev/null +++ b/test/filters/seccomp-run-files.exp @@ -0,0 +1,98 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2018 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --debug\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "/run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "/run/firejail/mnt/seccomp.32 seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "/run/firejail/mnt/seccomp.protocol seccomp filter" +} +after 100 +send -- "ls -l /run/firejail/mnt | grep seccomp | wc -l\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "4" +} +send -- "exit\r" +sleep 1 + +send -- "firejail --ignore=seccomp --debug\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "/run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 5\n";exit} + "/run/firejail/mnt/seccomp.32 seccomp filter" {puts "TESTING ERROR 6\n";exit} + "/run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 7\n";exit} + "/run/firejail/mnt/seccomp.protocol seccomp filter" +} +after 100 +send -- "ls -l /run/firejail/mnt | grep seccomp | wc -l\r" +expect { + timeout {puts "TESTING ERROR 8\n";exit} + "1" +} +send -- "exit\r" +sleep 1 + +send -- "firejail --ignore=protocol --debug\r" +expect { + timeout {puts "TESTING ERROR 9\n";exit} + "/run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 10\n";exit} + "/run/firejail/mnt/seccomp.32 seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 11\n";exit} + "/run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 12\n";exit} + "monitoring" +} +after 100 +send -- "ls -l /run/firejail/mnt | grep seccomp | wc -l\r" +expect { + timeout {puts "TESTING ERROR 13\n";exit} + "3" +} +send -- "exit\r" +sleep 1 + +send -- "firejail --memory-deny-write-execute --debug\r" +expect { + timeout {puts "TESTING ERROR 14\n";exit} + "/run/firejail/mnt/seccomp.mdwx seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 15\n";exit} + "/run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 16\n";exit} + "/run/firejail/mnt/seccomp.32 seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 17\n";exit} + "/run/firejail/mnt/seccomp.protocol seccomp filter" +} +after 100 +send -- "ls -l /run/firejail/mnt | grep seccomp | wc -l\r" +expect { + timeout {puts "TESTING ERROR 18\n";exit} + "5" +} +send -- "exit\r" +sleep 1 + +puts "all done\n" -- cgit v1.2.3-54-g00ecf