Re: [LTP] [PATCH v2 4/4] Add error coverage for landlock network support

Cyril Hrubis
2024-11-05T17:45:50Z

Hi!
> > ruleset_fd = TST_EXP_FD_SILENT(tst_syscall(__NR_landlock_create_ruleset,
> > - ruleset_attr, sizeof(struct tst_landlock_ruleset_attr_abi1), 0));
> > + ruleset_attr, sizeof(struct tst_landlock_ruleset_attr_abi4), 0));
> ^
> This should be abi_current otherwise we
> will fail on v1 only system.
^
Not exactly right either.

We have to pass:

MIN(abi, sizeof(struct tst_landlock_ruleset_attr_abi4))

To make sure that we enable either v1 or v4.

--
Cyril Hrubis
chrubis@suse.cz