Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Pratik Farkase <pratik.farkase@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: pratik.farkase@ericsson.com, Pratik Farkase <pratik.farkase@est.tech>
Subject: [OE-core][PATCH v3] libarchive: ptest: run tests from tmpfs to avoid inode overflow failures
Date: Tue, 28 Jul 2026 13:18:35 +0200	[thread overview]
Message-ID: <20260728111835.29648-1-pratik.farkase@est.tech> (raw)
In-Reply-To: <20260720122619.34696-1-pratik.farkase@est.tech>

The bsdcpio_test odc/newc format tests verify archive headers byte-by-byte
including inode and device numbers. On ext4 root filesystems (particularly
qemuarm64 and qemuriscv64) inode numbers can exceed the odc 6-octal-digit
or newc 8-hex-digit field widths, causing intermittent assertion failures
in test_format_newc and test_option_c.

Set TMPDIR to a tmpfs mount so the test framework creates its working
directories there, where inode numbers always start small.

[YOCTO #16231] : https://bugzilla.yoctoproject.org/show_bug.cgi?id=16231

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v3:
- Use export TMPDIR instead of changing CWD (v2 broke test binary's
  ability to find reference data files)

Changes in v2:
- Use cd "$PTEST_DIR" instead of cd
---
 .../libarchive/libarchive/run-ptest                | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta/recipes-extended/libarchive/libarchive/run-ptest b/meta/recipes-extended/libarchive/libarchive/run-ptest
index d6b4c3f934..f5f2ef490c 100755
--- a/meta/recipes-extended/libarchive/libarchive/run-ptest
+++ b/meta/recipes-extended/libarchive/libarchive/run-ptest
@@ -1,11 +1,23 @@
 #!/bin/sh
 
+PTEST_DIR=$(cd "$(dirname "$0")" && pwd)
+cd "$PTEST_DIR"
+
 # The fuzz tests run 1000 randomised iterations per archive format and are
 # meant for dedicated fuzzing infrastructure, not routine ptest runs. They
 # regularly time out in the time/memory constrained autobuilder QEMU targets
 # (e.g. test_fuzz_iso9660). Skip them via the upstream escape hatch.
 export SKIP_TEST_FUZZ=1
 
+# The bsdcpio odc/newc format tests verify archive headers byte-by-byte
+# including inode and device numbers. On ext4 root filesystems inode numbers
+# can exceed the odc 6-octal-digit (262143) or newc 8-hex-digit (4294967295)
+# field widths, causing intermittent assertion failures. Set TMPDIR to a
+# tmpfs so test-created files get small inode numbers.
+WORKDIR=$(mktemp -d)
+mount -t tmpfs tmpfs "$WORKDIR"
+export TMPDIR="$WORKDIR"
+
 for t in libarchive_test bsdtar_test bsdcpio_test bsdcat_test bsdunzip_test; do
     ./$t
     if [ $? -eq 0 ]; then
@@ -15,3 +27,5 @@ for t in libarchive_test bsdtar_test bsdcpio_test bsdcat_test bsdunzip_test; do
     fi
 done
 
+umount "$WORKDIR"
+rmdir "$WORKDIR"
-- 
2.34.1



      parent reply	other threads:[~2026-07-28 11:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 12:26 [OE-core][PATCH v1] libarchive: ptest: run tests from tmpfs to avoid inode overflow failures Pratik Farkase
2026-07-20 12:39 ` Paul Barker
2026-07-20 13:05   ` Pratik Farkase
     [not found]   ` <18C401467A678464.1234146@lists.openembedded.org>
2026-07-20 14:00     ` Pratik Farkase
2026-07-20 12:58 ` [OE-core][PATCH v2] " Pratik Farkase
2026-07-24 17:44   ` Mathieu Dubois-Briand
2026-07-28 11:18 ` Pratik Farkase [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=20260728111835.29648-1-pratik.farkase@est.tech \
    --to=pratik.farkase@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pratik.farkase@ericsson.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox