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 ()
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
fi
}
-function enable_ust_lttng_channel()
+function create_lttng_session_ok ()
{
- local sess_name=$1
- local channel_name=$2
- local expect_fail=$3
+ create_lttng_session 0 "$@"
+}
+
+function create_lttng_session_fail ()
+{
+ create_lttng_session 1 "$@"
+}
+
+
+function enable_ust_lttng_channel ()
+{
+ local expect_fail=$1
+ local sess_name=$2
+ local channel_name=$3
$TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-channel -u $channel_name -s $sess_name >$OUTPUT_DEST
ret=$?
- if [[ $expect_fail ]]; then
+ if [[ $expect_fail -eq "1" ]]; then
test "$ret" -ne "0"
ok $? "Expected fail on ust channel creation $channel_name in $sess_name"
else
fi
}
+function enable_ust_lttng_channel_ok ()
+{
+ enable_ust_lttng_channel 0 "$@"
+}
+
+function enable_ust_lttng_channel_fail ()
+{
+ enable_ust_lttng_channel 1 "$@"
+}
+
function disable_ust_lttng_channel()
{
local sess_name=$1