From 495f1c5cdaeeadafcf150080545ae4848dc633ca Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 21 Aug 2017 08:51:08 -0400 Subject: testing --- test/filters/seccomp-debug-32.exp | 145 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100755 test/filters/seccomp-debug-32.exp (limited to 'test/filters/seccomp-debug-32.exp') diff --git a/test/filters/seccomp-debug-32.exp b/test/filters/seccomp-debug-32.exp new file mode 100755 index 000000000..6983758c3 --- /dev/null +++ b/test/filters/seccomp-debug-32.exp @@ -0,0 +1,145 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2017 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --debug sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "SECCOMP Filter" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "BLACKLIST" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "open_by_handle_at" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "done" +} +after 100 + + +# i686 architecture +send -- "firejail --debug sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 6\n";exit} + "Installing /run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 7\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 9\n";exit} + "done" +} +after 100 + +# i686 architecture - ignore seccomp +send -- "firejail --debug --ignore=seccomp sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 10\n";exit} + "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 12\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 13\n";exit} + "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 14\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 15\n";exit} + "done" +} +after 100 + +# i686 architecture - ignore protocol +send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 17\n";exit} + "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 19\n";exit} + "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 20\n";exit} + "Installing /run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 21\n";exit} + "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 22\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 23\n";exit} + "done" +} +after 100 + +# memory-deny-write-execute +send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 24\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 25\n";exit} + "Installing /run/firejail/mnt/seccomp.mdwx seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 26\n";exit} + "done" +} + + +# i686 architecture - seccomp.block-secondary +send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 27\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 28\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 29\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 30\n";exit} + "Installing /run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 33\n";exit} + "done" +} +after 100 + +# i686 architecture - seccomp.block-secondary, profile +send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\r" +expect { + timeout {puts "TESTING ERROR 33\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 34\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 35\n";exit} + "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 35\n";exit} + "Installing /run/firejail/mnt/seccomp seccomp filter" +} +expect { + timeout {puts "TESTING ERROR 37\n";exit} + "done" +} +after 100 + +puts "all done\n" -- cgit v1.2.3-70-g09d2