[Devel] [PATCH hci-8.1] selftests/zram: use the device ids that hot_add returns

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Nov 3 14:07:04 MSK 2026


> zram_load() numbers the devices it creates by counting the nodes in
> /dev and discards the ids hot_add returns. hot_add takes the lowest
> free id, so once the ids have a gap the test works on a device it did
> not create: with zram0 and zram2 present it creates zram1, then
> configures, formats and mounts zram2, and finally resets and removes
> zram2 and leaves zram1 behind.
> 
> Keep the ids hot_add returns and use them in every step and in the
> cleanup. A hot_add that fails now fails the test.
> 
> Fixes: 01dabed20573 ("selftests/zram: Adapt the situation that /dev/zram0 is being used")
> https://virtuozzo.atlassian.net/browse/VSTOR-152656
> Feature: fix selftests
> 
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261103110354.2525675-1-eva.kurchatova@virtuozzo.com?part=1




More information about the Devel mailing list