All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: fdmanana@gmail.com
Cc: fstests <fstests@vger.kernel.org>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: add fstrim test case on the sprout device
Date: Sat, 1 May 2021 13:16:11 +0800	[thread overview]
Message-ID: <58a1c6ed-cafa-f092-6e36-a648666060e9@oracle.com> (raw)
In-Reply-To: <CAL3q7H4-zRWVpTnxmQ-VkCmQ8hWvd5L_5ouC7CEWPgHwxMbqqQ@mail.gmail.com>


>> +
>> +_mkfs_dev $seed
>> +_mount $seed $SCRATCH_MNT
> 
> Missing the check for discard/trim support:
> 
> _require_batched_discard $SCRATCH_MNT
> 
  Oh. I will add.


>> +fstrim $SCRATCH_MNT
> 
> Should use $FSTRIM_PROG instead of fstrim.
> 

  Right. Ok.


>> +
>> +_scratch_unmount
>> +_mount $seed $SCRATCH_MNT 2>&1 | _filter_scratch
>> +md5sum $SCRATCH_MNT/foo | _filter_scratch
>> +_scratch_unmount
> 
> Missing a call to _scratch_dev_pool_put
> 

  Yep. I will add.


> Ok, it fails as expected without the btrfs fix.
> But with the fix applied, it fails differently for me. It looks like
> different mount versions output different strings maybe:
> > root 16:18:40 /home/fdmanana/git/hub/xfstests (master)> ./check btrfs/237
> FSTYP         -- btrfs
> PLATFORM      -- Linux/x86_64 debian8 5.12.0-rc8-btrfs-next-86 #1 SMP
> PREEMPT Fri Apr 23 17:35:49 WEST 2021
> MKFS_OPTIONS  -- /dev/sdc
> MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1
> 
> btrfs/237 - output mismatch (see
> /home/fdmanana/git/hub/xfstests/results//btrfs/237.out.bad)
>      --- tests/btrfs/237.out 2021-04-30 16:09:33.103380077 +0100
>      +++ /home/fdmanana/git/hub/xfstests/results//btrfs/237.out.bad
> 2021-04-30 16:19:31.577988213 +0100
>      @@ -1,5 +1,5 @@
>       QA output created by 237
>      -mount: SCRATCH_MNT: WARNING: device write-protected, mounted read-only.
>      +mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
>       096003817ad2638000a6836e55866697  SCRATCH_MNT/foo
>      -mount: SCRATCH_MNT: WARNING: device write-protected, mounted read-only.
>      +mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
>       096003817ad2638000a6836e55866697  SCRATCH_MNT/foo
>      ...
>      (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/237.out
> /home/fdmanana/git/hub/xfstests/results//btrfs/237.out.bad'  to see
> the entire diff)
> Ran: btrfs/237
> Failures: btrfs/237
> Failed 1 of 1 tests
> 
> root 16:19:31 /home/fdmanana/git/hub/xfstests (master)> diff -u
> /home/fdmanana/git/hub/xfstests/tests/btrfs/237.out
> /home/fdmanana/git/hub/xfstests/results//btrfs/237.out.bad
> --- /home/fdmanana/git/hub/xfstests/tests/btrfs/237.out 2021-04-30
> 16:09:33.103380077 +0100
> +++ /home/fdmanana/git/hub/xfstests/results//btrfs/237.out.bad
> 2021-04-30 16:19:31.577988213 +0100
> @@ -1,5 +1,5 @@
>   QA output created by 237
> -mount: SCRATCH_MNT: WARNING: device write-protected, mounted read-only.
> +mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
>   096003817ad2638000a6836e55866697  SCRATCH_MNT/foo
> -mount: SCRATCH_MNT: WARNING: device write-protected, mounted read-only.
> +mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
>   096003817ad2638000a6836e55866697  SCRATCH_MNT/foo
> root 16:20:06 /home/fdmanana/git/hub/xfstests (master)>
> 

  Just found there is _filter_ro_mount, which comes in handy here.
  I will use it.

Thanks, Anand


> Thanks.
> 
>> --
>> 2.27.0
>>
> 
> 


  reply	other threads:[~2021-05-01  5:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30  9:10 [PATCH] btrfs: fix unmountable seed device after fstrim Anand Jain
2021-04-30 10:11 ` Filipe Manana
2021-04-30 11:06   ` Anand Jain
2021-04-30 11:59 ` Anand Jain
2021-04-30 12:14   ` Filipe Manana
2021-04-30 12:48     ` Anand Jain
2021-05-03 13:34       ` David Sterba
2021-04-30 14:39   ` [PATCH] btrfs: add fstrim test case on the sprout device Anand Jain
2021-04-30 15:24     ` Filipe Manana
2021-05-01  5:16       ` Anand Jain [this message]
2021-05-01  5:17     ` [PATCH v2] " Anand Jain
2021-05-03  9:54       ` Filipe Manana
2021-05-03 10:29         ` Anand Jain
2021-05-03 11:08     ` [PATCH v3] " Anand Jain
2021-05-03 11:16       ` Filipe Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58a1c6ed-cafa-f092-6e36-a648666060e9@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.