[4/5] btrfs-progs: tests: fix typo in convert-tests/008-readonly-image
diff mbox

Message ID 20170727154723.2208-5-jeffm@suse.com
State New
Headers show

Commit Message

Jeff Mahoney July 27, 2017, 3:47 p.m. UTC
From: Jeff Mahoney <jeffm@suse.com>

The dd in convert-tests/008-readonly-image is expected to fail, so
there being a typo in the file name has gone unnoticed.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 tests/convert-tests/008-readonly-image/test.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Qu Wenruo July 28, 2017, 1:27 a.m. UTC | #1
On 2017年07月27日 23:47, jeffm@suse.com wrote:
> From: Jeff Mahoney <jeffm@suse.com>
> 
> The dd in convert-tests/008-readonly-image is expected to fail, so
> there being a typo in the file name has gone unnoticed.

Thanks for catching this.
This is very embarrassing.

> 
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> ---
>   tests/convert-tests/008-readonly-image/test.sh | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/convert-tests/008-readonly-image/test.sh b/tests/convert-tests/008-readonly-image/test.sh
> index 27c9373..cc846fa 100755
> --- a/tests/convert-tests/008-readonly-image/test.sh
> +++ b/tests/convert-tests/008-readonly-image/test.sh
> @@ -14,9 +14,10 @@ convert_test_prep_fs $default_mke2fs
>   run_check_umount_test_dev
>   convert_test_do_convert
>   run_check_mount_test_dev
> +run_check e2fsck -n "$TEST_MNT/ext2_saved/image"
>   
>   # It's expected to fail
> -$SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/ext2_save/image" bs=1M count=1 \
> +$SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/ext2_saved/image" bs=1M count=1 \
>   	&> /dev/null

BTW, now we have run_mustfail() function, so we don't need to manually 
check the return value now.

Thanks,
Qu

>   if [ $? -ne 1 ]; then
>   	echo "after convert ext2_save/image is not read-only"
> @@ -24,3 +25,4 @@ if [ $? -ne 1 ]; then
>   fi
>   run_check_umount_test_dev
>   convert_test_post_rollback
> +
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lakshmipathi.G July 31, 2017, 7:35 a.m. UTC | #2
>  if [ $? -ne 1 ]; then
>         echo "after convert ext2_save/image is not read-only"
Though this mayn't affect test-script result, please change the typo
in this location also. thanks.

Cheers.
Lakshmipathi.G
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Mahoney July 31, 2017, 5:01 p.m. UTC | #3
On 7/27/17 9:27 PM, Qu Wenruo wrote:
> 
> 
> On 2017年07月27日 23:47, jeffm@suse.com wrote:
>> From: Jeff Mahoney <jeffm@suse.com>
>>
>> The dd in convert-tests/008-readonly-image is expected to fail, so
>> there being a typo in the file name has gone unnoticed.
> 
> Thanks for catching this.
> This is very embarrassing.
> 
>>
>> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
>> ---
>>   tests/convert-tests/008-readonly-image/test.sh | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/convert-tests/008-readonly-image/test.sh
>> b/tests/convert-tests/008-readonly-image/test.sh
>> index 27c9373..cc846fa 100755
>> --- a/tests/convert-tests/008-readonly-image/test.sh
>> +++ b/tests/convert-tests/008-readonly-image/test.sh
>> @@ -14,9 +14,10 @@ convert_test_prep_fs $default_mke2fs
>>   run_check_umount_test_dev
>>   convert_test_do_convert
>>   run_check_mount_test_dev
>> +run_check e2fsck -n "$TEST_MNT/ext2_saved/image"
>>     # It's expected to fail
>> -$SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/ext2_save/image" bs=1M
>> count=1 \
>> +$SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/ext2_saved/image" bs=1M
>> count=1 \
>>       &> /dev/null
> 
> BTW, now we have run_mustfail() function, so we don't need to manually
> check the return value now.

Ah, right.  I'll incorporate this with Lakshmipathi's feedback.

-Jeff

> Thanks,
> Qu
> 
>>   if [ $? -ne 1 ]; then
>>       echo "after convert ext2_save/image is not read-only"
>> @@ -24,3 +25,4 @@ if [ $? -ne 1 ]; then
>>   fi
>>   run_check_umount_test_dev
>>   convert_test_post_rollback
>> +
>>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Patch
diff mbox

diff --git a/tests/convert-tests/008-readonly-image/test.sh b/tests/convert-tests/008-readonly-image/test.sh
index 27c9373..cc846fa 100755
--- a/tests/convert-tests/008-readonly-image/test.sh
+++ b/tests/convert-tests/008-readonly-image/test.sh
@@ -14,9 +14,10 @@  convert_test_prep_fs $default_mke2fs
 run_check_umount_test_dev
 convert_test_do_convert
 run_check_mount_test_dev
+run_check e2fsck -n "$TEST_MNT/ext2_saved/image"
 
 # It's expected to fail
-$SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/ext2_save/image" bs=1M count=1 \
+$SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/ext2_saved/image" bs=1M count=1 \
 	&> /dev/null
 if [ $? -ne 1 ]; then
 	echo "after convert ext2_save/image is not read-only"
@@ -24,3 +25,4 @@  if [ $? -ne 1 ]; then
 fi
 run_check_umount_test_dev
 convert_test_post_rollback
+