Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] libpcap: show TESTrun errors in ptest log
Date: Thu, 26 Nov 2026 17:25:15 +0100	[thread overview]
Message-ID: <20261126162516.93141-2-jaipaul.cheernam@est.tech> (raw)
In-Reply-To: <20261126162516.93141-1-jaipaul.cheernam@est.tech>

Replace awk with sed in run-ptest to preserve TESTrun error
output. Report FAIL: libpcap when TESTrun exits non-zero.

For example, with fcodetest (split out of filtertest in 1.11.1)
missing from the image, ptest-runner.log only showed:

  BEGIN: /usr/lib/libpcap/ptest
  DURATION: 0
  END: /usr/lib/libpcap/ptest

and now with change shows:

  BEGIN: /usr/lib/libpcap/ptest
  ERROR: './testprogs/fcodetest -h' exit status was not 0.
  FAIL: libpcap
  DURATION: 1
  END: /usr/lib/libpcap/ptest

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 .../libpcap/files/run-ptest                   | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/meta/recipes-connectivity/libpcap/files/run-ptest b/meta/recipes-connectivity/libpcap/files/run-ptest
index c4b869d541e..d6c76f52a81 100644
--- a/meta/recipes-connectivity/libpcap/files/run-ptest
+++ b/meta/recipes-connectivity/libpcap/files/run-ptest
@@ -8,18 +8,7 @@ ENUMERATETEST_BIN="./enumeratetest"
 CONFIG_H="../config.h"
 export FILTERTEST_BIN TRANSLATETEST_BIN ENUMERATETEST_BIN CONFIG_H
 
-./TESTrun --passed --skipped 2>&1 | awk '
-    /^Passed tests:/  { section = "PASS"; next }
-    /^Skipped tests:/ { section = "SKIP"; next }
-    /^Failed tests:/  { section = "FAIL"; next }
-    /^-+$/            { section = ""; next }
-    section != "" && /^    / {
-        c = index($0, ": ")
-        if (c >= 45) {
-            label = substr($0, 5, c - 5)
-            sub(/[[:space:]]+$/, "", label)
-            if (label != "")
-                print section ": " label
-        }
-    }
-'
+{ ./TESTrun --passed --skipped 2>&1 || echo "FAIL: libpcap"; } | sed \
+    -e '/^Passed tests:$/,/^$/ s/^    \([^ ][^ ]*\) *: .*/PASS: \1/' \
+    -e '/^Skipped tests:$/,/^$/ s/^    \([^ ][^ ]*\) *: .*/SKIP: \1/' \
+    -e '/^Failed tests:$/,/^INFO: / s/^    \([^ ][^ ]*\) *: .*/FAIL: \1/'

  reply	other threads:[~2026-11-26 16:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  9:06 [PATCH 0/3] Upgrades on 25yh November Jaipaul Cheernam
2026-11-25  9:06 ` [PATCH 1/3] libpcap: upgrade 1.11.0 -> 1.11.1 Jaipaul Cheernam
2026-11-25 19:31   ` [OE-core] " Mathieu Dubois-Briand
2026-11-26 16:25   ` [PATCH 0/2] libpcap ptest log fix and upgrade Jaipaul Cheernam
2026-11-26 16:25     ` Jaipaul Cheernam [this message]
2026-11-26 16:25     ` [PATCH 2/2] libpcap: upgrade 1.11.0 -> 1.11.1 Jaipaul Cheernam
2026-11-27 12:35       ` [OE-core] " Mathieu Dubois-Briand
2026-11-27 12:38         ` Mathieu Dubois-Briand
2026-11-27 13:37         ` Pratik Farkase
2026-11-25  9:06 ` [PATCH 2/3] repo: upgrade 2.73 -> 2.74.1 Jaipaul Cheernam
2026-11-25  9:06 ` [PATCH 3/3] screen: upgrade 5.0.2 -> 5.0.3 Jaipaul Cheernam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261126162516.93141-2-jaipaul.cheernam@est.tech \
    --to=jaipaul.cheernam@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox