+function test_jul_filter_loglevel()
+{
+ local BOGUS_EVENT_NAME="not_a_real_event"
+ local FILTER="int_loglevel > 700 || int_loglevel < 700"
+ local ALL_EVENTS="."
+
+ diag "Test JUL a filter with a loglevel"
+
+ create_lttng_session $SESSION_NAME $TRACE_PATH/$SESSION_NAME
+ # Enable an event with a filter and the loglevel-only option.
+ enable_jul_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" JUL_CONFIG
+ disable_jul_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME
+ enable_jul_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" JUL_CONFIG
+ start_lttng_tracing $SESSION_NAME
+
+ # Run 5 times with a 1 second delay and fire second TP.
+ run_app 0 1
+
+ stop_lttng_tracing $SESSION_NAME
+ destroy_lttng_session $SESSION_NAME
+
+ # Validate test. Expecting no events.
+ trace_match_only $ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME
+ if [ $? -ne 0 ]; then
+ return $?
+ fi
+}
+