projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Tests that assume CPU 0 is present
[lttng-tools.git]
/
tests
/
regression
/
ust
/
blocking
/
test_blocking
diff --git
a/tests/regression/ust/blocking/test_blocking
b/tests/regression/ust/blocking/test_blocking
index abd50d45938ee2625746211bc38291b056d6e170..751b3453b50d7e264e6dd411b96407389931bf1c 100755
(executable)
--- a/
tests/regression/ust/blocking/test_blocking
+++ b/
tests/regression/ust/blocking/test_blocking
@@
-19,13
+19,14
@@
EVENT_NAME="tp:tptest"
NUM_TESTS=49
NUM_TESTS=49
-source $TESTDIR/utils/utils.sh
+# shellcheck source=../utils/utils.sh
+source "$TESTDIR/utils/utils.sh"
# MUST set TESTDIR before calling those functions
# MUST set TESTDIR before calling those functions
-# Run app on
CPU 0
to ensure we only write in a single ring buffer.
+# Run app on
a single CPU
to ensure we only write in a single ring buffer.
function run_app()
{
function run_app()
{
- taskset
0x00000001
$TESTAPP_BIN -i $NUM_EVENT
+ taskset
--cpu-list "$(get_any_available_cpu)"
$TESTAPP_BIN -i $NUM_EVENT
ok $? "Application done"
}
ok $? "Application done"
}
@@
-123,7
+124,7
@@
function test_ust_blocking_no_discard()
destroy_lttng_session_ok $SESSION_NAME
stop_lttng_sessiond
destroy_lttng_session_ok $SESSION_NAME
stop_lttng_sessiond
- nr_events=$(
babeltrace
$TRACE_PATH 2>/dev/null | wc -l)
+ nr_events=$(
"$BABELTRACE_BIN"
$TRACE_PATH 2>/dev/null | wc -l)
test $nr_events -eq $NUM_EVENT
ok $? "No event lost with UST blocking mode: found $nr_events expect $NUM_EVENT"
test $nr_events -eq $NUM_EVENT
ok $? "No event lost with UST blocking mode: found $nr_events expect $NUM_EVENT"
@@
-133,6
+134,8
@@
plan_tests $NUM_TESTS
print_test_banner "$TEST_DESC"
print_test_banner "$TEST_DESC"
+bail_out_if_no_babeltrace
+
TESTS=(
"test_ust_implicit_no_blocking"
"test_ust_implicit_no_blocking_with_channel_blocking"
TESTS=(
"test_ust_implicit_no_blocking"
"test_ust_implicit_no_blocking_with_channel_blocking"
@@
-146,7
+149,7
@@
i=0
while [ "$i" -lt "$TEST_COUNT" ]; do
while [ "$i" -lt "$TEST_COUNT" ]; do
- TRACE_PATH=$(mktemp -d)
+ TRACE_PATH=$(mktemp -d
-t tmp.test_blocking_ust_trace_path.XXXXXX
)
# Execute test
${TESTS[$i]}
# Execute test
${TESTS[$i]}
This page took
0.024065 seconds
and
4
git commands to generate.