selftests: ublk: add helper for SET_PARAMS

The normal kublk add command goes through device startup. It does not
tell the shell test whether a bad parameter is rejected by SET_PARAMS or
later by START_DEV.

Add a set_params command. It creates a temporary ublk device, sends
SET_PARAMS with the command line parameters, returns the ioctl result,
and deletes the device before START_DEV.

Signed-off-by: Yao Sang <sangyao@kylinos.cn>
Link: https://patch.msgid.link/20260814023226.354288-3-sangyao@kylinos.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Yao Sang 2026-08-14 10:32:25 +08:00 • committed by Jens Axboe
commit 176f02a86c
2 changed files with 178 additions and 1 deletions