@@ -28,3 +28,6 @@ KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
KERNEL_FEATURES:append:pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc"
IMAGE_CLASSES += "qemuboot"
+
+# Use gnu tar so we can handle sparse files in testimage debug archives
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "tar"
@@ -64,7 +64,8 @@ def list_and_fetch_failed_tests_artifacts(d, tc, artifacts_list, outputdir):
bb.warn("Could not load artifacts list, skip artifacts retrieval")
return
try:
- cmd = "tar zcf - " + " ".join(artifacts_list)
+ # We need gnu tar for sparse files, not busybox
+ cmd = "tar --sparse -zcf - " + " ".join(artifacts_list)
(status, output) = tc.target.run(cmd, raw = True)
if status != 0 or not output:
raise Exception("Error while fetching compressed artifacts")
We've seen cases where a ptest (strace) has a 43GB sparse file in the test directory. busybox tar doesn't work well with this. The resulting 1.4GB archive takes hours to extract too. Ensure tar is added to our full images and use the sparse option to collect files for debugging. This stops crazy build hangs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/conf/machine/include/qemu.inc | 3 +++ meta/lib/oeqa/utils/postactions.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)