lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] [PATCH lttng-tools] Fix: test code assumes that child process is schedule to run before parent
@ 2021-04-01 16:37 Anders Wallin via lttng-dev
  2021-04-07 15:31 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 1 reply; 17+ messages in thread
From: Anders Wallin via lttng-dev @ 2021-04-01 16:37 UTC (permalink / raw)
  To: lttng-dev

the following tests fails
- test_event_vpid_tracker ust 0 "${EVENT_NAME}"
- test_event_vpid_track_untrack ust 0 "${EVENT_NAME}"
- test_event_pid_tracker ust 0 "${EVENT_NAME}"
- test_event_pid_track_untrack ust 0 "${EVENT_NAME}"

Signed-off-by: Anders Wallin <wallinux@gmail.com>
---
 tests/regression/tools/tracker/test_event_tracker | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
index 711690af..78e9310b 100755
--- a/tests/regression/tools/tracker/test_event_tracker
+++ b/tests/regression/tools/tracker/test_event_tracker
@@ -5,7 +5,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-only
 
-TEST_DESC="LTTng - Event traker test"
+TEST_DESC="LTTng - Event tracker test"
 
 CURDIR=$(dirname "$0")/
 TESTDIR="$CURDIR/../../.."
@@ -30,27 +30,24 @@ SCRIPT_GROUPNAME="$(id -gn)"
 
 CHILD_PID=-1
 WAIT_PATH=
-AFTER_FIRST_PATH=
-BEFORE_LAST_PATH=
+BEFORE_FIRST_PATH=
 
 source $TESTDIR/utils/utils.sh
 
 function prepare_ust_app
 {
-	AFTER_FIRST_PATH=$(mktemp -u)
-	BEFORE_LAST_PATH=$(mktemp -u)
+	BEFORE_FIRST_PATH=$(mktemp -u)
 
-	$TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b "$BEFORE_LAST_PATH" &
+	$TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT --sync-before-first-event "$BEFORE_FIRST_PATH" &
 	CHILD_PID=$!
 }
 
 function trace_ust_app
 {
-	touch "$BEFORE_LAST_PATH"
+	touch "$BEFORE_FIRST_PATH"
 	wait
 	ok $? "Traced application stopped."
-	rm "$BEFORE_LAST_PATH"
-	rm "$AFTER_FIRST_PATH"
+	rm "$BEFORE_FIRST_PATH"
 }
 
 function prepare_kernel_app
-- 
2.31.1

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [lttng-dev] [PATCH lttng-tools] Fix: test code assumes that child process is schedule to run before parent
@ 2021-04-09 14:41 Anders Wallin via lttng-dev
  2021-04-09 19:12 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 1 reply; 17+ messages in thread
From: Anders Wallin via lttng-dev @ 2021-04-09 14:41 UTC (permalink / raw)
  To: lttng-dev

the following tests fails on arm64
- test_event_vpid_tracker ust 0 "${EVENT_NAME}"
- test_event_vpid_track_untrack ust 0 "${EVENT_NAME}"
- test_event_pid_tracker ust 0 "${EVENT_NAME}"
- test_event_pid_track_untrack ust 0 "${EVENT_NAME}"

Signed-off-by: Anders Wallin <wallinux@gmail.com>
---
 .../tools/tracker/test_event_tracker           | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
index 711690af..7f7d68da 100755
--- a/tests/regression/tools/tracker/test_event_tracker
+++ b/tests/regression/tools/tracker/test_event_tracker
@@ -5,7 +5,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-only
 
-TEST_DESC="LTTng - Event traker test"
+TEST_DESC="LTTng - Event tracker test"
 
 CURDIR=$(dirname "$0")/
 TESTDIR="$CURDIR/../../.."
@@ -17,8 +17,8 @@ TESTAPP_KERNEL_BIN="$TESTAPP_PATH/$TESTAPP_KERNEL_NAME/$TESTAPP_KERNEL_NAME"
 SESSION_NAME="tracker"
 NR_ITER=100
 NUM_GLOBAL_TESTS=2
-NUM_UST_TESTS=283
-NUM_KERNEL_TESTS=462
+NUM_UST_TESTS=289
+NUM_KERNEL_TESTS=468
 NUM_TESTS=$((NUM_UST_TESTS+NUM_KERNEL_TESTS+NUM_GLOBAL_TESTS))
 
 NR_USEC_WAIT=0	#for UST gen events
@@ -130,6 +130,8 @@ function test_event_vpid_tracker()
 
 	prepare_"$domain"_app
 
+	lttng_untrack_"$domain"_ok "--all --vpid"
+
 	start_lttng_tracing_ok
 
 	if [ "$expect_event" -eq 1 ]; then
