public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 4/4] Add error coverage for landlock network support
Date: Wed, 6 Nov 2024 12:01:36 +0100	[thread overview]
Message-ID: <513de0d7-d138-4e64-9198-01c65b2e925c@suse.com> (raw)
In-Reply-To: <ZytHE-4rpsrycuI_@yuki.lan>


On 11/6/24 11:38, Cyril Hrubis wrote:
> Hi!
>>>> -	verify_landlock_is_enabled();
>>>> +	abi_current = verify_landlock_is_enabled();
>>>>    
>>>>    	ruleset_attr->handled_access_fs = LANDLOCK_ACCESS_FS_EXECUTE;
>>>>    
>>>>    	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.
>>>
>>>>    }
>>>>    
>> In what sense? abi4 is already the last one. At least the last supported
>> by LTP.
> Because if we request abi4 it will fail on kernels that only support
> abi1. We try hard to skip the abi4 tests, but we wouldn't get there at
> all on abi1 kernel because we would fail to create the ruleset_fd in the
> test setup.
>
> And we cannot initialize the abi to anything newer than abi4 either,
> because we pass abi4 structure in the test. It's fine that we pass abi4
> structure on abi1 system here, because the test only checks for invalid
> cases and all we need here is to pass a valid attr and size so that we
> get rejected by the kernel on the rest of the parameters.
>
I can instantiate both ABI1 and ABI4 structs, then I pass it to the 
tcase accordingly.

Andrea


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2024-11-06 11:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  9:34 [LTP] [PATCH v2 0/4] landlock network coverage support Andrea Cervesato
2024-11-05  9:34 ` [LTP] [PATCH v2 1/4] Fallback landlock network support Andrea Cervesato
2024-11-05 12:31   ` Li Wang
2024-11-05 12:42     ` Li Wang
2024-11-05 12:59       ` Andrea Cervesato via ltp
2024-11-05 13:15         ` Cyril Hrubis
2024-11-05 15:13           ` Cyril Hrubis
2024-11-06  7:13           ` Li Wang
2024-11-05 12:47     ` Andrea Cervesato via ltp
2024-11-05 13:08   ` Cyril Hrubis
2024-11-05 13:15     ` Andrea Cervesato via ltp
2024-11-05  9:34 ` [LTP] [PATCH v2 2/4] Network helpers in landlock suite common functions Andrea Cervesato
2024-11-05 15:27   ` Cyril Hrubis
2024-11-05  9:34 ` [LTP] [PATCH v2 3/4] Add landlock08 test Andrea Cervesato
2024-11-05 15:26   ` Cyril Hrubis
2024-11-05  9:34 ` [LTP] [PATCH v2 4/4] Add error coverage for landlock network support Andrea Cervesato
2024-11-05 15:39   ` Cyril Hrubis
2024-11-05 17:45     ` Cyril Hrubis
2024-11-06 10:29     ` Andrea Cervesato via ltp
2024-11-06 10:38       ` Cyril Hrubis
2024-11-06 11:01         ` Andrea Cervesato via ltp [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=513de0d7-d138-4e64-9198-01c65b2e925c@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=chrubis@suse.cz \
    /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