projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc/man/Makefile: Mimic mandb(5) path hierarchy
[lttng-tools.git]
/
tests
/
regression
/
tools
/
notification
/
test_notification_notifier_discarded_count
diff --git
a/tests/regression/tools/notification/test_notification_notifier_discarded_count
b/tests/regression/tools/notification/test_notification_notifier_discarded_count
index 9320140d354288007d3e36c984b308e5586b223e..1eb960d024b5d782dc16d6fddbdc7f97ad97294d 100755
(executable)
--- a/
tests/regression/tools/notification/test_notification_notifier_discarded_count
+++ b/
tests/regression/tools/notification/test_notification_notifier_discarded_count
@@
-7,14
+7,17
@@
CURDIR=$(dirname "$0")/
TESTDIR=$CURDIR/../../../
CURDIR=$(dirname "$0")/
TESTDIR=$CURDIR/../../../
-TMPDIR=$(mktemp -d)
+TEST_TMPDIR=$(mktemp -d -t tmp.test_notifier_discarded_count.XXXXXX)
+
+# Set TMPDIR for further call to mktemp
+export TMPDIR="$TEST_TMPDIR"
TESTAPP_PATH="$TESTDIR/utils/testapp"
TESTAPP_NAME="gen-ust-events"
TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
TESTAPP_PATH="$TESTDIR/utils/testapp"
TESTAPP_NAME="gen-ust-events"
TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
-TESTPOINT_BASE_PATH=$(readlink -f "$TMPDIR/lttng.t_p_n")
-TESTPOINT_PIPE_PATH=$(mktemp -u
"${TESTPOINT_BASE_PATH}
.XXXXXX")
+TESTPOINT_BASE_PATH=$(readlink -f "$T
EST_T
MPDIR/lttng.t_p_n")
+TESTPOINT_PIPE_PATH=$(mktemp -u
-t "lttng.t_p_n
.XXXXXX")
TESTPOINT=$(readlink -f "${CURDIR}/.libs/libpause_sessiond.so")
SH_TAP=1
TESTPOINT=$(readlink -f "${CURDIR}/.libs/libpause_sessiond.so")
SH_TAP=1
@@
-37,17
+40,17
@@
plan_tests $NUM_TESTS
function trigger_get_discarded_notif_number()
{
local trigger_name="$1"
function trigger_get_discarded_notif_number()
{
local trigger_name="$1"
- local list_triggers_stdout=$(mktemp -t
list_triggers_stdout.XXXXXX
)
+ local list_triggers_stdout=$(mktemp -t
"list_triggers_stdout.XXXXXX"
)
"$FULL_LTTNG_BIN" list-triggers > "$list_triggers_stdout"
"$FULL_LTTNG_BIN" list-triggers > "$list_triggers_stdout"
- cat "$list_triggers_stdout" | grep -
a7 "$trigger_name
" | tail -1 | grep --quiet "errors: none"
+ cat "$list_triggers_stdout" | grep -
A7 "$trigger_name" | grep -A2 "event rule matches
" | tail -1 | grep --quiet "errors: none"
ret=$?
if [ "$ret" -eq "0" ]; then
notif_nb="0"
else
ret=$?
if [ "$ret" -eq "0" ]; then
notif_nb="0"
else
- notif_nb=$(cat "$list_triggers_stdout" | grep -
a8 "$trigger_name" | tail -1 | grep "discarded tracer messages" | cut -d' ' -f8
)
+ notif_nb=$(cat "$list_triggers_stdout" | grep -
A7 "$trigger_name" | grep "discarded tracer messages" | cut -d' ' -f10
)
fi
rm -f "$list_triggers_stdout"
fi
rm -f "$list_triggers_stdout"
@@
-60,7
+63,7
@@
function test_kernel_notifier_discarded_count
{
local sessiond_pipe=()
local trigger_name="my_trigger"
{
local sessiond_pipe=()
local trigger_name="my_trigger"
- local list_triggers_stdout=$(mktemp -t
list_triggers_stdout.XXXXXX
)
+ local list_triggers_stdout=$(mktemp -t
"list_triggers_stdout.XXXXXX"
)
# Used on sessiond launch.
LTTNG_SESSIOND_ENV_VARS="LTTNG_TESTPOINT_ENABLE=1 \
# Used on sessiond launch.
LTTNG_SESSIOND_ENV_VARS="LTTNG_TESTPOINT_ENABLE=1 \
@@
-78,7
+81,7
@@
function test_kernel_notifier_discarded_count
done
lttng_add_trigger_ok "$trigger_name" \
done
lttng_add_trigger_ok "$trigger_name" \
- --condition event-rule-matches --
domain
=kernel --name=lttng_test_filter_event \
+ --condition event-rule-matches --
type
=kernel --name=lttng_test_filter_event \
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
@@
-107,7
+110,7
@@
function test_kernel_notifier_discarded_count
# Enable another notifier and list it to confirm the counter was cleared.
lttng_add_trigger_ok "$trigger_name" \
# Enable another notifier and list it to confirm the counter was cleared.
lttng_add_trigger_ok "$trigger_name" \
- --condition event-rule-matches --
domain
=kernel --name=lttng_test_filter_event \
+ --condition event-rule-matches --
type
=kernel --name=lttng_test_filter_event \
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
@@
-129,13
+132,13
@@
function test_kernel_notifier_discarded_count_max_bucket
diag "Kernel event notifer error counter bucket limit"
for i in $(seq 3); do
lttng_add_trigger_ok "$i" \
diag "Kernel event notifer error counter bucket limit"
for i in $(seq 3); do
lttng_add_trigger_ok "$i" \
- --condition event-rule-matches --
domain
=kernel --name=my_event_that_doesnt_need_to_really_exist_$i \
+ --condition event-rule-matches --
type
=kernel --name=my_event_that_doesnt_need_to_really_exist_$i \
--action notify
done
for i in $(seq 4 5); do
lttng_add_trigger_fail "$i" \
--action notify
done
for i in $(seq 4 5); do
lttng_add_trigger_fail "$i" \
- --condition event-rule-matches --
domain
=kernel --name=my_event_that_doesnt_need_to_really_exist_$i \
+ --condition event-rule-matches --
type
=kernel --name=my_event_that_doesnt_need_to_really_exist_$i \
--action notify
done
--action notify
done
@@
-180,7
+183,7
@@
function test_ust_notifier_discarded_count
done
lttng_add_trigger_ok "$trigger_name" \
done
lttng_add_trigger_ok "$trigger_name" \
- --condition event-rule-matches --
domain
=user --name=tp:tptest \
+ --condition event-rule-matches --
type
=user --name=tp:tptest \
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
@@
-206,7
+209,7
@@
function test_ust_notifier_discarded_count
# Enable another notifier and list it to confirm the counter was cleared.
lttng_add_trigger_ok "$trigger_name" \
# Enable another notifier and list it to confirm the counter was cleared.
lttng_add_trigger_ok "$trigger_name" \
- --condition event-rule-matches --
domain
=user --name=tp:tptest \
+ --condition event-rule-matches --
type
=user --name=tp:tptest \
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
--action notify
trigger_discarded_nb=$(trigger_get_discarded_notif_number "$trigger_name")
@@
-226,13
+229,13
@@
function test_ust_notifier_discarded_count_max_bucket
diag "UST event notifer error counter bucket limit"
for i in $(seq 3); do
lttng_add_trigger_ok "$i" \
diag "UST event notifer error counter bucket limit"
for i in $(seq 3); do
lttng_add_trigger_ok "$i" \
- --condition event-rule-matches --
domain
=user --name=my_event_that_doesnt_need_to_really_exist_$i \
+ --condition event-rule-matches --
type
=user --name=my_event_that_doesnt_need_to_really_exist_$i \
--action notify
done
for i in $(seq 4 5); do
lttng_add_trigger_fail "$i" \
--action notify
done
for i in $(seq 4 5); do
lttng_add_trigger_fail "$i" \
- --condition event-rule-matches --
domain
=user --name=my_event_that_doesnt_need_to_really_exist_$i \
+ --condition event-rule-matches --
type
=user --name=my_event_that_doesnt_need_to_really_exist_$i \
--action notify
done
--action notify
done
@@
-244,7
+247,7
@@
function test_ust_notifier_discarded_count_multi_uid
local sessiond_pipe=()
local root_trigger_name="root_trigger"
local user_trigger_name="user_trigger"
local sessiond_pipe=()
local root_trigger_name="root_trigger"
local user_trigger_name="user_trigger"
- local list_triggers_stdout=$(mktemp -t
list_triggers_stdout.XXXXXX
)
+ local list_triggers_stdout=$(mktemp -t
"list_triggers_stdout.XXXXXX"
)
local NR_USEC_WAIT=0
local PIPE_SIZE
local NR_ITER
local NR_USEC_WAIT=0
local PIPE_SIZE
local NR_ITER
@@
-284,11
+287,11
@@
function test_ust_notifier_discarded_count_multi_uid
done
lttng_add_trigger_ok "$root_trigger_name" \
done
lttng_add_trigger_ok "$root_trigger_name" \
- --condition
on-event --userspac
e tp:tptest \
+ --condition
event-rule-matches --type=user --nam
e tp:tptest \
--action notify
--action notify
- lttng_add_trigger_ok "$user_trigger_name" --
user-
id "$new_uid" \
- --condition
on-event --userspac
e tp:tptest \
+ lttng_add_trigger_ok "$user_trigger_name" --
owner-u
id "$new_uid" \
+ --condition
event-rule-matches --type=user --nam
e tp:tptest \
--action notify
# Stop consumption of notifier tracer notifications.
--action notify
# Stop consumption of notifier tracer notifications.
@@
-309,7
+312,7
@@
function test_ust_notifier_discarded_count_multi_uid
"User trigger discarded notifications number ($user_trigger_discarded_nb) is non-zero"
lttng_remove_trigger_ok "$root_trigger_name"
"User trigger discarded notifications number ($user_trigger_discarded_nb) is non-zero"
lttng_remove_trigger_ok "$root_trigger_name"
- lttng_remove_trigger_ok "$user_trigger_name" --
user-
id "$new_uid"
+ lttng_remove_trigger_ok "$user_trigger_name" --
owner-u
id "$new_uid"
stop_lttng_sessiond_notap
stop_lttng_sessiond_notap
@@
-324,7
+327,7
@@
function test_ust_notifier_discarded_regardless_trigger_owner
local sessiond_pipe=()
local root_trigger_name="root_trigger"
local user_trigger_name="user_trigger"
local sessiond_pipe=()
local root_trigger_name="root_trigger"
local user_trigger_name="user_trigger"
- local list_triggers_stdout=$(mktemp -t
list_triggers_stdout.XXXXXX
)
+ local list_triggers_stdout=$(mktemp -t
"list_triggers_stdout.XXXXXX"
)
local NR_USEC_WAIT=0
local PIPE_SIZE
local NR_ITER
local NR_USEC_WAIT=0
local PIPE_SIZE
local NR_ITER
@@
-364,7
+367,7
@@
function test_ust_notifier_discarded_regardless_trigger_owner
done
lttng_add_trigger_ok "$root_trigger_name" \
done
lttng_add_trigger_ok "$root_trigger_name" \
- --condition
on-event --userspac
e tp:tptest \
+ --condition
event-rule-matches --type=user --nam
e tp:tptest \
--action notify
# Stop consumption of notifier tracer notifications.
--action notify
# Stop consumption of notifier tracer notifications.
@@
-418,4
+421,4
@@
else
skip 0 "Root access is needed. Skipping all kernel notification tests." $KERNEL_NUM_TESTS
fi
skip 0 "Root access is needed. Skipping all kernel notification tests." $KERNEL_NUM_TESTS
fi
-rm -rf "$TMPDIR"
+rm -rf "$T
EST_T
MPDIR"
This page took
0.026841 seconds
and
4
git commands to generate.