X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fjava-jul%2Ftest_java_jul;h=a9dd235cce54d0ec7f4caaf7507418b180e112d1;hb=993ae90ddf956c573c1da463adbd21333bee9106;hp=a91904af4b28f1323a9f5a04aad4e2d97d2c4151;hpb=e8949acb63b92ddb19b13417b7bf1ea36bb4908c;p=lttng-tools.git diff --git a/tests/regression/ust/java-jul/test_java_jul b/tests/regression/ust/java-jul/test_java_jul index a91904af4..a9dd235cc 100755 --- a/tests/regression/ust/java-jul/test_java_jul +++ b/tests/regression/ust/java-jul/test_java_jul @@ -78,9 +78,12 @@ function test_jul_before_start () # Run 5 times with a 1 second delay run_app + #FIXME: racy missing synchronization + start_lttng_tracing $SESSION_NAME - wait_apps + # Wait for the applications started in background + wait stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME @@ -296,7 +299,8 @@ function test_jul_destroy_session() # Run 5 times with a 1 second delay run_app 0 1 - sleep 1 + # Wait for the applications started in background + wait stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME @@ -311,7 +315,11 @@ function test_jul_destroy_session() enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2 start_lttng_tracing $SESSION_NAME - wait_apps + # Run 5 times with a 1 second delay + run_app_background 0 1 + + # Wait for the applications started in background + wait stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME @@ -323,6 +331,31 @@ function test_jul_destroy_session() fi } +function test_jul_disable() +{ + diag "Test JUL disable event" + + create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME + # Enable all event with a filter. + enable_jul_lttng_event $SESSION_NAME $EVENT_NAME + enable_jul_lttng_event $SESSION_NAME $EVENT_NAME2 + disable_jul_lttng_event $SESSION_NAME $EVENT_NAME + start_lttng_tracing $SESSION_NAME + + # Fire second TP but not the finest one. + run_app 0 1 + wait_apps + + stop_lttng_tracing $SESSION_NAME + destroy_lttng_session $SESSION_NAME + + # Validate test. Expecting one event of the second TP only. + trace_match_only $EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME + if [ $? -ne 0 ]; then + return $? + fi +} + plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" @@ -338,6 +371,7 @@ skip $withapp "JUL support is needed. Skipping all tests." $NUM_TESTS || start_lttng_sessiond tests=( + test_jul_disable test_jul_multi_session_loglevel test_jul_destroy_session test_jul_loglevel @@ -355,7 +389,7 @@ skip $withapp "JUL support is needed. Skipping all tests." $NUM_TESTS || if [ $? -ne 0 ]; then break; fi - rm -rf $TRACE_PATH + #rm -rf $TRACE_PATH done stop_lttng_sessiond