@@ -146,7 +148,7 @@ function test_event_vpid_tracker()
 	if [ "$expect_event" -eq 1 ]; then
 		validate_trace "$EVENT_NAME" "$trace_path"
 	else
-		validate_trace_empty "$trace_path"
+		validate_trace_session_"$domain"_empty "$trace_path"
 	fi
 
 	rm -rf "$trace_path"
@@ -173,6 +175,8 @@ function test_event_pid_tracker()
 
 	prepare_"$domain"_app
 
+	lttng_untrack_"$domain"_ok "--all --pid"
+
 	start_lttng_tracing_ok
 
 	if [ "$expect_event" -eq 1 ]; then
@@ -189,7 +193,7 @@ function test_event_pid_tracker()
 	if [ "$expect_event" -eq 1 ]; then
 		validate_trace "$EVENT_NAME" "$trace_path"
 	else
-		validate_trace_empty "$trace_path"
+	    	validate_trace_session_"$domain"_empty "$trace_path"
 	fi
 
 	rm -rf "$trace_path"
@@ -275,6 +279,8 @@ function test_event_vpid_track_untrack()
 
 	prepare_"$domain"_app
 
+	lttng_untrack_"$domain"_ok "--all --vpid"
+
 	start_lttng_tracing_ok
 
 	lttng_track_"$domain"_ok "--vpid ${CHILD_PID}"
@@ -315,6 +321,8 @@ function test_event_pid_track_untrack()
 
 	prepare_"$domain"_app
 
+	lttng_untrack_"$domain"_ok "--all --pid"
+
 	start_lttng_tracing_ok
 
 	lttng_track_"$domain"_ok "--pid ${CHILD_PID}"
-- 
2.31.1

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [lttng-dev] [PATCH lttng-tools] Fix: test code assumes that child process is schedule to run before parent
@ 2021-03-31 18:56 Anders Wallin via lttng-dev
  2021-03-31 19:25 ` Jonathan Rajotte-Julien via lttng-dev
  2021-04-01 16:19 ` Mathieu Desnoyers via lttng-dev
  0 siblings, 2 replies; 17+ messages in thread
From: Anders Wallin via lttng-dev @ 2021-03-31 18:56 UTC (permalink / raw)
  To: lttng-dev

the following tests fails on arm64
- test_event_vpid_tracker ust 0 "${EVENT_NAME}"
- test_event_vpid_track_untrack ust 0 "${EVENT_NAME}"
- test_event_pid_tracker ust 0 "${EVENT_NAME}"
- test_event_pid_track_untrack ust 0 "${EVENT_NAME}"

Signed-off-by: Anders Wallin <wallinux@gmail.com>
---
 tests/regression/tools/tracker/test_event_tracker | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
index 711690af..649c7e61 100755
--- a/tests/regression/tools/tracker/test_event_tracker
+++ b/tests/regression/tools/tracker/test_event_tracker
@@ -5,7 +5,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-only
 
-TEST_DESC="LTTng - Event traker test"
+TEST_DESC="LTTng - Event tracker test"
 
 CURDIR=$(dirname "$0")/
 TESTDIR="$CURDIR/../../.."
@@ -42,6 +42,8 @@ function prepare_ust_app
 
 	$TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b "$BEFORE_LAST_PATH" &
 	CHILD_PID=$!
+	# voluntary context switch to start $TESTAPP_BIN
+	sleep 0.1
 }
 
 function trace_ust_app
-- 
2.31.1

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-04-09 19:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 16:37 [lttng-dev] [PATCH lttng-tools] Fix: test code assumes that child process is schedule to run before parent Anders Wallin via lttng-dev
2021-04-07 15:31 ` Mathieu Desnoyers via lttng-dev
2021-04-08  9:22   ` Anders Wallin via lttng-dev
2021-04-08 12:48     ` Mathieu Desnoyers via lttng-dev
2021-04-08 15:47       ` Anders Wallin via lttng-dev
  -- strict thread matches above, loose matches on Subject: below --
2021-04-09 14:41 Anders Wallin via lttng-dev
2021-04-09 19:12 ` Mathieu Desnoyers via lttng-dev
2021-03-31 18:56 Anders Wallin via lttng-dev
2021-03-31 19:25 ` Jonathan Rajotte-Julien via lttng-dev
2021-03-31 21:09   ` Anders Wallin via lttng-dev
2021-03-31 21:33     ` Jonathan Rajotte-Julien via lttng-dev
2021-04-01  1:21       ` Anders Wallin via lttng-dev
2021-04-01 13:45         ` Jonathan Rajotte-Julien via lttng-dev
2021-04-01 15:02           ` Anders Wallin via lttng-dev
2021-04-01 16:19 ` Mathieu Desnoyers via lttng-dev
2021-04-01 16:21   ` Mathieu Desnoyers via lttng-dev
2021-04-01 16:33   ` Anders Wallin via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).