Compare commits

...
5 Commits
Author SHA1 Message Date
Hemanth Kumar M D f8f3d451ba nptl: Skip pretty-printer tests without python3 [BZ #34507]
The tests-printers-out rule in Rules wraps $(PYTHON) through
$(test-wrapper-env).  Unlike ordinary tests, which wrap a freshly built
target binary, this wraps python3, a build-host tool.  When cross-testing
with test-wrapper set (e.g. via scripts/cross-test-ssh.sh) the whole
command is forwarded to the target; if the target lacks python3 the shell
returns 127 and evaluate-test.sh reports the six nptl pretty-printer
tests as FAIL instead of UNSUPPORTED.

scripts/test_printers_common.py already exits UNSUPPORTED (77) when its
dependencies are missing, but that is unreachable when python3 itself is
absent.

Guard the invocation with a "command -v" check so the recipe exits 77
(UNSUPPORTED) when python3 is not found.  Native builds are unaffected,
as configure requires python3.

Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
Suggested-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

(cherry picked from commit c958d789db)
2026-09-08 10:42:32 -03:00
Adhemerval Zanella d9a8ff5c01 hesiod: use booleans in parser macro calls
The swallow argument in the INT_FIELD and STRING_FIELD macros is used as a
boolean, change all callers to use false and true instead of 0 and 1.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 7052455f0e)
2026-09-08 10:42:32 -03:00
Adhemerval Zanella 1c1f5103a9 hesiod: fix swapped arguments in service parser
The port number in the service file is a decimal number followed by a
single slash.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 41e9457c53)
2026-09-08 10:42:32 -03:00
Andreas Schwab 049168237f nss_files: use booleans in parser macro calls
The swallow argument in the INT_FIELD and STRING_FIELD macros is used as a
boolean, change all callers to use false and true instead of 0 and 1.

(cherry picked from commit aa56ccb98b)
2026-09-08 10:37:56 -03:00
Andreas Schwab 0770e8b07c nss_files: fix swapped arguments in service parser
The port number in the service file is a decimal number followed by a
single slash.

(cherry picked from commit 66efdda2f8)
2026-09-08 10:37:56 -03:00
11 changed files with 25 additions and 21 deletions
+2
View File
@@ -14,6 +14,8 @@ The following bugs are resolved with this release:
[33848] build: Build fails at openat2.h, redefinition of 'struct
open_how'
[33904] build: error: '__vasprintf_chk' undeclared here
[34507] nptl: Pretty-printer tests FAIL instead of UNSUPPORTED when
cross-testing without python3 on target
[34509] libc: [m68k] Regression: Perl locks up after upgrading glibc
to 2.43
+3 -2
View File
@@ -431,8 +431,9 @@ py-env := PYTHONPATH=$(py-const-dir):$(..)scripts:$${PYTHONPATH}
# The pretty printer files and test_common_printers.py must be present for all.
$(tests-printers-out): $(objpfx)%.out: $(objpfx)% %.py %.c $(pretty-printers) \
$(..)scripts/test_printers_common.py
$(test-wrapper-env) $(py-env) \
$(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers) > $@; \
$(test-wrapper-env) $(py-env) sh -c \
'command -v $(firstword $(PYTHON)) > /dev/null 2>&1 || exit 77; \
exec $(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers)' > $@; \
$(evaluate-test)
endif
+2 -2
View File
@@ -39,8 +39,8 @@ struct protoent_data {};
#include <nss/nss_files/files-parse.c>
LINE_PARSER
("#",
STRING_FIELD (result->p_name, isspace, 1);
INT_FIELD (result->p_proto, isspace, 1, 10,);
STRING_FIELD (result->p_name, isspace, true);
INT_FIELD (result->p_proto, isspace, true, 10,);
)
enum nss_status
+3 -3
View File
@@ -39,9 +39,9 @@ struct servent_data {};
#define ISSC_OR_SPACE(c) ((c) == ';' || isspace (c))
LINE_PARSER
("#",
STRING_FIELD (result->s_name, ISSC_OR_SPACE, 1);
STRING_FIELD (result->s_proto, ISSC_OR_SPACE, 1);
INT_FIELD (result->s_port, ISSC_OR_SPACE, 10, 0, htons);
STRING_FIELD (result->s_name, ISSC_OR_SPACE, true);
STRING_FIELD (result->s_proto, ISSC_OR_SPACE, true);
INT_FIELD (result->s_port, ISSC_OR_SPACE, false, 10, htons);
)
enum nss_status
+3 -3
View File
@@ -36,16 +36,16 @@ LINE_PARSER
unsigned int number;
if (cnt < 5)
INT_FIELD (number, ISCOLON , 0, 16, (unsigned int))
INT_FIELD (number, ISCOLON , false, 16, (unsigned int))
else
INT_FIELD (number, isspace, 1, 16, (unsigned int))
INT_FIELD (number, isspace, true, 16, (unsigned int))
if (number > 0xff)
return 0;
result->e_addr.ether_addr_octet[cnt] = number;
}
};
STRING_FIELD (result->e_name, isspace, 1);
STRING_FIELD (result->e_name, isspace, true);
)
+2 -2
View File
@@ -53,7 +53,7 @@ LINE_PARSER
{
char *addr;
STRING_FIELD (addr, isspace, 1);
STRING_FIELD (addr, isspace, true);
/* Parse address. */
if (__inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
@@ -96,7 +96,7 @@ LINE_PARSER
entdata->h_addr_ptrs[1] = NULL;
result->h_addr_list = entdata->h_addr_ptrs;
STRING_FIELD (result->h_name, isspace, 1);
STRING_FIELD (result->h_name, isspace, true);
})
#define EXTRA_ARGS_VALUE , AF_INET, 0
+2 -2
View File
@@ -38,9 +38,9 @@ LINE_PARSER
char *cp;
int n = 1;
STRING_FIELD (result->n_name, isspace, 1);
STRING_FIELD (result->n_name, isspace, true);
STRING_FIELD (addr, isspace, 1);
STRING_FIELD (addr, isspace, true);
/* 'inet_network' does not add zeroes at the end if the network number
does not contain four byte values. We shift result ourselves if
necessary. */
+1
View File
@@ -20,6 +20,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <nss_files.h>
+2 -2
View File
@@ -29,8 +29,8 @@ struct protoent_data {};
#include "files-parse.c"
LINE_PARSER
("#",
STRING_FIELD (result->p_name, isspace, 1);
INT_FIELD (result->p_proto, isspace, 1, 10,);
STRING_FIELD (result->p_name, isspace, true);
INT_FIELD (result->p_proto, isspace, true, 10,);
)
#include GENERIC
+2 -2
View File
@@ -29,8 +29,8 @@ struct rpcent_data {};
#include "files-parse.c"
LINE_PARSER
("#",
STRING_FIELD (result->r_name, isspace, 1);
INT_FIELD (result->r_number, isspace, 1, 10,);
STRING_FIELD (result->r_name, isspace, true);
INT_FIELD (result->r_number, isspace, true, 10,);
)
#include GENERIC
+3 -3
View File
@@ -31,9 +31,9 @@ struct servent_data {};
#define ISSLASH(c) ((c) == '/')
LINE_PARSER
("#",
STRING_FIELD (result->s_name, isspace, 1);
INT_FIELD (result->s_port, ISSLASH, 10, 0, htons);
STRING_FIELD (result->s_proto, isspace, 1);
STRING_FIELD (result->s_name, isspace, true);
INT_FIELD (result->s_port, ISSLASH, false, 10, htons);
STRING_FIELD (result->s_proto, isspace, true);
)
#include GENERIC