From 9672e30b24242ca67c11b8af9e78a0a8e7f99a3b Mon Sep 17 00:00:00 2001 From: smitsohu Date: Sun, 23 Jan 2022 12:42:58 +0100 Subject: testing --- test/environment/keep-fd-bad.exp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 test/environment/keep-fd-bad.exp (limited to 'test/environment/keep-fd-bad.exp') diff --git a/test/environment/keep-fd-bad.exp b/test/environment/keep-fd-bad.exp new file mode 100755 index 000000000..e8b411ea0 --- /dev/null +++ b/test/environment/keep-fd-bad.exp @@ -0,0 +1,40 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2022 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + + +send -- "firejail --noprofile --keep-fd=\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Error: invalid keep-fd option" +} +after 100 + +send -- "firejail --noprofile --keep-fd=,,,\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Error: invalid keep-fd option" +} +after 100 + +send -- "firejail --noprofile --keep-fd=dall\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Error: invalid keep-fd option" +} +after 100 + +send -- "firejail --noprofile --keep-fd=6,7,8,10b,11\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "Error: invalid keep-fd option" +} +after 100 + + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2