FS/XFS testing framework
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>,
	"fstests@vger.kernel.org" <fstests@vger.kernel.org>
Subject: Inconsistent mount option for TEST_DIR after _test_cycle_mount()
Date: Tue, 2 Jun 2026 08:55:42 +0930	[thread overview]
Message-ID: <8550fde2-bcc6-4e8a-aa57-49944acba415@gmx.com> (raw)

Hi,

Recently I'm testing btrfs with its nodatasum options to verify some 
direct IO bugs.

But it turns out _test_cycle_mount() doesn't respect $MOUNT_OPTIONS, and 
will cause mount options that affect new files to be not applied.

E.g, there is a super simple test case:

  . ./common/preamble
  _begin_fstest auto
  _require_test
  mount | grep "$TEST_DIR"
  _test_cycle_mount
  mount | grep "$TEST_DIR"
  _exit 0

With MOUNT_OPTIONS set to "-o nodatasum", the output looks like the 
following:

/dev/mapper/test-test on /mnt/test type btrfs 
(rw,relatime,nodatasum,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/mapper/test-test on /mnt/test type btrfs 
(rw,relatime,discard=async,space_cache=v2,subvolid=5,subvol=/)

Note the missing "nodatasum" mount option after the _test_cycle_mount.

However I failed to find out how the initial _require_test is different 
from the later _test_cycle_mount.

They all call the same _test_mount(), and that function never really 
respect $MOUNT_OPTIONS, but still the first test mount still got the 
correct "nodatasum" option.

Any clue on how to fix this weird problem?

Thanks,
Qu

                 reply	other threads:[~2026-06-01 23:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8550fde2-bcc6-4e8a-aa57-49944acba415@gmx.com \
    --to=quwenruo.btrfs@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox