X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fgetcpu-override%2Ftest_getcpu_override;h=d4066e4aaea7fef10a895061b39dc0459b7e5e95;hp=4ca385aeb0c5e19f58136af4c979498eb8a86963;hb=6c4a91d639747f260ab46decebc50998ef063712;hpb=f37e092d5360510f2975ea5bd0ae69084ae17691 diff --git a/tests/regression/ust/getcpu-override/test_getcpu_override b/tests/regression/ust/getcpu-override/test_getcpu_override index 4ca385aeb..d4066e4aa 100755 --- a/tests/regression/ust/getcpu-override/test_getcpu_override +++ b/tests/regression/ust/getcpu-override/test_getcpu_override @@ -55,14 +55,14 @@ num_cpus=$(conf_proc_count) run_app() { diag "Launching app without getcpu-plugin wrapper" - $TESTAPP_BIN $NUM_EVENT $EVENT_WAIT_USEC + $TESTAPP_BIN -i $NUM_EVENT -w $EVENT_WAIT_USEC ok $? "Application without wrapper done" } run_getcpu_plugin_app() { diag "Launching app with getcpu-plugin wrapper" - $CURDIR/$TESTAPP_WRAPPER $TESTAPP_BIN $NUM_EVENT $EVENT_WAIT_USEC + $CURDIR/$TESTAPP_WRAPPER $TESTAPP_BIN -i $NUM_EVENT -w $EVENT_WAIT_USEC ok $? "Application with wrapper done" } @@ -157,13 +157,19 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" -if [ -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then - foundobj=1 -else - foundobj=0 +if [ ! -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then + skip 0 "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0 +fi + +if [ "$num_cpus" -eq "1" ]; then + # Skip the test since we cannot perform it as designed since N mod 1 + # is always equals to zero. There is no point testing this on a system + # with a single configured core. LTTng-UST limits the get_cpu function + # to return value inside the [0, NUM_CPU - 1] range for a valid event + # (present in trace). + skip 0 "Test system only have a single thread. Skipping all tests." $NUM_TESTS && exit 0 fi -skip $foundobj "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0 TESTS=( test_getcpu_override_fail