]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: ublk: refactor test_loop_08 into separate functions
authorMing Lei <ming.lei@redhat.com>
Sat, 31 Jan 2026 16:23:33 +0000 (00:23 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 31 Jan 2026 21:56:28 +0000 (14:56 -0700)
commit842b6520e579b8bd7d6ea09937e1fb7729cce1c5
tree2a1f79cf491fa793bd618d4af7a41e4d0b95b452
parent5af302a15a1d628a025a78892001fe8afea90c60
selftests: ublk: refactor test_loop_08 into separate functions

Encapsulate each test case in its own function for better organization
and maintainability:

- _setup_device(): device and backfile initialization
- _test_fill_and_verify(): initial data population
- _test_corrupted_reftag(): reftag corruption detection test
- _test_corrupted_data(): data corruption detection test
- _test_bad_apptag(): apptag mismatch detection test

Also fix temp file creation to use ${UBLK_TEST_DIR}/fio_err_XXXXX instead of
creating in current directory.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/test_loop_08.sh