public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC] fs_bind rework
Date: Thu, 24 Jun 2021 12:06:34 +0200	[thread overview]
Message-ID: <YNRZKs9cHbGxzg4Q@pevik> (raw)
In-Reply-To: <fc235ab1-4796-c1d4-d5b0-f1f112c9ce54@jv-coder.de>

Hi Joerg,

> Hi,

> is there any reason, why the fs_bind suite cannot be reworked into "real"
> ltp tests?
> At the moment all tests from the suite are run by the wrapper script.
Thanks for having a look into dark areas of LTP :). Various testsuites were
imported in 2008, with questionable quality even then, with very little
maintenance since then. There is no reason, just nobody has had a time for that.

First it'd be good to check how much relevant are these tests nowadays.
Ideally asking on relevant kernel mailing list (probably fstests and
linux-fsdevel).

Also checking whether there is a kselftest contain similar test,
to compare which one is more perspective to spend time on improving it.
Quickly looking, there is just tools/testing/selftests/mount (testing whether
unprivileged user cannot remount a read-only mount bind mount as read-write)
and tools/testing/selftests/mount_setattr, thus not really much.

FYI We've been also porting some kselftest tests to LTP (these being relevant
and reasonable clean; benefits are 1) more readable code due lack of reasonable
kselftest API 2) support for more kernel versions).

> If I would convert them, I'd try this programmatically, because of the huge
> number of tests.
> 1. Move stuff from test_fs_bind.sh to a library file
> 2. Convert all tests in fs_bind/* to ltp tests using the library and adding
> them to the runtest file

If there is something just for these tests, maybe just converting it to
fs_bind_lib.sh, which use tst_test.sh and be used by tests - usual approach, see
e.g. cgroup_lib.sh, ipsec_lib.sh (which uses tst_net.sh). Or maybe having more
libs as it looks to me there are more separate test groups (rbind, cloneNS).
Also tools in fs_bind/bin probably have LTP API alternatives.

> This would make every single fs_bind test a single ltp test (~100).
> I do not think that runtime increases significantly, because as far as I see
> it from first glance, test_fs_bind.sh resets the "sandbox" used for the
> tests before every test anyway.
Yep, I wouldn't be worry about increased runtime, this is actually the preferred
approach. Also, various tests can be probably grouped into single shell test,
with $TST_CNT (looking into tests in fs_bind/cloneNS).

> If there is no objection, I would give converting the tests a shot.
+1

> J?rg

Kind regards,
Petr

  reply	other threads:[~2021-06-24 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24  9:29 [LTP] [RFC] fs_bind rework Joerg Vehlow
2021-06-24 10:06 ` Petr Vorel [this message]
2021-06-25 11:39   ` Richard Palethorpe

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=YNRZKs9cHbGxzg4Q@pevik \
    --to=pvorel@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox