From 15afdf48201e66e5f14600dc4d15eff12f759cdb Mon Sep 17 00:00:00 2001 From: prasun3 Date: Thu, 12 Oct 2023 13:30:27 +0530 Subject: [PATCH 1/3] i3346 test: Added a test that reproduces the crash Issue: #3346 --- .../tests/offline-pthreads_exit_after_tracing.templatex | 2 ++ suite/tests/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex diff --git a/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex b/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex new file mode 100644 index 00000000000..4f646b9241b --- /dev/null +++ b/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex @@ -0,0 +1,2 @@ +Hit delay threshold: enabling tracing. +Exiting process after .* references. diff --git a/suite/tests/CMakeLists.txt b/suite/tests/CMakeLists.txt index 8d894e8c6a2..3f8e1660283 100644 --- a/suite/tests/CMakeLists.txt +++ b/suite/tests/CMakeLists.txt @@ -4308,6 +4308,8 @@ if (BUILD_CLIENTS) if (NOT MSVC) torunonly_drcacheoff(invariant_checker_pthreads ${ci_pthreads_app} "" "@-simulator_type@invariant_checker" "") + torunonly_drcacheoff(pthreads_exit_after_tracing ${ci_pthreads_app} + " -trace_after_instrs 2M -exit_after_tracing 100K" "" "1000000") endif () # Test the standalone histogram tool. From aaee847c60b36b29713a159be5906c633117780e Mon Sep 17 00:00:00 2001 From: prasun3 Date: Fri, 13 Oct 2023 08:33:21 +0530 Subject: [PATCH 2/3] i3346 test: Fix regex failure when crash doesn't occur Issue: #3346 --- .../tests/offline-pthreads_exit_after_tracing.templatex | 1 + suite/tests/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex b/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex index 4f646b9241b..575399fbcc8 100644 --- a/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex +++ b/clients/drcachesim/tests/offline-pthreads_exit_after_tracing.templatex @@ -1,2 +1,3 @@ Hit delay threshold: enabling tracing. Exiting process after .* references. +Trace invariant checks passed diff --git a/suite/tests/CMakeLists.txt b/suite/tests/CMakeLists.txt index 3f8e1660283..54f96160d23 100644 --- a/suite/tests/CMakeLists.txt +++ b/suite/tests/CMakeLists.txt @@ -4309,7 +4309,9 @@ if (BUILD_CLIENTS) torunonly_drcacheoff(invariant_checker_pthreads ${ci_pthreads_app} "" "@-simulator_type@invariant_checker" "") torunonly_drcacheoff(pthreads_exit_after_tracing ${ci_pthreads_app} - " -trace_after_instrs 2M -exit_after_tracing 100K" "" "1000000") + " -trace_after_instrs 2M -exit_after_tracing 100K" + "@-simulator_type@invariant_checker" + "1000000") endif () # Test the standalone histogram tool. From 1428de971b4dc7429907cda450242ba24d2ea073 Mon Sep 17 00:00:00 2001 From: prasun3 Date: Fri, 13 Oct 2023 09:18:08 +0530 Subject: [PATCH 3/3] removed trailing space --- suite/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suite/tests/CMakeLists.txt b/suite/tests/CMakeLists.txt index 54f96160d23..1a32e89fa4f 100644 --- a/suite/tests/CMakeLists.txt +++ b/suite/tests/CMakeLists.txt @@ -4309,7 +4309,7 @@ if (BUILD_CLIENTS) torunonly_drcacheoff(invariant_checker_pthreads ${ci_pthreads_app} "" "@-simulator_type@invariant_checker" "") torunonly_drcacheoff(pthreads_exit_after_tracing ${ci_pthreads_app} - " -trace_after_instrs 2M -exit_after_tracing 100K" + " -trace_after_instrs 2M -exit_after_tracing 100K" "@-simulator_type@invariant_checker" "1000000") endif ()