diff mbox series

[1/6] automation: remove CR characters from QEMU serial

Message ID 20231116121310.72210-2-roger.pau@citrix.com (mailing list archive)
State Superseded
Headers show
Series automation: minor fixes and improvements | expand

Commit Message

Roger Pau Monne Nov. 16, 2023, 12:13 p.m. UTC
The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n"
sequence on the web interface used as line returns by the Linux kernel serial
output.  This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
(XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

This not helpful, so strip the CR characters from the output that goes to
stdout, leaving the output in the smoke.serial untouched.

Fixes: 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 automation/scripts/qemu-alpine-x86_64.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Stefano Stabellini Nov. 17, 2023, 1:05 a.m. UTC | #1
On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n"
> sequence on the web interface used as line returns by the Linux kernel serial
> output.  This leads to the QEMU tests output looking like:
> 
> (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
> (XEN) Freed 664kB init memory
> mapping kernel into physical memory
> about to get started...
> qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)
> 
> This not helpful, so strip the CR characters from the output that goes to
> stdout, leaving the output in the smoke.serial untouched.
> 
> Fixes: 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks for the patch. Let me see if I understood correctly.

In the gitlab web UI everything after the last (XEN) log line
disappears, for instance:

https://gitlab.com/xen-project/xen/-/jobs/5556551478

(XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
/ # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)


While if I look at the full logs there are plenty of Linux kernel logs
after it:
https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=

And this patch aims at fixing that, is that correct?


But I went to check your pipeline
https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
and the corresponding job
https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has
the same issue?







> ---
>  automation/scripts/qemu-alpine-x86_64.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/qemu-alpine-x86_64.sh
> index 8c8d0b0cd759..a1c41c030a47 100755
> --- a/automation/scripts/qemu-alpine-x86_64.sh
> +++ b/automation/scripts/qemu-alpine-x86_64.sh
> @@ -84,7 +84,10 @@ qemu-system-x86_64 \
>      -monitor none -serial stdio \
>      -nographic \
>      -device virtio-net-pci,netdev=n0 \
> -    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
> +    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
> +        # Remove carriage returns from the stdout output, as gitlab
> +        # interface chokes on them
> +        tee smoke.serial | sed 's/\r//'
>  
>  set -e
>  (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
> -- 
> 2.42.0
>
Stefano Stabellini Nov. 17, 2023, 1:07 a.m. UTC | #2
On Thu, 16 Nov 2023, Stefano Stabellini wrote:
> On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> > The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n"
> > sequence on the web interface used as line returns by the Linux kernel serial
> > output.  This leads to the QEMU tests output looking like:
> > 
> > (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
> > (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
> > (XEN) Freed 664kB init memory
> > mapping kernel into physical memory
> > about to get started...
> > qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)
> > 
> > This not helpful, so strip the CR characters from the output that goes to
> > stdout, leaving the output in the smoke.serial untouched.
> > 
> > Fixes: 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Thanks for the patch. Let me see if I understood correctly.
> 
> In the gitlab web UI everything after the last (XEN) log line
> disappears, for instance:
> 
> https://gitlab.com/xen-project/xen/-/jobs/5556551478
> 
> (XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
> / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)
> 
> 
> While if I look at the full logs there are plenty of Linux kernel logs
> after it:
> https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=
> 
> And this patch aims at fixing that, is that correct?
> 
> 
> But I went to check your pipeline
> https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
> and the corresponding job
> https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has
> the same issue?
 
I take it back: you only fixed qemu-alpine-x86_64.sh and not the other.

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


Can you please add a quick patch to do the same for all the other qemu-*
scripts?
 
 
 
 

> > ---
> >  automation/scripts/qemu-alpine-x86_64.sh | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/qemu-alpine-x86_64.sh
> > index 8c8d0b0cd759..a1c41c030a47 100755
> > --- a/automation/scripts/qemu-alpine-x86_64.sh
> > +++ b/automation/scripts/qemu-alpine-x86_64.sh
> > @@ -84,7 +84,10 @@ qemu-system-x86_64 \
> >      -monitor none -serial stdio \
> >      -nographic \
> >      -device virtio-net-pci,netdev=n0 \
> > -    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
> > +    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
> > +        # Remove carriage returns from the stdout output, as gitlab
> > +        # interface chokes on them
> > +        tee smoke.serial | sed 's/\r//'
> >  
> >  set -e
> >  (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
> > -- 
> > 2.42.0
> >
Roger Pau Monne Nov. 17, 2023, 10:07 a.m. UTC | #3
On Thu, Nov 16, 2023 at 05:05:28PM -0800, Stefano Stabellini wrote:
> On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> > The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n"
> > sequence on the web interface used as line returns by the Linux kernel serial
> > output.  This leads to the QEMU tests output looking like:
> > 
> > (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
> > (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
> > (XEN) Freed 664kB init memory
> > mapping kernel into physical memory
> > about to get started...
> > qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)
> > 
> > This not helpful, so strip the CR characters from the output that goes to
> > stdout, leaving the output in the smoke.serial untouched.
> > 
> > Fixes: 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Thanks for the patch. Let me see if I understood correctly.
> 
> In the gitlab web UI everything after the last (XEN) log line
> disappears, for instance:
> 
> https://gitlab.com/xen-project/xen/-/jobs/5556551478
> 
> (XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
> / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)
> 
> 
> While if I look at the full logs there are plenty of Linux kernel logs
> after it:
> https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=
> 
> And this patch aims at fixing that, is that correct?
> 
> 
> But I went to check your pipeline
> https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
> and the corresponding job
> https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has
> the same issue?

I made the change just for qemu-alpine-x86_64-gcc:

https://gitlab.com/xen-project/people/royger/xen/-/jobs/5550049674

I didn't realize qemu-smoke-dom0-arm64-gcc was also using it.  If the
fix is acceptable I can submit v2 adding the arm instances also.

Thanks, Roger.
Stefano Stabellini Nov. 18, 2023, 2:25 a.m. UTC | #4
On Fri, 17 Nov 2023, Roger Pau Monné wrote:
> On Thu, Nov 16, 2023 at 05:05:28PM -0800, Stefano Stabellini wrote:
> > On Thu, 16 Nov 2023, Roger Pau Monne wrote:
> > > The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n"
> > > sequence on the web interface used as line returns by the Linux kernel serial
> > > output.  This leads to the QEMU tests output looking like:
> > > 
> > > (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
> > > (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
> > > (XEN) Freed 664kB init memory
> > > mapping kernel into physical memory
> > > about to get started...
> > > qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)
> > > 
> > > This not helpful, so strip the CR characters from the output that goes to
> > > stdout, leaving the output in the smoke.serial untouched.
> > > 
> > > Fixes: 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > 
> > Thanks for the patch. Let me see if I understood correctly.
> > 
> > In the gitlab web UI everything after the last (XEN) log line
> > disappears, for instance:
> > 
> > https://gitlab.com/xen-project/xen/-/jobs/5556551478
> > 
> > (XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
> > / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)
> > 
> > 
> > While if I look at the full logs there are plenty of Linux kernel logs
> > after it:
> > https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=
> > 
> > And this patch aims at fixing that, is that correct?
> > 
> > 
> > But I went to check your pipeline
> > https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
> > and the corresponding job
> > https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has
> > the same issue?
> 
> I made the change just for qemu-alpine-x86_64-gcc:
> 
> https://gitlab.com/xen-project/people/royger/xen/-/jobs/5550049674
> 
> I didn't realize qemu-smoke-dom0-arm64-gcc was also using it.  If the
> fix is acceptable I can submit v2 adding the arm instances also.

Yes the fix is fine. All the qemu scripts are copy/paste design right
now and I am aware they need to be unified. It is not just
qemu-smoke-dom0-arm64-gcc, also qemu-smoke-dom0less-arm64.sh and
basically all the other scripts that start QEMU.
diff mbox series

Patch

diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/qemu-alpine-x86_64.sh
index 8c8d0b0cd759..a1c41c030a47 100755
--- a/automation/scripts/qemu-alpine-x86_64.sh
+++ b/automation/scripts/qemu-alpine-x86_64.sh
@@ -84,7 +84,10 @@  qemu-system-x86_64 \
     -monitor none -serial stdio \
     -nographic \
     -device virtio-net-pci,netdev=n0 \
-    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
+    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
+        # Remove carriage returns from the stdout output, as gitlab
+        # interface chokes on them
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1