tests/qtest/pxe-test.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
The s390x PXE tests use memmem() to probe the s390-ccw.img firmware
for device support strings before running each test. MinGW-w64 does
not provide memmem(), breaking the MSYS2/GCC build.
On Win32, skip the bios scan and return true; if the feature is absent
the test will time out rather than skip.
Signed-off-by: Zhuoying Cai <zycai@linux.ibm.com>
Reported-by: Bernhard Beschow <shentey@gmail.com>
---
tests/qtest/pxe-test.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c
index 61c92a2df4..03e4054c5e 100644
--- a/tests/qtest/pxe-test.c
+++ b/tests/qtest/pxe-test.c
@@ -59,6 +59,7 @@ static testdef_t ppc64_tests_slow[] = {
{ NULL },
};
+#ifndef _WIN32
static const char *s390_bios_load(gsize *len)
{
static char *cached_contents;
@@ -106,9 +107,18 @@ out:
*len = cached_len;
return cached_contents;
}
+#endif
static bool s390_bios_has_string(const char *needle)
{
+#ifdef _WIN32
+ /*
+ * memmem() is not available on win32; assume the string is present.
+ * If it is not, the test will timeout instead of detecting missing support.
+ */
+ g_test_message("\"%s\" assumed in bios", needle);
+ return true;
+#else
const char *contents;
gsize len;
bool found;
@@ -118,6 +128,7 @@ static bool s390_bios_has_string(const char *needle)
g_test_message("\"%s\" %s in bios", needle, found ? "found" : "not found");
return found;
+#endif
}
static bool s390_bios_has_net_ccw(void)
--
2.56.0
On 10/8/26 3:51 PM, Zhuoying Cai wrote:
> The s390x PXE tests use memmem() to probe the s390-ccw.img firmware
> for device support strings before running each test. MinGW-w64 does
> not provide memmem(), breaking the MSYS2/GCC build.
>
> On Win32, skip the bios scan and return true; if the feature is absent
> the test will time out rather than skip.
>
> Signed-off-by: Zhuoying Cai <zycai@linux.ibm.com>
> Reported-by: Bernhard Beschow <shentey@gmail.com>
> ---
> tests/qtest/pxe-test.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
Either this or Yonggang Luo's series works for me...
Tested-by: Eric Farman <farman@linux.ibm.com>
>
> diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c
> index 61c92a2df4..03e4054c5e 100644
> --- a/tests/qtest/pxe-test.c
> +++ b/tests/qtest/pxe-test.c
> @@ -59,6 +59,7 @@ static testdef_t ppc64_tests_slow[] = {
> { NULL },
> };
>
> +#ifndef _WIN32
> static const char *s390_bios_load(gsize *len)
> {
> static char *cached_contents;
> @@ -106,9 +107,18 @@ out:
> *len = cached_len;
> return cached_contents;
> }
> +#endif
>
> static bool s390_bios_has_string(const char *needle)
> {
> +#ifdef _WIN32
> + /*
> + * memmem() is not available on win32; assume the string is present.
> + * If it is not, the test will timeout instead of detecting missing support.
> + */
> + g_test_message("\"%s\" assumed in bios", needle);
> + return true;
> +#else
> const char *contents;
> gsize len;
> bool found;
> @@ -118,6 +128,7 @@ static bool s390_bios_has_string(const char *needle)
>
> g_test_message("\"%s\" %s in bios", needle, found ? "found" : "not found");
> return found;
> +#endif
> }
>
> static bool s390_bios_has_net_ccw(void)
Hi Eric, On 10/8/2026 1:28 PM, Eric Farman wrote: > > > On 10/8/26 3:51 PM, Zhuoying Cai wrote: >> The s390x PXE tests use memmem() to probe the s390-ccw.img firmware >> for device support strings before running each test. MinGW-w64 does >> not provide memmem(), breaking the MSYS2/GCC build. >> >> On Win32, skip the bios scan and return true; if the feature is absent >> the test will time out rather than skip. >> >> Signed-off-by: Zhuoying Cai <zycai@linux.ibm.com> >> Reported-by: Bernhard Beschow <shentey@gmail.com> >> --- >> tests/qtest/pxe-test.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) > > Either this or Yonggang Luo's series works for me... > > Tested-by: Eric Farman <farman@linux.ibm.com> > I'm pulling Yonggang implementation, which keeps the same behavior on all OS. Regards, Pierrick
© 2016 - 2026 Red Hat, Inc.