From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v7 16/16] Add listmount04 test
Date: Wed, 9 Oct 2024 12:45:48 +0200 [thread overview]
Message-ID: <ZwZe3LBHEVeII4Vk@yuki.lan> (raw)
In-Reply-To: <20241009-listmount_statmount-v7-16-d5ad31d47f68@suse.com>
Hi!
> +static struct tcase {
> + int req_usage;
> + uint32_t size;
> + uint32_t spare;
> + uint64_t mnt_id;
> + uint64_t param;
> + uint64_t *mnt_ids;
> + size_t nr_mnt_ids;
> + uint64_t flags;
> + int exp_errno;
> + char *msg;
> +} tcases[] = {
> + {
> + .req_usage = 0,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = EFAULT,
> + .msg = "request points to unaccessible memory",
> + },
> + {
> + .req_usage = 1,
> + .size = MNT_ID_REQ_SIZE_VER0,
> + .spare = 0,
> + .mnt_id = LSMT_ROOT,
> + .param = 0,
> + .mnt_ids = NULL,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = EFAULT,
> + .msg = "mnt_ids points to unaccessible memory",
> + },
> + {
> + .req_usage = 1,
> + .size = MNT_ID_REQ_SIZE_VER0,
> + .spare = 0,
> + .mnt_id = LSMT_ROOT,
> + .param = 0,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = -1,
> + .exp_errno = EINVAL,
> + .msg = "invalid flags",
> + },
> + {
> + .req_usage = 1,
> + .size = 0,
> + .spare = 0,
> + .mnt_id = LSMT_ROOT,
> + .param = 0,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = EINVAL,
> + .msg = "insufficient mnt_id_req.size",
> + },
> + {
> + .req_usage = 1,
> + .size = MNT_ID_REQ_SIZE_VER0,
> + .spare = -1,
> + .mnt_id = LSMT_ROOT,
> + .param = 0,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = EINVAL,
> + .msg = "invalid mnt_id_req.spare",
> + },
> + {
> + .req_usage = 1,
> + .size = MNT_ID_REQ_SIZE_VER0,
> + .spare = 0,
> + .mnt_id = LSMT_ROOT,
> + .param = STATMOUNT_PROPAGATE_FROM + 1,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = EINVAL,
> + .msg = "invalid mnt_id_req.param",
> + },
> + {
> + .req_usage = 1,
> + .size = MNT_ID_REQ_SIZE_VER0,
> + .spare = 0,
> + .mnt_id = 0,
> + .param = 0,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = EINVAL,
> + .msg = "invalid mnt_id_req.mnt_id",
> + },
> + {
> + .req_usage = 1,
> + .size = MNT_ID_REQ_SIZE_VER0,
> + .spare = 0,
> + .mnt_id = LSMT_ROOT - 1,
> + .param = 0,
> + .mnt_ids = mnt_ids,
> + .nr_mnt_ids = MNT_SIZE,
> + .flags = 0,
> + .exp_errno = ENOENT,
> + .msg = "non-existant mnt_id",
> + },
> +};
We can omit setting spare, params and flags to 0 here, to make it
shorter, otherwise:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-10-09 10:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 8:29 [LTP] [PATCH v7 00/16] statmount/listmount testing suites Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 01/16] Add SAFE_STATX macro Andrea Cervesato
2024-10-09 9:12 ` Cyril Hrubis
2024-10-09 8:29 ` [LTP] [PATCH v7 02/16] Add TST_EXP_EQ_STR macro Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 03/16] Add listmount/statmount syscalls Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 04/16] Add listmount/statmount fallback declarations Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 05/16] Add listmount01 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 06/16] Add listmount02 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 07/16] Add statmount01 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 08/16] Add statmount02 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 09/16] Add statmount03 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 10/16] Add statmount04 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 11/16] Add statmount05 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 12/16] Add statmount06 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 13/16] Add statmount07 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 14/16] Add statmount08 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 15/16] Add listmount03 test Andrea Cervesato
2024-10-09 8:29 ` [LTP] [PATCH v7 16/16] Add listmount04 test Andrea Cervesato
2024-10-09 10:45 ` Cyril Hrubis [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=ZwZe3LBHEVeII4Vk@yuki.lan \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.de \
--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.