mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
Merge tag 'linux_kselftest-fixes-6.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest fix from Shuah Khan: "Fix tracing test_multiple_writes stalls when buffer_size_kb is less than 12KB" * tag 'linux_kselftest-fixes-6.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/tracing: Fix test_multiple_writes stall
This commit is contained in:
@@ -89,6 +89,7 @@ test_buffer() {
|
||||
# The id must be four bytes, test that 3 bytes fails a write
|
||||
if echo -n abc > ./trace_marker_raw ; then
|
||||
echo "Too small of write expected to fail but did not"
|
||||
echo ${ORIG} > buffer_size_kb
|
||||
exit_fail
|
||||
fi
|
||||
|
||||
@@ -99,9 +100,24 @@ test_buffer() {
|
||||
|
||||
if write_buffer 0xdeadbeef $size ; then
|
||||
echo "Too big of write expected to fail but did not"
|
||||
echo ${ORIG} > buffer_size_kb
|
||||
exit_fail
|
||||
fi
|
||||
}
|
||||
|
||||
ORIG=`cat buffer_size_kb`
|
||||
|
||||
# test_multiple_writes test needs at least 12KB buffer
|
||||
NEW_SIZE=12
|
||||
|
||||
if [ ${ORIG} -lt ${NEW_SIZE} ]; then
|
||||
echo ${NEW_SIZE} > buffer_size_kb
|
||||
fi
|
||||
|
||||
test_buffer
|
||||
test_multiple_writes
|
||||
if ! test_multiple_writes; then
|
||||
echo ${ORIG} > buffer_size_kb
|
||||
exit_fail
|
||||
fi
|
||||
|
||||
echo ${ORIG} > buffer_size_kb
|
||||
|
||||
Reference in New Issue
Block a user