All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/2] selftests/nolibc: run-user improvements
  2077-09-15  0:13 [PATCH 0/2] selftests/nolibc: run-user improvements Thomas Weißschuh
@ 2023-11-09 16:28 ` Konstantin Ryabitsev
  2023-11-09 16:31   ` Willy Tarreau
  2023-11-09 17:44   ` Thomas Weißschuh 
  2077-09-15  0:13 ` [PATCH 1/2] selftests/nolibc: introduce QEMU_ARCH_USER Thomas Weißschuh
  2077-09-15  0:13 ` [PATCH 2/2] selftests/nolibc: run-tests.sh: enable testing via qemu-user Thomas Weißschuh
  2 siblings, 2 replies; 8+ messages in thread
From: Konstantin Ryabitsev @ 2023-11-09 16:28 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Willy Tarreau, Shuah Khan, linux-kselftest, linux-kernel

On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:
        ^^^^^^^^^^^^

I'm curious how this happened, especially since this was sent with b4.

-K

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

* Re: [PATCH 0/2] selftests/nolibc: run-user improvements
  2023-11-09 16:28 ` Konstantin Ryabitsev
@ 2023-11-09 16:31   ` Willy Tarreau
  2023-11-09 16:34     ` Konstantin Ryabitsev
  2023-11-09 17:44   ` Thomas Weißschuh 
  1 sibling, 1 reply; 8+ messages in thread
From: Willy Tarreau @ 2023-11-09 16:31 UTC (permalink / raw)
  To: Konstantin Ryabitsev
  Cc: Thomas Weißschuh, Shuah Khan, linux-kselftest, linux-kernel

On Thu, Nov 09, 2023 at 11:28:41AM -0500, Konstantin Ryabitsev wrote:
> On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:
>         ^^^^^^^^^^^^
> 
> I'm curious how this happened, especially since this was sent with b4.

We didn't want to tell you, but you slept 54 years Konstantin, the
current kernel is version 41.8 ;-)

Willy

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

* Re: [PATCH 0/2] selftests/nolibc: run-user improvements
  2023-11-09 16:31   ` Willy Tarreau
@ 2023-11-09 16:34     ` Konstantin Ryabitsev
  0 siblings, 0 replies; 8+ messages in thread
From: Konstantin Ryabitsev @ 2023-11-09 16:34 UTC (permalink / raw)
  To: Willy Tarreau
  Cc: Thomas Weißschuh, Shuah Khan, linux-kselftest, linux-kernel

On Thu, Nov 09, 2023 at 05:31:42PM +0100, Willy Tarreau wrote:
> > I'm curious how this happened, especially since this was sent with b4.
> 
> We didn't want to tell you, but you slept 54 years Konstantin, the
> current kernel is version 41.8 ;-)

Dang, I see we still use email for kernel development 50 years from now!

-K

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

* Re: [PATCH 0/2] selftests/nolibc: run-user improvements
  2023-11-09 16:28 ` Konstantin Ryabitsev
  2023-11-09 16:31   ` Willy Tarreau
@ 2023-11-09 17:44   ` Thomas Weißschuh 
  2023-11-09 18:04     ` Konstantin Ryabitsev
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Weißschuh  @ 2023-11-09 17:44 UTC (permalink / raw)
  To: Konstantin Ryabitsev
  Cc: Thomas Weißschuh, Willy Tarreau, Shuah Khan,
	linux-kselftest, linux-kernel

Nov 9, 2023 17:28:45 Konstantin Ryabitsev <konstantin@linuxfoundation.org>:

> On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:
>         ^^^^^^^^^^^^
>
> I'm curious how this happened, especially since this was sent with b4.

My system time was messed up.
I blame systemd-timesyncd.


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

* Re: [PATCH 0/2] selftests/nolibc: run-user improvements
  2023-11-09 17:44   ` Thomas Weißschuh 
