[LTP] [PATCH v2] commands/mkswap: Added new testcase to test mkswap(8).

Lei Li rocklee_104@outlook.com
Wed Nov 11 05:50:15 CET 2015


> +mkswap_test "" "" "$TST_DEVICE"
> +mkswap_test "" "" "$TST_DEVICE" "$((DEVICE_SIZE-10000))"
> +mkswap_test "-f" "" "$TST_DEVICE" "$((DEVICE_SIZE+10000))"
> +mkswap_test "-c" "" "$TST_DEVICE"
> +mkswap_test "-p" "2048" "$TST_DEVICE"
> +mkswap_test "-L" "testswap" "$TST_DEVICE"
> +mkswap_test "-v1" "" "$TST_DEVICE"
> +mkswap_test "-U" "ffffffff-ffff-ffff-ffff-ffffffffffff" "$TST_DEVICE"

Hi again :-)
	This testcase changes UUID of a block device and will never
restore it. Swapon error occurs when there are two "ffffffff-
ffff-ffff-ffff-ffffffffffff" UUID in the system, for example, run this
testcase to test a block device firstly and then, test a loop device.

Maybe you should restore the UUID of the block device in cleanup().

Thanks
-- 
Rock Lee
rocklee_104@outlook.com


More information about the Ltp mailing list