From: "Darrick J. Wong" <djwong@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Zorro Lang <zlang@redhat.com>,
fstests@vger.kernel.org, linux-fsdevel@vger.kernel.org,
patches@lists.linux.dev
Subject: Re: [PATCH] fstests: add helper to canonicalize devices used to enable persistent disks
Date: Wed, 26 Jul 2023 18:26:13 -0700 [thread overview]
Message-ID: <20230727012613.GD11377@frogsfrogsfrogs> (raw)
In-Reply-To: <20230727011330.GE30264@mit.edu>
On Wed, Jul 26, 2023 at 09:13:30PM -0400, Theodore Ts'o wrote:
> On Wed, Jul 26, 2023 at 09:28:23AM -0700, Luis Chamberlain wrote:
> > > I'm a little confused. Where are these "sanity checks" enforced?
> > > I've been using
> > >
> > > SCRATCH_DEV=/dev/mapper/xt-vdc
> > >
> > > where /dev/mapper/xt-vdc is a symlink to /dev/dm-4 (or some such)
> > > without any problems. So I don't quite understand why we need to
> > > canonicalize devices?
> >
> > That might work, but try using /dev/disk/by-id/ stuff, that'll bust. So
> > to keep existing expecations by fstests, it's needed.
>
> What goes wrong, and why? /dev/disk/by-id/<disk-id> is a symlink,
> just like /dev/mapper/<vg>-<lv> is a symlink.
>
> What am I missing?
# mkfs.xfs -f /dev/sda
# mount /dev/sda /mnt
# TEST_DIR=/mnt TEST_DEV=/dev/sda FSTYP=xfs ./check generic/110
FSTYP -- xfs (debug)
PLATFORM -- Linux/x86_64 flax-mtr01 6.5.0-rc3-djwx #rc3 SMP PREEMPT_DYNAMIC Wed Jul 26 14:26:48 PDT 2023
generic/110 2s
Ran: generic/110
Passed all 1 tests
versus:
# TEST_DIR=/mnt TEST_DEV=/dev/disk/by-id/scsi-0QEMU_RAMDISK_drive-scsi0-0-0-0 FSTYP=xfs ./check generic/110
mount: /mnt: /dev/sda already mounted on /mnt.
common/rc: retrying test device mount with external set
mount: /mnt: /dev/sda already mounted on /mnt.
common/rc: could not mount /dev/disk/by-id/scsi-0QEMU_RAMDISK_drive-scsi0-0-0-0 on /mnt
# umount /mnt
# TEST_DIR=/mnt TEST_DEV=/dev/disk/by-id/scsi-0QEMU_RAMDISK_drive-scsi0-0-0-0 FSTYP=xfs ./check generic/110
TEST_DEV=/dev/disk/by-id/scsi-0QEMU_RAMDISK_drive-scsi0-0-0-0 is mounted but not on TEST_DIR=/mnt - aborting
Already mounted result:
/dev/sda /mnt
(This is not really how I run fstests, it's just the minimum example.)
--D
> Thanks,
>
> - Ted
>
prev parent reply other threads:[~2023-07-27 1:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 6:17 [PATCH] fstests: add helper to canonicalize devices used to enable persistent disks Luis Chamberlain
2023-07-24 10:58 ` Andrey Albershteyn
2023-07-25 8:13 ` Zorro Lang
2023-07-25 15:54 ` Darrick J. Wong
2023-07-25 17:50 ` Zorro Lang
2023-07-26 17:34 ` Luis Chamberlain
2023-07-26 4:41 ` Theodore Ts'o
2023-07-26 16:28 ` Luis Chamberlain
2023-07-27 1:13 ` Theodore Ts'o
2023-07-27 1:26 ` Darrick J. Wong [this message]
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=20230727012613.GD11377@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=patches@lists.linux.dev \
--cc=tytso@mit.edu \
--cc=zlang@redhat.com \
/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.