Fail fibonacci test on nOS-V kernel warnings

Some threads may fail to enable the kernel instrumentation by reaching
the memory lock limit, causing the kernel instrumentation to be disabled
without any error in the emulation.

To prevent this situation, we run the test manually and check that there
are no warnings during the execution.
This commit is contained in:
Rodrigo Arias 2024-03-22 15:35:46 +01:00
parent c7dbf643d3
commit 70f34e9e33
2 changed files with 20 additions and 1 deletions

View File

@ -61,7 +61,7 @@ nodes_rt_test(taskiter.c SORT)
include(CheckPerfParanoid) include(CheckPerfParanoid)
if (PERF_PARANOID_KERNEL) if (PERF_PARANOID_KERNEL)
message(STATUS "Enabling perf paranoid tests for NODES") message(STATUS "Enabling perf paranoid tests for NODES")
nodes_rt_test(fibonacci.c SORT LEVEL 3) nodes_rt_test(fibonacci.c SORT LEVEL 3 DRIVER "fibonacci.driver.sh")
elseif(ENABLE_ALL_TESTS) elseif(ENABLE_ALL_TESTS)
message(FATAL_ERROR "Cannot enable perf paranoid tests for NODES") message(FATAL_ERROR "Cannot enable perf paranoid tests for NODES")
else() else()

View File

@ -0,0 +1,19 @@
target=$OVNI_TEST_BIN
$target 2>stderr.log
# Ensure no nOS-V warnings at runtime
if grep -c "cannot enable kernel events" stderr.log; then
echo "cannot enable kernel events in all threads" >&2
exit 1
fi
# We need to sort the trace as it has unsorted regions
ovnisort ovni
# Ensure we have at least a pair of kernel CS events
ovnitop ovni | grep KCO
ovnitop ovni | grep KCI
# Run the emulator
ovniemu -l ovni