From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Willy Tarreau <w@1wt.eu>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/nolibc: only run constructor tests on nolibc
Date: Mon, 17 Feb 2025 22:24:11 +0100 [thread overview]
Message-ID: <670b08a4-9bc5-4700-94bb-272fda5c59d7@t-8ch.de> (raw)
In-Reply-To: <20250216093940.GA2192@1wt.eu>
On 2025-02-16 10:39:40+0100, Willy Tarreau wrote:
> On Wed, Feb 12, 2025 at 07:01:01PM +0100, Thomas Weißschuh wrote:
> > The nolibc testsuite can be run against other libcs to test for
> > interoperability. Some aspects of the constructor execution are not
> > standardized and musl does not provide all tested feature, for one it
> > does not provide arguments to the constructors, anymore?
> >
> > Skip the constructor tests on non-nolibc configurations.
>
> I'm not much surprised, I've always avoided arguments in my use of
> constructors due to a lack of portability. However the patch disables
> all constructors tests, while I'm seeing that the linkage_test version
> does not make use of arguments, though there is an implied expectation
> that they're executed in declaration order, which is not granted.
The tests are written specifically to test for execution order.
While we can not rely on the order for other libcs, the idea was to
expect a given order for the nolibc implementation.
> I'm wondering if we shouldn't make the tests more robust:
> 1) explicitly set linkage_test_constructor_test_value to zero in the
> declaration, because here it's not set so we have no guarantee
> (we're not in the kernel)
Ack.
> 2) only add values to check for cumulated values (e.g. |1 in const1,
> |2 in const2) and verify that the result is properly 3
This would stop validating the order.
> 3) make the argument test add a distinct value (|4) so that when
> testing it's instantly obvious which test was not called.
>
> And indeed, we can disable the tests we know fail on other libcs and
> even split that by feature (e.g. test that at least one constructor
> was called using !=0, that all non-arg ones were called via &3 == 3,
> and that the args were passed via &4==4). That would allow to further
> refine the tests if desired so that we can keep the differences in mind.
I'm not yet convinced about the additional value.
But I'll give it some thought.
> In any case all of this can also be done later, and I'm obviously fine
> with this immediate adjustement.
>
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
> Acked-by: Willy Tarreau <w@1wt.eu>
Thanks!
> Willy
next prev parent reply other threads:[~2025-02-17 21:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 18:01 Thomas Weißschuh
2025-02-16 9:39 ` Willy Tarreau
2025-02-17 21:24 ` Thomas Weißschuh [this message]
2025-02-22 9:38 ` Willy Tarreau
2025-02-25 9:37 ` Thomas Weißschuh
2025-03-01 11:07 ` Willy Tarreau
2025-03-02 21:56 ` Thomas Weißschuh
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=670b08a4-9bc5-4700-94bb-272fda5c59d7@t-8ch.de \
--to=linux@weissschuh.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=w@1wt.eu \
/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
all inboxes | Powered by JetHome®