#!/usr/bin/expect -f set timeout 10 spawn $env(SHELL) match_max 100000 #************************************************************** send -- "firejail --noprofile --private-home=.mozilla,.config/firejail\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { timeout {puts "TESTING ERROR 0.1\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 0.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { timeout {puts "TESTING ERROR 0.3\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 0.4\n";exit} ".config/firejail" } sleep 1 puts "\n" send -- "exit\r" sleep 2 #************************************************************** send -- "firejail --profile=private-keep.profile\r" expect { timeout {puts "TESTING ERROR 1.0\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { timeout {puts "TESTING ERROR 1.1\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 1.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { timeout {puts "TESTING ERROR 1.3\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 1.4\n";exit} ".config/firejail" } sleep 1 puts "\n" send -- "exit\r" sleep 2 #************************************************************** send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r" expect { timeout {puts "TESTING ERROR 2\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { timeout {puts "TESTING ERROR 2.1\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 2.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { timeout {puts "TESTING ERROR 2.3\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 2.4\n";exit} ".config/firejail" } sleep 1 puts "\n" send -- "exit\r" sleep 2 #************************************************************** send -- "firejail --noprofile --private-home=~/.mozilla,~/.config/firejail\r" expect { timeout {puts "TESTING ERROR 3\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { timeout {puts "TESTING ERROR 3.1\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 3.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { timeout {puts "TESTING ERROR 3.3\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 3.4\n";exit} ".config/firejail" } sleep 1 puts "\n" send -- "exit\r" sleep 2 #************************************************************** send -- "firejail --noprofile --private-home=/home/netblue/.mozilla,/home/netblue/.config/firejail\r" expect { timeout {puts "TESTING ERROR 4\n";exit} "Child process initialized" } sleep 1 send -- "ls -al\r" expect { timeout {puts "TESTING ERROR 4.1\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 4.2\n";exit} ".mozilla" } sleep 1 send -- "find .config\r" expect { timeout {puts "TESTING ERROR 4.3\n";exit} ".config" } expect { timeout {puts "TESTING ERROR 4.4\n";exit} ".config/firejail" } sleep 1 puts "\n" send -- "exit\r" sleep 2 #************************************************************** send -- "firejail --noprofile --private-home=/home/netblue/../netblue/.mozilla,/home/netblue/.config/firejail\r" expect { timeout {puts "TESTING ERROR 5\n";exit} "Error: invalid private-home list" } sleep 1 #************************************************************** send -- "firejail --noprofile --private-home=/root\r" expect { timeout {puts "TESTING ERROR 6\n";exit} "Error: only files or directories created by the current user are allowed" } sleep 1 puts "all done\n"