All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tests/tcg/s390x: Provide the libc bits needed by the system tests
@ 2026-09-15 11:09 Ilya Leoshkevich
  2026-09-15 20:44 ` Pierrick Bouvier
  2026-09-16 11:36 ` Alex Bennée
  0 siblings, 2 replies; 3+ messages in thread
From: Ilya Leoshkevich @ 2026-09-15 11:09 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand, Cornelia Huck, Eric Farman,
	Matthew Rosato
  Cc: qemu-s390x, qemu-devel, Pierrick Bouvier, Ilya Leoshkevich,
	Daniel P. Berrangé, Alex Bennée

The meson conversion dropped the SLOF libc include path that commit
3fa010d5317 ("tests/tcg/s390x: Use the SLOF libc headers for the
multiarch tests") had added, breaking the build on systems without a
cross-libc, such as Fedora.

Rather than reintroducing a dependency on the SLOF submodule, which no
other tcg test has, declare the three functions that the reused pc-bios
code actually needs: memcpy(), memset(), and printf().

Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Closes: https://patchew.org/QEMU/20260910100120.2076092-1-berrange@redhat.com/
Suggested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Fixes: cd81cf86834 ("tests/tcg/s390x: system tests")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---

v1: https://lore.kernel.org/qemu-devel/20260914235113.272992-1-iii@linux.ibm.com/
v1 -> v2: Drop the SLOF dependency (Pierrick)

 tests/tcg/s390x/libc/stdio.h       | 11 +++++++++++
 tests/tcg/s390x/libc/string.h      | 12 ++++++++++++
 tests/tcg/s390x/system/meson.build |  2 ++
 3 files changed, 25 insertions(+)
 create mode 100644 tests/tcg/s390x/libc/stdio.h
 create mode 100644 tests/tcg/s390x/libc/string.h

diff --git a/tests/tcg/s390x/libc/stdio.h b/tests/tcg/s390x/libc/stdio.h
new file mode 100644
index 00000000000..c3e45995f65
--- /dev/null
+++ b/tests/tcg/s390x/libc/stdio.h
@@ -0,0 +1,11 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#ifndef QEMU_TESTS_S390X_STDIO_H
+#define QEMU_TESTS_S390X_STDIO_H
+
+#include <minilib.h>
+
+#define printf ml_printf
+
+#endif
diff --git a/tests/tcg/s390x/libc/string.h b/tests/tcg/s390x/libc/string.h
new file mode 100644
index 00000000000..1cabeb90adf
--- /dev/null
+++ b/tests/tcg/s390x/libc/string.h
@@ -0,0 +1,12 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#ifndef QEMU_TESTS_S390X_STRING_H
+#define QEMU_TESTS_S390X_STRING_H
+
+#include <stddef.h>
+
+void *memcpy(void *dest, const void *src, size_t n);
+void *memset(void *dest, int c, size_t size);
+
+#endif
diff --git a/tests/tcg/s390x/system/meson.build b/tests/tcg/s390x/system/meson.build
index ca07f503058..1e360e70821 100644
--- a/tests/tcg/s390x/system/meson.build
+++ b/tests/tcg/s390x/system/meson.build
@@ -6,11 +6,13 @@ link_script = files('../softmmu.ld')[0]
 head64 = files('../head64.S')[0]
 console = files('../console.c')[0]
 ipl_inc = meson.project_source_root()/'include'/'hw'/'s390x'/'ipl'
+libc_inc = meson.current_source_dir()/'..'/'libc'
 cflags = ['-nostdlib',
           '-ffreestanding',
           '-Wa,--noexecstack',
           '-I', minilib_dir, minilib_printf,
           '-I', ipl_inc,
+          '-I', libc_inc,
           '-march=z13',
           head64, console]
 asmflags = ['-nostdlib',
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] tests/tcg/s390x: Provide the libc bits needed by the system tests
  2026-09-15 11:09 [PATCH v2] tests/tcg/s390x: Provide the libc bits needed by the system tests Ilya Leoshkevich
@ 2026-09-15 20:44 ` Pierrick Bouvier
  2026-09-16 11:36 ` Alex Bennée
  1 sibling, 0 replies; 3+ messages in thread
From: Pierrick Bouvier @ 2026-09-15 20:44 UTC (permalink / raw)
  To: Ilya Leoshkevich, Richard Henderson, David Hildenbrand,
	Cornelia Huck, Eric Farman, Matthew Rosato
  Cc: qemu-s390x, qemu-devel, Daniel P. Berrangé, Alex Bennée

On 9/15/2026 4:09 AM, Ilya Leoshkevich wrote:
> The meson conversion dropped the SLOF libc include path that commit
> 3fa010d5317 ("tests/tcg/s390x: Use the SLOF libc headers for the
> multiarch tests") had added, breaking the build on systems without a
> cross-libc, such as Fedora.
> 
> Rather than reintroducing a dependency on the SLOF submodule, which no
> other tcg test has, declare the three functions that the reused pc-bios
> code actually needs: memcpy(), memset(), and printf().
> 
> Reported-by: Daniel P. Berrangé <berrange@redhat.com>
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Closes: https://patchew.org/QEMU/20260910100120.2076092-1-berrange@redhat.com/
> Suggested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Fixes: cd81cf86834 ("tests/tcg/s390x: system tests")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> 
> v1: https://lore.kernel.org/qemu-devel/20260914235113.272992-1-iii@linux.ibm.com/
> v1 -> v2: Drop the SLOF dependency (Pierrick)
> 
>  tests/tcg/s390x/libc/stdio.h       | 11 +++++++++++
>  tests/tcg/s390x/libc/string.h      | 12 ++++++++++++
>  tests/tcg/s390x/system/meson.build |  2 ++
>  3 files changed, 25 insertions(+)
>  create mode 100644 tests/tcg/s390x/libc/stdio.h
>  create mode 100644 tests/tcg/s390x/libc/string.h
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] tests/tcg/s390x: Provide the libc bits needed by the system tests
  2026-09-15 11:09 [PATCH v2] tests/tcg/s390x: Provide the libc bits needed by the system tests Ilya Leoshkevich
  2026-09-15 20:44 ` Pierrick Bouvier
@ 2026-09-16 11:36 ` Alex Bennée
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Bennée @ 2026-09-16 11:36 UTC (permalink / raw)
  To: Ilya Leoshkevich
  Cc: Richard Henderson, David Hildenbrand, Cornelia Huck, Eric Farman,
	Matthew Rosato, qemu-s390x, qemu-devel, Pierrick Bouvier,
	Daniel P. Berrangé

Ilya Leoshkevich <iii@linux.ibm.com> writes:

> The meson conversion dropped the SLOF libc include path that commit
> 3fa010d5317 ("tests/tcg/s390x: Use the SLOF libc headers for the
> multiarch tests") had added, breaking the build on systems without a
> cross-libc, such as Fedora.
>
> Rather than reintroducing a dependency on the SLOF submodule, which no
> other tcg test has, declare the three functions that the reused pc-bios
> code actually needs: memcpy(), memset(), and printf().
>
> Reported-by: Daniel P. Berrangé <berrange@redhat.com>
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Closes: https://patchew.org/QEMU/20260910100120.2076092-1-berrange@redhat.com/
> Suggested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Fixes: cd81cf86834 ("tests/tcg/s390x: system tests")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>

Queued to testing/next, thanks.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-16 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 11:09 [PATCH v2] tests/tcg/s390x: Provide the libc bits needed by the system tests Ilya Leoshkevich
2026-09-15 20:44 ` Pierrick Bouvier
2026-09-16 11:36 ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.