From: Anthony PERARD <anthony.perard@vates.tech>
Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
---
 automation/scripts/qubes-x86-64.sh | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
index 7a4c5ae489..6ab8412f45 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -298,6 +298,12 @@ TEST_RESULT=$?
 
 if [ -n "$retrieve_xml" ]; then
     nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null
+    # Workaround duplicated data been received
+    sed -i.old '/^<\/testsuites>/q' tests-junit.xml > /dev/null
+    extra_line_in_junit=$(($(wc -l < tests-junit.xml.old) - $(wc -l < tests-junit.xml)))
+    if [ $extra_line_in_junit -gt 0 ]; then
+        echo "WARNING: Found $extra_line_in_junit too many lines in junit."
+    fi
     # Findout if one of the test failed
     if ! grep -q '</testsuites>' tests-junit.xml; then
         echo "ERROR: tests-junit.xml is incomplete or missing."
-- 
Anthony PERARDOn 03/06/2025 1:42 pm, Anthony PERARD wrote: > From: Anthony PERARD <anthony.perard@vates.tech> > > Signed-off-by: Anthony PERARD <anthony.perard@vates.tech> > --- > automation/scripts/qubes-x86-64.sh | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh > index 7a4c5ae489..6ab8412f45 100755 > --- a/automation/scripts/qubes-x86-64.sh > +++ b/automation/scripts/qubes-x86-64.sh > @@ -298,6 +298,12 @@ TEST_RESULT=$? > > if [ -n "$retrieve_xml" ]; then > nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null > + # Workaround duplicated data been received > + sed -i.old '/^<\/testsuites>/q' tests-junit.xml > /dev/null > + extra_line_in_junit=$(($(wc -l < tests-junit.xml.old) - $(wc -l < tests-junit.xml))) > + if [ $extra_line_in_junit -gt 0 ]; then > + echo "WARNING: Found $extra_line_in_junit too many lines in junit." > + fi Is this the cause of https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1849342222/test_report getting a row of 0's for ADL ? Why are we getting duplicate data? nc is running in TCP mode, not UDP, so it's not that. ~Andrew
On Tue, Jun 03, 2025 at 03:12:32PM +0100, Andrew Cooper wrote: > On 03/06/2025 1:42 pm, Anthony PERARD wrote: > > if [ -n "$retrieve_xml" ]; then > > nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null > > + # Workaround duplicated data been received > > + sed -i.old '/^<\/testsuites>/q' tests-junit.xml > /dev/null > > + extra_line_in_junit=$(($(wc -l < tests-junit.xml.old) - $(wc -l < tests-junit.xml))) > > + if [ $extra_line_in_junit -gt 0 ]; then > > + echo "WARNING: Found $extra_line_in_junit too many lines in junit." > > + fi > > Is this the cause of > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1849342222/test_report > getting a row of 0's for ADL ? Well, the error I had was this one: "FATAL: Extra content at the end of the document" https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1848598740/test_report And indeed, when I managed to dl the junit.xml, there were the end of the document duplicated many times. > Why are we getting duplicate data? nc is running in TCP mode, not UDP, > so it's not that. I think Marek talked about some notwork equiment in the middle? I managed to find in matrix where they were talk about this duplication of data, well, with `nc` dl for ever, with lots of duplicated data: https://matrix.to/#/!XcEgmbCouiNWHlGdHk:matrix.org/$OkZmPOandaPy_OVAU8hpoAs14JWHtI6rXYrIZawUqDE?via=matrix.org&via=nitro.chat&via=aperard.fr from marmarek > So, it appears to be a bug in pasta - the thing that podman uses to > proxy traffic out of the container's network namespace. You know, an > additional network stack in userspace. I have no idea if it is the same issue, but I had extra content in the junit file with nearly all my jobs. Cheers, -- Anthony PERARD
On Tue, 3 Jun 2025, Anthony PERARD wrote: > On Tue, Jun 03, 2025 at 03:12:32PM +0100, Andrew Cooper wrote: > > On 03/06/2025 1:42 pm, Anthony PERARD wrote: > > > if [ -n "$retrieve_xml" ]; then > > > nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null > > > + # Workaround duplicated data been received > > > + sed -i.old '/^<\/testsuites>/q' tests-junit.xml > /dev/null > > > + extra_line_in_junit=$(($(wc -l < tests-junit.xml.old) - $(wc -l < tests-junit.xml))) > > > + if [ $extra_line_in_junit -gt 0 ]; then > > > + echo "WARNING: Found $extra_line_in_junit too many lines in junit." > > > + fi > > > > Is this the cause of > > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1849342222/test_report > > getting a row of 0's for ADL ? > > Well, the error I had was this one: > "FATAL: Extra content at the end of the document" > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1848598740/test_report > > And indeed, when I managed to dl the junit.xml, there were the end of > the document duplicated many times. Wouldn't it better to do |sort|uniq to dedup the file?
On Tue, Jun 03, 2025 at 11:29:11AM -0700, Stefano Stabellini wrote: > On Tue, 3 Jun 2025, Anthony PERARD wrote: > > On Tue, Jun 03, 2025 at 03:12:32PM +0100, Andrew Cooper wrote: > > > On 03/06/2025 1:42 pm, Anthony PERARD wrote: > > > > if [ -n "$retrieve_xml" ]; then > > > > nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null > > > > + # Workaround duplicated data been received > > > > + sed -i.old '/^<\/testsuites>/q' tests-junit.xml > /dev/null > > > > + extra_line_in_junit=$(($(wc -l < tests-junit.xml.old) - $(wc -l < tests-junit.xml))) > > > > + if [ $extra_line_in_junit -gt 0 ]; then > > > > + echo "WARNING: Found $extra_line_in_junit too many lines in junit." > > > > + fi > > > > > > Is this the cause of > > > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1849342222/test_report > > > getting a row of 0's for ADL ? > > > > Well, the error I had was this one: > > "FATAL: Extra content at the end of the document" > > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1848598740/test_report > > > > And indeed, when I managed to dl the junit.xml, there were the end of > > the document duplicated many times. > > Wouldn't it better to do |sort|uniq to dedup the file? I don't think XML structure will survive it... -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab
On Tue, 3 Jun 2025, Marek Marczykowski-Górecki wrote: > On Tue, Jun 03, 2025 at 11:29:11AM -0700, Stefano Stabellini wrote: > > On Tue, 3 Jun 2025, Anthony PERARD wrote: > > > On Tue, Jun 03, 2025 at 03:12:32PM +0100, Andrew Cooper wrote: > > > > On 03/06/2025 1:42 pm, Anthony PERARD wrote: > > > > > if [ -n "$retrieve_xml" ]; then > > > > > nc -w 10 "$SUT_ADDR" 8080 > tests-junit.xml </dev/null > > > > > + # Workaround duplicated data been received > > > > > + sed -i.old '/^<\/testsuites>/q' tests-junit.xml > /dev/null > > > > > + extra_line_in_junit=$(($(wc -l < tests-junit.xml.old) - $(wc -l < tests-junit.xml))) > > > > > + if [ $extra_line_in_junit -gt 0 ]; then > > > > > + echo "WARNING: Found $extra_line_in_junit too many lines in junit." > > > > > + fi > > > > > > > > Is this the cause of > > > > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1849342222/test_report > > > > getting a row of 0's for ADL ? > > > > > > Well, the error I had was this one: > > > "FATAL: Extra content at the end of the document" > > > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1848598740/test_report > > > > > > And indeed, when I managed to dl the junit.xml, there were the end of > > > the document duplicated many times. > > > > Wouldn't it better to do |sort|uniq to dedup the file? > > I don't think XML structure will survive it... Ops, good point.
© 2016 - 2025 Red Hat, Inc.