]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: ublk: add selftest for UBLK_F_NO_AUTO_PART_SCAN
authorMing Lei <ming.lei@redhat.com>
Thu, 29 Jan 2026 16:19:53 +0000 (00:19 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 31 Jan 2026 13:36:41 +0000 (06:36 -0700)
commite07a2039b6d4ae3acf8ae39b86be449b7fa18d4a
tree47df8ad986ecd019e6f2b1fb885e6140924d7ef4
parent3a4d8bed0b47543b2dfce0b1d714b40d68ff2f7e
selftests: ublk: add selftest for UBLK_F_NO_AUTO_PART_SCAN

Add test_part_01.sh to test the UBLK_F_NO_AUTO_PART_SCAN feature
flag which allows suppressing automatic partition scanning during
device startup while still allowing manual partition probing.

The test verifies:
- Normal behavior: partitions are auto-detected without the flag
- With flag: partitions are not auto-detected during START_DEV
- Manual scan: blockdev --rereadpt works with the flag

Also update kublk tool to support --no_auto_part_scan option and
recognize the feature flag.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/Makefile
tools/testing/selftests/ublk/kublk.c
tools/testing/selftests/ublk/kublk.h
tools/testing/selftests/ublk/test_part_01.sh [new file with mode: 0755]