[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>
This commit is contained in:
Welton, Benjamin
2025-01-15 23:51:06 -08:00
committed by GitHub
parent 71dc203b0c
commit 536fbba627
2 changed files with 11 additions and 1 deletions
@@ -705,6 +705,7 @@ TEST_F(device_counting_service_test, sync_sq_waves_verify_non_intercept)
GTEST_SKIP();
}
ROCP_WARNING << "Running non-intercept test";
test_run(ROCPROFILER_COUNTER_FLAG_NONE, {"SQ_WAVES_sum"}, 50000, true);
auto local_recs = global_recs().rlock([](const auto& data) { return data; });
ROCP_WARNING << local_recs.size();