Commit ba4713d3 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm.sh: don't allow anyone to print on stdout

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b9466e81
#!/bin/bash #!/bin/bash
# duplicate stdout into 3
exec 3<&1
# duplicate stderr into stdout
exec 1>&2
ARCH=`uname -m | sed \ ARCH=`uname -m | sed \
-e s/i.86/i386/ \ -e s/i.86/i386/ \
-e s/sun4u/sparc64/ \ -e s/sun4u/sparc64/ \
...@@ -541,7 +546,13 @@ start_test() ...@@ -541,7 +546,13 @@ start_test()
rm -f $ZDTM_PIDFILE rm -f $ZDTM_PIDFILE
fi fi
if ! make -C $tdir $tname.pid; then (
# Here is no way to set FD_CLOEXEC on 3
exec 3>&-
make -C $tdir $tname.pid
)
if [ $? -ne 0 ]; then
echo ERROR: fail to start $test echo ERROR: fail to start $test
return 1 return 1
fi fi
...@@ -1025,7 +1036,7 @@ while :; do ...@@ -1025,7 +1036,7 @@ while :; do
shift shift
;; ;;
-l) -l)
echo $TEST_LIST | tr ' ' '\n' echo $TEST_LIST | tr ' ' '\n' >&3
exit 0 exit 0
;; ;;
-v) -v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment