ns1="ns1-$rndh"
ns2="ns2-$rndh"
ret=0
+_printf() {
+ stdbuf -o0 -e0 printf "${@}"
+}
print_title()
{
- stdbuf -o0 -e0 printf "INFO: %s\n" "${1}"
+ _printf "INFO: %s\n" "${1}"
}
# $1: test name
print_test()
{
- stdbuf -o0 -e0 printf "%-63s" "${1}"
+ _printf "%-63s" "${1}"
}
print_results()
{
- stdbuf -o0 -e0 printf "[%s]\n" "${1}"
+ _printf "[%s]\n" "${1}"
}
test_pass()
ret=1
if [ -n "${1}" ]; then
- stdbuf -o0 -e0 printf "\t%s\n" "${1}"
+ _printf "\t%s\n" "${1}"
fi
}
rm -rf $file $client_evts $server_evts
- stdbuf -o0 -e0 printf "Done\n"
+ _printf "Done\n"
}
trap cleanup EXIT
test_fail
fi
- stdbuf -o0 -e0 printf "\tExpected value for '%s': '%s', got '%s'.\n" \
+ _printf "\tExpected value for '%s': '%s', got '%s'.\n" \
"${var}" "${!exp}" "${!var}"
return 1
}