From 679b8ab9d4ae48db170bc5948ee251b96e0cec7e Mon Sep 17 00:00:00 2001 From: edeiana Date: Wed, 9 Oct 2024 04:28:40 -0700 Subject: [PATCH] Improved unit test. --- clients/drcachesim/tests/record_filter_unit_tests.cpp | 2 +- clients/drcachesim/tools/filter/invalidate_cpu_filter.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/drcachesim/tests/record_filter_unit_tests.cpp b/clients/drcachesim/tests/record_filter_unit_tests.cpp index f915477c4c6..4b9cd55add7 100644 --- a/clients/drcachesim/tests/record_filter_unit_tests.cpp +++ b/clients/drcachesim/tests/record_filter_unit_tests.cpp @@ -627,7 +627,7 @@ test_invalidate_cpu_filter() { { TRACE_TYPE_MARKER, TRACE_MARKER_TYPE_CPU_ID, { 0x8 } }, true, { false } }, // invalidate_cpu_filter overwrites the value of TRACE_MARKER_TYPE_CPU_ID with // (uintptr_t)-1. - { { TRACE_TYPE_MARKER, TRACE_MARKER_TYPE_CPU_ID, { 0xffffffffffffffff } }, + { { TRACE_TYPE_MARKER, TRACE_MARKER_TYPE_CPU_ID, { INVALID_CPU_MARKER_VALUE } }, false, { true } }, /* We need at least one instruction with encodings to make record_filter output diff --git a/clients/drcachesim/tools/filter/invalidate_cpu_filter.h b/clients/drcachesim/tools/filter/invalidate_cpu_filter.h index a06934aece3..6f721cb5430 100644 --- a/clients/drcachesim/tools/filter/invalidate_cpu_filter.h +++ b/clients/drcachesim/tools/filter/invalidate_cpu_filter.h @@ -38,7 +38,7 @@ #include -#define INVALID_CPU_MARKER_VALUE ~((addr_t)0UL) +#define INVALID_CPU_MARKER_VALUE ((uintptr_t) - 1) namespace dynamorio { namespace drmemtrace {