From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/3] cgroups: Add first IO controller test
Date: Tue, 12 Apr 2022 10:58:28 +0200 [thread overview]
Message-ID: <YlU/NFQxrHOHx4nd@pevik> (raw)
In-Reply-To: <20220329074440.26214-3-rpalethorpe@suse.com>
Hi Richie,
LGTM, just please remove needs_device as not needed.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> +static void setup(void)
> +{
> + char buf[PATH_MAX] = { 0 };
> + char *path = SAFE_GETCWD(buf, PATH_MAX - sizeof("mnt") - 1);
> + struct stat st;
> +
> + strcpy(path + strlen(path), "/mnt");
> +
> + tst_stat_mount_dev(path, &st);
> + dev_major = major(st.st_rdev);
> + dev_minor = minor(st.st_rdev);
If we ever support test setup run inside do_setup() (i.e. setup function which
would be run just once - before for_each_variant(), for_each_filesystem() and
fork_testrun()), this test would have use case for it (I suppose more tests
which use .all_filesystems). Because tst_stat_mount_dev() could be run just for
first filesystem. But that's not related to the testcase.
Kind regards,
Petr
> +}
> +
> +static struct tst_test test = {
> + .test_all = run,
> + .setup = setup,
> + .needs_device = 1,
> + .mntpoint = "mnt",
> + .mount_device = 1,
> + .all_filesystems = 1,
> + .skip_filesystems = (const char *const[]){ "ntfs", "tmpfs", NULL },
> + .needs_cgroup_ver = TST_CG_V2,
> + .needs_cgroup_ctrls = (const char *const[]){ "io", NULL },
> +};
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-04-12 8:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 7:44 [LTP] [PATCH v2 1/3] API/cgroup: Add io controller Richard Palethorpe via ltp
2022-03-29 7:44 ` [LTP] [PATCH v2 2/3] API/device: Add func to stat the actual dev mounted to a path Richard Palethorpe via ltp
2022-04-12 8:46 ` Petr Vorel
2022-03-29 7:44 ` [LTP] [PATCH v2 3/3] cgroups: Add first IO controller test Richard Palethorpe via ltp
2022-04-01 8:26 ` Petr Vorel
2022-04-12 11:28 ` Richard Palethorpe
2022-04-12 8:58 ` Petr Vorel [this message]
2022-04-12 8:26 ` [LTP] [PATCH v2 1/3] API/cgroup: Add io controller Petr Vorel
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=YlU/NFQxrHOHx4nd@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox