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 ()
fi
DIR=$(readlink -f $TESTDIR)
+ : ${LTTNG_SESSION_CONFIG_XSD_PATH=${DIR}/../src/common/config/}
+ export LTTNG_SESSION_CONFIG_XSD_PATH
if [ -z $(pidof lt-$SESSIOND_BIN) ]; then
$DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd"
- #$DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --verbose-consumer >>/tmp/sessiond.log 2>&1 &
+ #$DIR/../src/bin/lttng-sessiond/$SESSIOND_BIN --background --consumerd32-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --consumerd64-path="$DIR/../src/bin/lttng-consumerd/lttng-consumerd" --verbose-consumer >>/tmp/sessiond.log 2>&1
status=$?
ok $status "Start session daemon"
fi
ok $? "Disable event $event_name for session $sess_name"
}
+function disable_jul_lttng_event ()
+{
+ local sess_name="$1"
+ local event_name="$2"
+
+ $TESTDIR/../src/bin/lttng/$LTTNG_BIN disable-event "$event_name" -s $sess_name -j >/dev/null 2>&1
+ ok $? "Disable JUL event $event_name for session $sess_name"
+}
+
function start_lttng_tracing ()
{
sess_name=$1
IFS=$OLDIFS
return $ret
}
+
+function trace_match_only()
+{
+ local event_name=$1
+ local nr_iter=$2
+ local trace_path=$3
+
+ which $BABELTRACE_BIN >/dev/null
+ skip $? -ne 0 "Babeltrace binary not found. Skipping trace matches"
+
+ local count=$($BABELTRACE_BIN $trace_path | grep $event_name | wc -l)
+ local total=$($BABELTRACE_BIN $trace_path | wc -l)
+
+ if [ "$nr_iter" -eq "$count" ] && [ "$total" -eq "$nr_iter" ]; then
+ pass "Trace match with $total event $event_name"
+ else
+ fail "Trace match"
+ diag "$total event(s) found, expecting $nr_iter of event $event_name and only found $count"
+ fi
+}