@ 2023-11-09 18:04     ` Konstantin Ryabitsev
  0 siblings, 0 replies; 8+ messages in thread
From: Konstantin Ryabitsev @ 2023-11-09 18:04 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Thomas Weißschuh, Willy Tarreau, Shuah Khan,
	linux-kselftest, linux-kernel

On Thu, Nov 09, 2023 at 06:44:44PM +0100, Thomas Weißschuh  wrote:
> > On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:
> >         ^^^^^^^^^^^^
> >
> > I'm curious how this happened, especially since this was sent with b4.
> 
> My system time was messed up.
> I blame systemd-timesyncd.

Well, at least we know b4 is Y38K compliant. ;)

Thank you!

-K

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

* [PATCH 0/2] selftests/nolibc: run-user improvements
@ 2077-09-15  0:13 Thomas Weißschuh
  2023-11-09 16:28 ` Konstantin Ryabitsev
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2077-09-15  0:13 UTC (permalink / raw)
  To: Willy Tarreau, Shuah Khan
  Cc: linux-kselftest, linux-kernel, Thomas Weißschuh

A small bugfix for "run-user XARCH=ppc64le" and run-user support for
run-tests.sh.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (2):
      selftests/nolibc: introduce QEMU_ARCH_USER
      selftests/nolibc: run-tests.sh: enable testing via qemu-user

 tools/testing/selftests/nolibc/Makefile     |  5 ++++-
 tools/testing/selftests/nolibc/run-tests.sh | 22 +++++++++++++++++++---
 2 files changed, 23 insertions(+), 4 deletions(-)
---
base-commit: ba335752620565c25c3028fff9496bb8ef373602
change-id: 20770915-nolibc-run-user-845375a3ec4f

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


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

* [PATCH 1/2] selftests/nolibc: introduce QEMU_ARCH_USER
  2077-09-15  0:13 [PATCH 0/2] selftests/nolibc: run-user improvements Thomas Weißschuh
  2023-11-09 16:28 ` Konstantin Ryabitsev
@ 2077-09-15  0:13 ` Thomas Weißschuh
  2077-09-15  0:13 ` [PATCH 2/2] selftests/nolibc: run-tests.sh: enable testing via qemu-user Thomas Weißschuh
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2077-09-15  0:13 UTC (permalink / raw)
  To: Willy Tarreau, Shuah Khan
  Cc: linux-kselftest, linux-kernel, Thomas Weißschuh

While ppc64le shares the same executable with regular ppc64 the user
variant needs has a dedicated executable.
Introduce a new QEMU_ARCH_USER Makefile variable to accommodate that.

Fixes: 17362f3d0bd3 ("selftests/nolibc: use qemu-system-ppc64 for ppc64le")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/testing/selftests/nolibc/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 508435b8ac2a..501bd41e0830 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -106,6 +106,9 @@ QEMU_ARCH_s390       = s390x
 QEMU_ARCH_loongarch  = loongarch64
 QEMU_ARCH            = $(QEMU_ARCH_$(XARCH))
 
+QEMU_ARCH_USER_ppc64le = ppc64le
+QEMU_ARCH_USER         = $(or $(QEMU_ARCH_USER_$(XARCH)),$(QEMU_ARCH_$(XARCH)))
+
 QEMU_BIOS_DIR = /usr/share/edk2/
 QEMU_BIOS_loongarch = $(QEMU_BIOS_DIR)/loongarch64/OVMF_CODE.fd
 
@@ -223,7 +226,7 @@ run-nolibc-test: nolibc-test
 
 # qemu user-land test
 run-user: nolibc-test
-	$(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || :
+	$(Q)qemu-$(QEMU_ARCH_USER) ./nolibc-test > "$(CURDIR)/run.out" || :
 	$(Q)$(REPORT) $(CURDIR)/run.out
 
 initramfs.cpio: kernel nolibc-test

-- 
2.42.1


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

* [PATCH 2/2] selftests/nolibc: run-tests.sh: enable testing via qemu-user
  2077-09-15  0:13 [PATCH 0/2] selftests/nolibc: run-user improvements Thomas Weißschuh
  2023-11-09 16:28 ` Konstantin Ryabitsev
  2077-09-15  0:13 ` [PATCH 1/2] selftests/nolibc: introduce QEMU_ARCH_USER Thomas Weißschuh
@ 2077-09-15  0:13 ` Thomas Weißschuh
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2077-09-15  0:13 UTC (permalink / raw)
  To: Willy Tarreau, Shuah Khan
  Cc: linux-kselftest, linux-kernel, Thomas Weißschuh

