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

Petr Vorel pvorel@suse.cz
Tue Jul 16 18:59:27 CEST 2024


Hi Andrea, Li,

> 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).

I dared to change this to use designated initializers and merged.
(+ follow up fixing size_t printf format)

Thanks!

Kind regards,
Petr

> Kind regards,
> Petr


More information about the ltp mailing list