From 6ae4d342bdc0b11ae6966bd83a596d6ae77a7a5f Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 29 Oct 2017 16:05:23 -0400 Subject: --timeout testing and fixes (#1614) --- test/environment/timeout.exp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/environment/timeout.exp (limited to 'test/environment/timeout.exp') diff --git a/test/environment/timeout.exp b/test/environment/timeout.exp new file mode 100755 index 000000000..ac29c57ba --- /dev/null +++ b/test/environment/timeout.exp @@ -0,0 +1,31 @@ +#!/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 -- "time firejail --timeout=00:00:05\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +sleep 3 +send -- "env\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "container=firejail" +} + +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "m5." {puts "5 seconds"} + "m6." {puts "6 seconds"} + "m7." {puts "7 seconds"} +} + +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf