Skip to content

Commit 16cf7b6

Browse files
authored
[SWDEV-509659] Skip rocprof device counting tests if lacking permissions (#125)
* [SWDEV-509659] Skip rocprof device counting tests if lacking permissions Skips non-intercept test if proper permissions are not obtained (SYS_PERFMON). This should be the only test that fails due to permission issues (others do not require the IOCTL to pass). Regex match sample: https://regexr.com/8b29s * Update source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com> * fix * Update source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt --------- Co-authored-by: Benjamin Welton <ben@amd.com> Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com> [ROCm/rocprofiler-sdk commit: 536fbba]
1 parent 2fb4fb7 commit 16cf7b6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

source/lib/rocprofiler-sdk/counters/tests/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,16 @@ gtest_add_tests(
8383
TEST_LIST counter-tests_TESTS
8484
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
8585

86-
set_tests_properties(${counter-tests_TESTS} PROPERTIES TIMEOUT 45 LABELS "unittests")
86+
set_tests_properties(
87+
${counter-tests_TESTS}
88+
PROPERTIES
89+
TIMEOUT
90+
45
91+
LABELS
92+
"unittests"
93+
SKIP_REGULAR_EXPRESSION
94+
"Running non-intercept test(.*)could not be locked for profiling due to lack of permissions.*"
95+
)
8796

8897
set(ROCPROFILER_LIB_CONSUMER_TEST_SOURCES consumer_test.cpp)
8998

source/lib/rocprofiler-sdk/counters/tests/device_counting.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ TEST_F(device_counting_service_test, sync_sq_waves_verify_non_intercept)
705705
GTEST_SKIP();
706706
}
707707

708+
ROCP_WARNING << "Running non-intercept test";
708709
test_run(ROCPROFILER_COUNTER_FLAG_NONE, {"SQ_WAVES_sum"}, 50000, true);
709710
auto local_recs = global_recs().rlock([](const auto& data) { return data; });
710711
ROCP_WARNING << local_recs.size();

0 commit comments

Comments
 (0)