[LTP] [PATCH v3 06/11] Add landlock02 test

Petr Vorel pvorel@suse.cz
Thu Jul 11 22:32:56 CEST 2024


Hi Andrea,

Thanks for whole testsuite, generally LGTM.

For this one:
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Reviewed-by: Li Wang <liwang@redhat.com>
(Li added his RBTs in v1, you moved it to v2 but forget to add to v3)

...
> +static struct tcase {
> +	int *fd;
> +	enum landlock_rule_type rule_type;
> +	struct landlock_path_beneath_attr **attr;
> +	int access;
> +	int parent_fd;
> +	uint32_t flags;
> +	int exp_errno;
> +	char *msg;
> +} tcases[] = {
> +	{
> +		&ruleset_fd,
> +		0,
> +		&path_beneath_attr,
> +		LANDLOCK_ACCESS_FS_EXECUTE,
> +		0,
> +		1,
> +		EINVAL,
> +		"Invalid flags"
> +	},
nit: we've been talking about it in other tests - using designated initializers
would make things more readable and allows avoid to specify zeros (feel free to
ignore, sure no need for yet another version).

Kind regards,
Petr


More information about the ltp mailing list