From: Amaan Qureshi <git@amaanq.com>
To: ell@lists.linux.dev
Cc: Amaan Qureshi <git@amaanq.com>
Subject: [PATCH] test: only flag parse tests as little-endian-only in test-gvariant-message
Date: Tue, 10 Mar 2026 15:48:37 -0400 [thread overview]
Message-ID: <20260310194837.3078283-1-git@amaanq.com> (raw)
The blanket `l_test_set_default_flags(L_TEST_FLAG_LITTLE_ENDIAN_ONLY)`
marks all gvariant-message tests as little-endian-only, but the build
and rewind tests work correctly on big-endian. This causes an XPASS
(unexpected pass) on big-endian systems, which autotools treats as a
test suite failure.
This commit applies the flag only to the three parse tests that compare
against hardcoded little-endian byte sequences.
---
unit/test-gvariant-message.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/unit/test-gvariant-message.c b/unit/test-gvariant-message.c
index 2df7c9b..8f8589f 100644
--- a/unit/test-gvariant-message.c
+++ b/unit/test-gvariant-message.c
@@ -386,22 +386,22 @@ static void builder_rewind(const void *data)
int main(int argc, char *argv[])
{
l_test_init(&argc, &argv);
- l_test_set_default_flags(L_TEST_FLAG_LITTLE_ENDIAN_ONLY);
-
- l_test_add("Basic 1 (parse)", parse_basic_1, &message_data_basic_1);
+ /* Parse tests compare against little-endian reference data */
+ l_test_add_data_func("Basic 1 (parse)", &message_data_basic_1,
+ parse_basic_1, L_TEST_FLAG_LITTLE_ENDIAN_ONLY);
l_test_add("Basic 1 (build)", build_basic_1, &message_data_basic_1);
- l_test_add("Complex 1 (parse)", check_complex_1,
- &message_data_complex_1);
+ l_test_add_data_func("Complex 1 (parse)", &message_data_complex_1,
+ check_complex_1, L_TEST_FLAG_LITTLE_ENDIAN_ONLY);
l_test_add("Complex 1 (build)", build_complex_1,
&message_data_complex_1);
- l_test_add("Empty signature (parse)", check_empty_sig,
- &message_data_empty_sig);
+ l_test_add_data_func("Empty signature (parse)", &message_data_empty_sig,
+ check_empty_sig, L_TEST_FLAG_LITTLE_ENDIAN_ONLY);
l_test_add("Empty signature (build)", build_empty_sig,
&message_data_empty_sig);
l_test_add("Message Builder Rewind Complex 1", builder_rewind,
&message_data_complex_1);
--
2.53.0
next reply other threads:[~2026-03-10 19:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 19:48 Amaan Qureshi [this message]
2026-03-13 11:01 ` [PATCH] test: only flag parse tests as little-endian-only in test-gvariant-message Marcel Holtmann
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=20260310194837.3078283-1-git@amaanq.com \
--to=git@amaanq.com \
--cc=ell@lists.linux.dev \
/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