All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Some tweaks for semihosting-tests
@ 2023-01-05 11:00 Alex Bennée
  2023-01-05 11:00 ` [PATCH 1/4] semihosting-tests: add timeout support Alex Bennée
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Alex Bennée @ 2023-01-05 11:00 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, Alex Bennée

Hi Peter,

I discovered that semihosting syscall support got broken and while
preparing to bisect I ran into a few warts.

 Alex Bennée (4):
       semihosting-tests: add timeout support
       Makefile: drop microbit.lds from the sources
       Makefile: simplify path to QEMU binaries
       Makefile: explicitly disable -net for our -M virt runs

Alex Bennée (4):
  semihosting-tests: add timeout support
  Makefile: drop microbit.lds from the sources
  Makefile: simplify path to QEMU binaries
  Makefile: explicitly disable -net for our -M virt runs

 Makefile | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

-- 
2.34.1



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

* [PATCH 1/4] semihosting-tests: add timeout support
  2023-01-05 11:00 [PATCH 0/4] Some tweaks for semihosting-tests Alex Bennée
@ 2023-01-05 11:00 ` Alex Bennée
  2023-01-05 11:00 ` [PATCH 2/4] Makefile: drop microbit.lds from the sources Alex Bennée
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2023-01-05 11:00 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, Alex Bennée

If you break semihosting in a way that hangs you need to be able to
detect that. Add support for a timeout.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1296fde..f58b79e 100644
--- a/Makefile
+++ b/Makefile
@@ -57,10 +57,14 @@ SYSGDB := -gdb tcp::$(GDBPORT)
 USRGDB := -g $(GDBPORT)
 endif
 
+ifdef TIMEOUT
+SYSTIMEOUT := timeout --foreground 10s
+endif
+
 QEMU_ARM = $(QEMU_BUILDDIR)/arm-linux-user/qemu-arm $(USRGDB)
 QEMU_AARCH64 = $(QEMU_BUILDDIR)/aarch64-linux-user/qemu-aarch64 $(USRGDB)
-QEMU_SYSTEM_ARM = $(QEMU_BUILDDIR)/arm-softmmu/qemu-system-arm $(SYSGDB)
-QEMU_SYSTEM_AARCH64 = $(QEMU_BUILDDIR)/aarch64-softmmu/qemu-system-aarch64 $(SYSGDB)
+QEMU_SYSTEM_ARM = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/arm-softmmu/qemu-system-arm $(SYSGDB)
+QEMU_SYSTEM_AARCH64 = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/aarch64-softmmu/qemu-system-aarch64 $(SYSGDB)
 
 all: usertest-a32 usertest-a64 usertest-t32 \
 	systest-a32.axf systest-t32.axf \
-- 
2.34.1



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

* [PATCH 2/4] Makefile: drop microbit.lds from the sources
  2023-01-05 11:00 [PATCH 0/4] Some tweaks for semihosting-tests Alex Bennée
  2023-01-05 11:00 ` [PATCH 1/4] semihosting-tests: add timeout support Alex Bennée
@ 2023-01-05 11:00 ` Alex Bennée
  2023-01-05 11:00 ` [PATCH 3/4] Makefile: simplify path to QEMU binaries Alex Bennée
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2023-01-05 11:00 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, Alex Bennée

Otherwise the compiler will complain about the lds file being included
more than once as we include all the dependencies in the compile step.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f58b79e..7b9a5f4 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ all: usertest-a32 usertest-a64 usertest-t32 \
 usertest-srcs = usertest.c semihosting.c semicall.S printf/printf.c
 
 systest-srcs = start.S string.c $(usertest-srcs)
-microbit-systest-srcs = microbit.lds start-microbit.S string.c $(usertest-srcs)
+microbit-systest-srcs = start-microbit.S string.c $(usertest-srcs)
 
 usertest-a32: $(usertest-srcs)
 	$(A32GCC) --static -o $@ $^
-- 
2.34.1



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

* [PATCH 3/4] Makefile: simplify path to QEMU binaries
  2023-01-05 11:00 [PATCH 0/4] Some tweaks for semihosting-tests Alex Bennée
  2023-01-05 11:00 ` [PATCH 1/4] semihosting-tests: add timeout support Alex Bennée
  2023-01-05 11:00 ` [PATCH 2/4] Makefile: drop microbit.lds from the sources Alex Bennée
