linux/tools/testing
Ilpo Järvinen 90a009db09 selftests/resctrl: Replace file write with volatile variable
The fill_buf code prevents compiler optimizating the entire read loop
away by writing the final value of the variable into a file. While it
achieves the goal, writing into a file requires significant amount of
work within the innermost test loop and also error handling.

A simpler approach is to take advantage of volatile. Writing through
a pointer to a volatile variable is enough to prevent compiler from
optimizing the write away, and therefore compiler cannot remove the
read loop either.

Add a volatile 'value_sink' into resctrl_tests.c and make fill_buf to
write into it. As a result, the error handling in fill_buf.c can be
simplified.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-02-13 13:56:44 -07:00
..
crypto/chacha20-s390
cxl Merge branch 'for-6.8/cxl-cper' into for-6.8/cxl 2024-01-09 19:21:44 -08:00
fault-injection
ktest
kunit kunit: tool: add test for parsing attributes 2023-12-18 13:21:15 -07:00
memblock mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-01-08 15:27:15 -08:00
nvdimm tools/testing/nvdimm: Add compile-test coverage for ndtest 2023-12-15 17:07:12 +01:00
radix-tree maple_tree: fix warning comparing pointer to 0 2023-12-20 14:48:12 -08:00
scatterlist
selftests selftests/resctrl: Replace file write with volatile variable 2024-02-13 13:56:44 -07:00
vsock vsock/test: two tests to check credit update logic 2023-12-15 10:37:35 +00:00