From: Omar Sandoval Date: Tue, 4 Aug 2020 18:38:28 +0000 (-0700) Subject: block/012: add comment explaning second --setro X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=832abd6e0e8bbdfee2c5bfd8e195fd520b4d01e4;p=users%2Fsagi%2Fblktests.git block/012: add comment explaning second --setro Closes #73. Signed-off-by: Omar Sandoval --- diff --git a/tests/block/012 b/tests/block/012 index 3b0bed5..c92f5b4 100755 --- a/tests/block/012 +++ b/tests/block/012 @@ -20,6 +20,7 @@ test_device() { xfs_io -c "pwrite -w -S 0xaa -b 2M 0 2M" -d "$TEST_DEV" >>"$FULL" dd if="$TEST_DEV" bs=2M count=1 2>>"$FULL" | hexdump blockdev --setro "$TEST_DEV" + # It is valid to set a device that is already read-only to read-only. blockdev --setro "$TEST_DEV" blockdev --getro "$TEST_DEV" # writes should fail while device is read-only