All of lore.kernel.org
 help / color / mirror / Atom feed
From: Babanpreet Singh <bbnpreetsingh@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>,
	Babanpreet Singh <bbnpreetsingh@gmail.com>
Subject: [meta-oe][PATCH 3/3] ptest-pgxs.bbclass: treat an empty exit status as a failure
Date: Sun,  6 Dec 2026 06:10:45 +0000	[thread overview]
Message-ID: <20261206061045.7-4-bbnpreetsingh@gmail.com> (raw)
In-Reply-To: <20261206061045.7-1-bbnpreetsingh@gmail.com>

When the tests fill /tmp, the file holding the exit status is left
empty and run-ptest stops with "sh: bad number", without a FAIL line
or the log.

Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
---
 meta-oe/classes/ptest-pgxs.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-oe/classes/ptest-pgxs.bbclass b/meta-oe/classes/ptest-pgxs.bbclass
index 70d9b80a87..a5013111bc 100644
--- a/meta-oe/classes/ptest-pgxs.bbclass
+++ b/meta-oe/classes/ptest-pgxs.bbclass
@@ -106,7 +106,8 @@ LOG="$WORK/pg_regress.log"
     tee "$LOG" |
     sed -n -e 's/^ok [0-9]* *[-+] *\([^ ]*\).*/PASS: \1/p' \
            -e 's/^not ok [0-9]* *[-+] *\([^ ]*\).*/FAIL: \1/p'
-RC=$(cat "$WORK/rc" 2>/dev/null || echo 2)
+RC=$(cat "$WORK/rc" 2>/dev/null)
+[ -n "$RC" ] || RC=2
 
 if [ "$RC" -ne 0 ]; then
     if [ "$RC" -ne 1 ] || ! grep -q '^\(not \)\{0,1\}ok [0-9]' "$LOG"; then
-- 
2.43.0


      parent reply	other threads:[~2026-12-06  6:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-06  6:10 [meta-oe][PATCH 0/3] ptest-pgxs.bbclass: three more fixes Babanpreet Singh
2026-12-06  6:10 ` [meta-oe][PATCH 1/3] ptest-pgxs.bbclass: accept options written with a space Babanpreet Singh
2026-12-06  6:10 ` [meta-oe][PATCH 2/3] ptest-pgxs.bbclass: print the diffs from --outputdir Babanpreet Singh
2026-12-06  6:10 ` Babanpreet Singh [this message]

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=20261206061045.7-4-bbnpreetsingh@gmail.com \
    --to=bbnpreetsingh@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /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 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.