There is a race condition in the CXI sampling integration test https://github.com/argonne-lcf/THAPI/blob/devel/integration_tests/sampling.bats#L15-L40. The fix would be to move the counter bumps to the bash -c. Something like:
bash -c ' echo "[email protected]" > test_device/cxi0/device/telemetry/test_counter;
sleep 1;
echo "[email protected]" > test_device/cxi0/device/telemetry/test_counter;
sleep 1`
And then check for 1 and 9.