Skip to contentSkip to conversation

strace: Tweak ptest disk space management

PATCH New Richard Purdie 1 participant 4 messages May 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 strace: Tweak ptest disk space management

If the test is successful, remove the log and exp files. This stops strace using around 600MB of disk space and running our ptest images out of space.

---
 .../strace/strace/ptest-spacesave.patch       | 19 +++++++++++++++++++
 meta/recipes-devtools/strace/strace_4.26.bb   |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-devtools/strace/strace/ptest-spacesave.patch
meta/recipes-devtools/strace/strace/ptest-spacesave.patch new file +19 -0
new file mode 100644
index 00000000000..3e32cc388ca
@@ -0,0 +1,19 @@
+If the test is successful, remove the log and exp files. This stops strace
+using around 600MB of disk space and running our ptest images out of space.
+
+RP 2019/5/29
+
+Upstream-Status: Inappropriate [specific to OE image space issues]
+
+Index: strace-4.26/tests/gen_tests.sh
+===================================================================
+--- strace-4.26.orig/tests/gen_tests.sh
++++ strace-4.26/tests/gen_tests.sh
+@@ -62,6 +62,7 @@ while read -r name arg0 args; do {
+ 		$hdr
+ 		. "\${srcdir=.}/init.sh"
+ 		run_strace_match_diff $arg0 $args
++		rm -rf log exp
+ 		EOF
+ 		;;
+ 
meta/recipes-devtools/strace/strace_4.26.bb +1 -0
index 24f92c99e58..3b61fc3eef1 100644
@@ -15,6 +15,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
            file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
            file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
            file://0001-mips-o32-fix-build.patch \
+           file://ptest-spacesave.patch \
            "
 SRC_URI[md5sum] = "daa51acc0c7c696221ec03cf0b30a7af"
 SRC_URI[sha256sum] = "7c4d2ffeef4f7d1cdc71062ca78d1130eb52f947c2fca82f59f6a1183bfa1e1c"
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/4 ptest-packagelists: Add mdadm

---
 meta/conf/distro/include/ptest-packagelists.inc | 1 +
 1 file changed, 1 insertion(+)
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index ec7ed6fa4d6..17deaa762a6 100644
@@ -65,6 +65,7 @@ PTESTS_SLOW = "\
     gstreamer1.0-ptest \
     libevent-ptest \
     lttng-tools-ptest \
+    mdadm-ptest \
     openssh-ptest \
     openssl-ptest \
     perl-ptest \
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/4 util-linux: Fix ptest dependencies

In reply to Richard Purdie

We should append to the ptest RDEPENDS and RRECOMMENDS otherwise the bbclass defaults are overwritten. This leads to ptest-runner not being installed in minimal images. Also drop the duplicate ${PN} value which is unneeded once we do this.

---
 meta/recipes-core/util-linux/util-linux.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +2 -2
index 6dfbe0b6835..7b9b4d2a307 100644
@@ -142,8 +142,8 @@ RDEPENDS_${PN}_class-nativesdk = ""
 RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
-RDEPENDS_${PN}-ptest = "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm ${PN} procps sed socat which xz"
-RRECOMMENDS_${PN}-ptest = "kernel-module-scsi-debug"
+RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
+RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug"
 RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
 ALLOW_EMPTY_${PN}-swaponoff = "1"
 
Signature · 1 line
2.20.1
#3 lore raw

PATCH 4/4 mdadm: Add missing ptest dependency

In reply to Richard Purdie

Without this the ptest fails, unable to find mkfs.ext3.

---
 meta/recipes-extended/mdadm/mdadm_4.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/mdadm/mdadm_4.1.bb +1 -1
index 40fe376a796..494b81b5e79 100644
@@ -81,7 +81,7 @@ do_install_ptest() {
 	done
 }
 
-RDEPENDS_${PN}-ptest += "bash"
+RDEPENDS_${PN}-ptest += "bash e2fsprogs-mke2fs"
 RRECOMMENDS_${PN}-ptest += " \
     coreutils \
     util-linux \
Signature · 1 line
2.20.1