X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=12dabc52ccd87a9bbd17372511186198fdcd0790;hb=bf6ae429bc7bf2fefdce61e48806768dab7567d5;hp=c3d8bd4d999edf6736715e20422d7e0044f8e76f;hpb=0fc2834cb1892927708c858baf0147f1cddd1219;p=lttng-tools.git diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index c3d8bd4d9..12dabc52c 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -27,6 +27,11 @@ KERNEL_MAJOR_VERSION=2 KERNEL_MINOR_VERSION=6 KERNEL_PATCHLEVEL_VERSION=27 +# We set the default UST register timeout to "wait forever", so that +# basic tests don't have to worry about hitting timeouts on busy +# systems. Specialized tests should test those corner-cases. +export LTTNG_UST_REGISTER_TIMEOUT=-1 + source $TESTDIR/utils/tap/tap.sh function print_ok () @@ -363,13 +368,13 @@ function create_lttng_session_no_output () function create_lttng_session () { - local sess_name=$1 - local trace_path=$2 - local expected_to_fail=$3 + local expected_to_fail=$1 + local sess_name=$2 + local trace_path=$3 $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $sess_name -o $trace_path > $OUTPUT_DEST ret=$? - if [[ $expected_to_fail ]]; then + if [[ $expected_to_fail -eq "1" ]]; then test "$ret" -ne "0" ok $? "Expected fail on session creation $sess_name in $trace_path" else @@ -377,6 +382,17 @@ function create_lttng_session () fi } +function create_lttng_session_ok () +{ + create_lttng_session 0 "$@" +} + +function create_lttng_session_fail () +{ + create_lttng_session 1 "$@" +} + + function enable_ust_lttng_channel() { local sess_name=$1