3 echo "### These tests requires VirtualBox running with the following images"
8 SSHLOGIN1
=$SSHUSER1@
$SERVER1
9 # server with shellshock hardened bash
12 export SSHLOGIN2
=$SSHUSER2@
$SERVER2
14 stdout
ping -w 1 -c 1 centos3
>/dev
/null ||
(
15 # Vagrant does not set the IP addr
16 cd testsuite
/vagrant
/tange
/centos
3/ 2>/dev
/null
17 cd vagrant
/tange
/centos
3/ 2>/dev
/null
18 cd ..
/vagrant
/tange
/centos
3/ 2>/dev
/null
19 stdout vagrant up
>/dev
/null
20 vagrant
ssh -c 'sudo ifconfig eth1 172.27.27.3'
23 # Copy binaries to server
24 cd testsuite
/vagrant
/tange
/centos
3/ 2>/dev
/null
25 cd vagrant
/tange
/centos
3/ 2>/dev
/null
26 cd ..
/vagrant
/tange
/centos
3/ 2>/dev
/null
28 scp
-q .
*/src
/{parallel
,sem
,sql
,niceload
,env_parallel
*} $SSHLOGIN1:bin
/
29 ssh $SSHLOGIN1 'touch .parallel/will-cite; mkdir -p bin'
30 # Allow login from centos3 to $SSHLOGIN2 (that is shellshock hardened)
31 ssh $SSHLOGIN1 cat .ssh
/id_rsa.pub |
ssh $SSHLOGIN2 'cat >>.ssh/authorized_keys'
32 ssh $SSHLOGIN1 'cat .ssh/id_rsa.pub >>.ssh/authorized_keys; chmod 600 .ssh/authorized_keys'
33 ssh $SSHLOGIN1 'ssh -o StrictHostKeyChecking=no localhost true; ssh -o StrictHostKeyChecking=no '$SSHLOGIN2' true;'
36 .
`which env_parallel.bash`
37 env_parallel
--session
39 par_shellshock_bug
() {
40 bash
-c 'echo bug \#43358: shellshock breaks exporting functions using --env name;
41 echo Non-shellshock-hardened to non-shellshock-hardened;
42 funky() { echo Function $1; };
44 PARALLEL_SHELL=bash parallel --env funky -S localhost funky ::: non-shellshock-hardened'
46 bash
-c 'echo bug \#43358: shellshock breaks exporting functions using --env name;
47 echo Non-shellshock-hardened to shellshock-hardened;
48 funky() { echo Function $1; };
50 PARALLEL_SHELL=bash parallel --env funky -S '$SSHLOGIN2' funky ::: shellshock-hardened'
53 # As the copied environment is written in Bash dialect
54 # we get 'shopt'-errors and 'declare'-errors.
55 # We can safely ignore those.
58 env_parallel
--env par_shellshock_bug
--env LC_ALL
--env SSHLOGIN2
--env _ \
59 -vj9 -k --joblog /tmp
/jl-
`basename $0` --retries 3 \
60 -S $SSHLOGIN1 --tag '{} 2>&1' \
61 ::: $
(compgen
-A function |
grep par_ |
sort) \
62 2> >(grep -Ev 'shopt: not found|declare: not found|No xauth data')