aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/hostname.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/hostname.exp')
-rwxr-xr-xtest/network/hostname.exp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/network/hostname.exp b/test/network/hostname.exp
new file mode 100755
index 000000000..73d06725f
--- /dev/null
+++ b/test/network/hostname.exp
@@ -0,0 +1,29 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --hostname=bingo --noprofile\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17send -- "ping -c 3 bingo; echo done\r"
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 "3 packets transmitted, 3 received"
21}
22expect {
23 timeout {puts "TESTING ERROR 3\n";exit}
24 "done"
25}
26send -- "exit\r"
27after 100
28
29puts "all done\n"