All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Alessandro Carminati <alessandro.carminati@gmail.com>
Cc: acarmina@redhat.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 0/2] Fix tst_find_backing_dev adding BTRFS support and /dev/root missing case
Date: Mon, 07 Nov 2022 08:12:33 +0000	[thread overview]
Message-ID: <87leonxim1.fsf@suse.de> (raw)
In-Reply-To: <20221104044149.655317-1-alessandro.carminati@gmail.com>

Hello,

Alessandro Carminati <alessandro.carminati@gmail.com> writes:

> Hello Richard,
>
> Thanks for the detailed review.
> If in the future I want to contribute more to the LTP project, I need
> to provide myself with a CI pipeline like yours.

If you fork the project in Github and create a new branch then the CI
will run on the commits you push to GH.

> I appreciated the review that was very detailed, but I couldn't address
> a single comment.
>
>>> +		if (!ioctl(fd, BTRFS_IOC_FS_INFO, &args)) {
>>What happens if the test author allows this function to be called on
> tmpfs, rootfs, etc.? Or if the FS is valid, but has the same issue as
> BTRFS.
>
> I have gone thorough all the file systems supported by LTP at this stage,
> and I noticed that BTRFS is the only file system that owns this
> singularity.

tmpfs doesn't have a backing device and we support it? E.g.

40 60 0:38 / /tmp rw,nosuid,nodev shared:19 - tmpfs tmpfs rw,nr_inodes=1048576,inode64

So this function shouldn't be called on it and it is not in the test
currently effected[1]. However if the test author does it by accident (99%
chance of happening) then we want a sensible error message.

> In addition to this, I also dared to assume that if device major number
> is == 0 then the test is facing the BTRFS.
> This assumption might not be true in general, but I tested it to be
> true in the test supported file system.
> Is your comment referring to this?

I think it is absolutely correct that we shouldn't design for
requirements we presently don't have. However:

1. It's highly probable this function will be misused.
2. It's relatively easy to guard against.

>
>
> Alessandro Carminati (2):
>   tst_find_backing_dev: Get dev name from /sys/dev/block/*/uevent
>   c-test-api: Documentation updated
>
>  doc/c-test-api.txt |  7 ++--
>  lib/tst_device.c   | 87 ++++++++++++++++++++++++++++++----------------
>  2 files changed, 63 insertions(+), 31 deletions(-)

[1]: The test skips it

.skip_filesystems = (const char *const []) {
	"tmpfs",
	"overlayfs",
	NULL
},

Also note that you can run LTP on any filesystem. You just need to set
the appropriate env vars.


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2022-11-07  8:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[LTP] [PATCH] Fix tst_find_backing_dev when no initramfs>
2022-10-26 14:04 ` [LTP] [PATCH 0/2] tst_find_backing_dev: fix stat fails /dev/root Alessandro Carminati
2022-10-26 14:04   ` [LTP] [PATCH 1/2] tst_find_backing_dev: Get dev name from /sys/dev/block/*/uevent Alessandro Carminati
2022-10-27  8:08     ` Richard Palethorpe
2022-10-27 18:58       ` Alessandro Carminati
2022-10-31 12:08         ` Richard Palethorpe
2022-10-31 16:57           ` Alessandro Carminati
2022-11-01  9:09             ` Richard Palethorpe
2022-11-02 20:34               ` [LTP] [PATCH 0/2] tst_find_backing_dev: fix stat fails /dev/root Alessandro Carminati
2022-11-02 20:34                 ` [LTP] [PATCH 1/2] tst_find_backing_dev: Get dev name from /sys/dev/block/*/uevent Alessandro Carminati
2022-11-03  8:04                   ` Richard Palethorpe
2022-11-04  4:41                     ` [LTP] [PATCH 0/2] Fix tst_find_backing_dev adding BTRFS support and /dev/root missing case Alessandro Carminati
2022-11-04  4:41                       ` [LTP] [PATCH 1/2] tst_find_backing_dev: Get dev name from /sys/*/uevent Alessandro Carminati
2022-11-07  8:46                         ` Richard Palethorpe
2022-11-07 16:39                           ` [LTP] [PATCH 0/2] Fix tst_find_backing_dev adding BTRFS support and /dev/root missing case Alessandro Carminati
2022-11-07 16:39                             ` [LTP] [PATCH 1/2] tst_find_backing_dev: Get dev name from /sys/dev/block/*/uevent Alessandro Carminati
2022-11-08  9:39                               ` Richard Palethorpe
2022-11-09 19:38                                 ` [LTP] [PATCH v6 0/2] tst_find_backing_dev: fix stat fails /dev/root Alessandro Carminati
2022-11-09 19:38                                   ` [LTP] [PATCH v6 1/2] tst_find_backing_dev: Get dev name from /sys/dev/block/*/uevent Alessandro Carminati
2022-11-10 11:16                                     ` Richard Palethorpe
2022-11-09 19:38                                   ` [LTP] [PATCH v6 2/2] c-test-api: Documentation updated Alessandro Carminati
2022-11-10 11:29                                     ` Richard Palethorpe
2022-11-07 16:39                             ` [LTP] [PATCH " Alessandro Carminati
2022-11-04  4:41                       ` Alessandro Carminati
2022-11-07  8:12                       ` Richard Palethorpe [this message]
2022-11-02 20:34                 ` Alessandro Carminati
2022-10-26 14:04   ` Alessandro Carminati

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=87leonxim1.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=acarmina@redhat.com \
    --cc=alessandro.carminati@gmail.com \
    --cc=ltp@lists.linux.it \
    /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.