@ 2023-01-05 11:00 ` Alex Bennée
  2023-01-05 11:00 ` [PATCH 4/4] Makefile: explicitly disable -net for our -M virt runs Alex Bennée
  2023-01-05 17:14 ` [PATCH 0/4] Some tweaks for semihosting-tests Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2023-01-05 11:00 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, Alex Bennée

We've had the new build layout for a while now.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 7b9a5f4..6905b8d 100644
--- a/Makefile
+++ b/Makefile
@@ -61,10 +61,10 @@ ifdef TIMEOUT
 SYSTIMEOUT := timeout --foreground 10s
 endif
 
-QEMU_ARM = $(QEMU_BUILDDIR)/arm-linux-user/qemu-arm $(USRGDB)
-QEMU_AARCH64 = $(QEMU_BUILDDIR)/aarch64-linux-user/qemu-aarch64 $(USRGDB)
-QEMU_SYSTEM_ARM = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/arm-softmmu/qemu-system-arm $(SYSGDB)
-QEMU_SYSTEM_AARCH64 = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/aarch64-softmmu/qemu-system-aarch64 $(SYSGDB)
+QEMU_ARM = $(QEMU_BUILDDIR)/qemu-arm $(USRGDB)
+QEMU_AARCH64 = $(QEMU_BUILDDIR)/qemu-aarch64 $(USRGDB)
+QEMU_SYSTEM_ARM = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/qemu-system-arm $(SYSGDB)
+QEMU_SYSTEM_AARCH64 = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/qemu-system-aarch64 $(SYSGDB)
 
 all: usertest-a32 usertest-a64 usertest-t32 \
 	systest-a32.axf systest-t32.axf \
-- 
2.34.1



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

* [PATCH 4/4] Makefile: explicitly disable -net for our -M virt runs
  2023-01-05 11:00 [PATCH 0/4] Some tweaks for semihosting-tests Alex Bennée
                   ` (2 preceding siblings ...)
  2023-01-05 11:00 ` [PATCH 3/4] Makefile: simplify path to QEMU binaries Alex Bennée
@ 2023-01-05 11:00 ` Alex Bennée
  2023-01-05 17:14 ` [PATCH 0/4] Some tweaks for semihosting-tests Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2023-01-05 11:00 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, Alex Bennée

At some points in the bisect history this stops the default virtio-net
complaining when it can't find "efi-virtio.rom".

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 6905b8d..a8cae07 100644
--- a/Makefile
+++ b/Makefile
@@ -126,22 +126,22 @@ run-usertest-a64: usertest-a64
 	$(QEMU_AARCH64) usertest-a64
 
 run-systest-a32: systest-a32.axf
-	$(QEMU_SYSTEM_ARM) -M virt --display none --semihosting -kernel $^
+	$(QEMU_SYSTEM_ARM) -M virt -net none --display none --semihosting -kernel $^
 
 run-systest-t32: systest-t32.axf
-	$(QEMU_SYSTEM_ARM) -M virt --display none --semihosting -kernel $^
+	$(QEMU_SYSTEM_ARM) -M virt -net none --display none --semihosting -kernel $^
 
 run-systest-a32-hlt: systest-a32-hlt.axf
-	$(QEMU_SYSTEM_ARM) -M virt --display none --semihosting -kernel $^
+	$(QEMU_SYSTEM_ARM) -M virt -net none --display none --semihosting -kernel $^
 
 run-systest-t32-hlt: systest-t32-hlt.axf
-	$(QEMU_SYSTEM_ARM) -M virt --display none --semihosting -kernel $^
+	$(QEMU_SYSTEM_ARM) -M virt -net none --display none --semihosting -kernel $^
 
 run-systest-t32-bkpt: systest-t32-bkpt.axf
 	$(QEMU_SYSTEM_ARM) -M microbit --display none --semihosting -kernel $^
 
 run-systest-a64: systest-a64.axf
-	$(QEMU_SYSTEM_AARCH64) -M virt --display none --semihosting \
+	$(QEMU_SYSTEM_AARCH64) -M virt -net none --display none --semihosting \
 		-cpu cortex-a57 -kernel $^
 
 run: run-usertest-a32 run-usertest-t32 run-usertest-a64 \
-- 
2.34.1



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

* Re: [PATCH 0/4] Some tweaks for semihosting-tests
  2023-01-05 11:00 [PATCH 0/4] Some tweaks for semihosting-tests Alex Bennée
                   ` (3 preceding siblings ...)
  2023-01-05 11:00 ` [PATCH 4/4] Makefile: explicitly disable -net for our -M virt runs Alex Bennée
@ 2023-01-05 17:14 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2023-01-05 17:14 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Thu, 5 Jan 2023 at 11:00, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Hi Peter,
>
> I discovered that semihosting syscall support got broken and while
> preparing to bisect I ran into a few warts.
>
>  Alex Bennée (4):
>        semihosting-tests: add timeout support
>        Makefile: drop microbit.lds from the sources
>        Makefile: simplify path to QEMU binaries
>        Makefile: explicitly disable -net for our -M virt runs
>
> Alex Bennée (4):
>   semihosting-tests: add timeout support
>   Makefile: drop microbit.lds from the sources
>   Makefile: simplify path to QEMU binaries
>   Makefile: explicitly disable -net for our -M virt runs

Thanks, applied to the semihosting-tests repo. I also threw in
a patch adding a "make clean" target, since we turned out to be
missing one.

-- PMM


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

end of thread, other threads:[~2023-01-05 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 11:00 [PATCH 0/4] Some tweaks for semihosting-tests Alex Bennée
2023-01-05 11:00 ` [PATCH 1/4] semihosting-tests: add timeout support Alex Bennée
2023-01-05 11:00 ` [PATCH 2/4] Makefile: drop microbit.lds from the sources Alex Bennée
2023-01-05 11:00 ` [PATCH 3/4] Makefile: simplify path to QEMU binaries Alex Bennée
2023-01-05 11:00 ` [PATCH 4/4] Makefile: explicitly disable -net for our -M virt runs Alex Bennée
2023-01-05 17:14 ` [PATCH 0/4] Some tweaks for semihosting-tests Peter Maydell

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.