Rodrigo Arias
70f34e9e33
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.
20 lines
417 B
Bash
20 lines
417 B
Bash
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
|