qemu-user is faster than a full system test.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/testing/selftests/nolibc/run-tests.sh | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/selftests/nolibc/run-tests.sh
index 3a1eaccfbd8d..c0a5a7cea9fa 100755
--- a/tools/testing/selftests/nolibc/run-tests.sh
+++ b/tools/testing/selftests/nolibc/run-tests.sh
@@ -14,9 +14,10 @@ cache_dir="${XDG_CACHE_HOME:-"$HOME"/.cache}"
 download_location="${cache_dir}/crosstools/"
 build_location="$(realpath "${cache_dir}"/nolibc-tests/)"
 perform_download=0
+test_mode=system
 archs="i386 x86_64 arm64 arm mips32le mips32be ppc ppc64 ppc64le riscv s390 loongarch"
 
-TEMP=$(getopt -o 'j:d:c:b:a:ph' -n "$0" -- "$@")
+TEMP=$(getopt -o 'j:d:c:b:a:m:ph' -n "$0" -- "$@")
 
 eval set -- "$TEMP"
 unset TEMP
@@ -38,6 +39,7 @@ Options:
  -c [VERSION]   Version of toolchains to use (default: ${crosstool_version})
  -a [ARCH]      Host architecture of toolchains to use (default: ${hostarch})
  -b [DIR]       Build location (default: ${build_location})
+ -m [MODE]      Test mode user/system (default: ${test_mode})
 EOF
 }
 
@@ -61,6 +63,9 @@ while true; do
 		'-b')
 			build_location="$(realpath "$2")"
 			shift 2; continue ;;
+		'-m')
+			test_mode="$2"
+			shift 2; continue ;;
 		'-h')
 			print_usage
 			exit 0
@@ -133,11 +138,22 @@ test_arch() {
 	MAKE=(make -j"${nproc}" XARCH="${arch}" CROSS_COMPILE="${cross_compile}" O="${build_dir}")
 
 	mkdir -p "$build_dir"
-	if [ ! -f "${build_dir}/.config" ]; then
+	if [ "$test_mode" = "system" ] && [ ! -f "${build_dir}/.config" ]; then
 		swallow_output "${MAKE[@]}" defconfig
 	fi
+	case "$test_mode" in
+		'system')
+			test_target=run
+			;;
+		'user')
+			test_target=run-user
+			;;
+		*)
+			echo "Unknown mode $test_mode"
+			exit 1
+	esac
 	printf '%-15s' "$arch:"
-	swallow_output "${MAKE[@]}" run V=1
+	swallow_output "${MAKE[@]}" "$test_target" V=1
 	cp run.out run.out."${arch}"
 	"${MAKE[@]}" report | grep passed
 }

-- 
2.42.1


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

end of thread, other threads:[~2023-11-09 18:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2077-09-15  0:13 [PATCH 0/2] selftests/nolibc: run-user improvements Thomas Weißschuh
2023-11-09 16:28 ` Konstantin Ryabitsev
2023-11-09 16:31   ` Willy Tarreau
2023-11-09 16:34     ` Konstantin Ryabitsev
2023-11-09 17:44   ` Thomas Weißschuh 
2023-11-09 18:04     ` Konstantin Ryabitsev
2077-09-15  0:13 ` [PATCH 1/2] selftests/nolibc: introduce QEMU_ARCH_USER Thomas Weißschuh
2077-09-15  0:13 ` [PATCH 2/2] selftests/nolibc: run-tests.sh: enable testing via qemu-user Thomas Weißschuh

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.