All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/9] mdadm: correctly set up testing location for ptests
Date: Mon, 27 Jan 2020 15:19:02 +0100	[thread overview]
Message-ID: <20200127141908.84922-3-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200127141908.84922-1-alex.kanavin@gmail.com>

1. Do not clutter /, create a special-purpose dir
2. Clean up the dir after tests are done (if this is not
performed, disk will overflow later in ptesting).
3. Fix up more locations in ptests to use the dir.

Upstream default /var/tmp is not suitable as it is not
big enough (mdadm needs about 500 Mb)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-extended/mdadm/files/run-ptest | 3 +++
 meta/recipes-extended/mdadm/mdadm_4.1.bb    | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest
index e4a9c2b08b9..7959c055ad5 100644
--- a/meta/recipes-extended/mdadm/files/run-ptest
+++ b/meta/recipes-extended/mdadm/files/run-ptest
@@ -1,4 +1,7 @@
 #!/bin/sh
 
+mkdir -p /mdadm-testing-dir
 # make the test continue to execute even one fail
 ./test --keep-going
+
+rm -rf /mdadm-testing-dir/*
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 64f519e7502..40c5273e005 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -75,7 +75,8 @@ do_compile_ptest() {
 do_install_ptest() {
 	cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
 	cp ${S}/test ${D}${PTEST_PATH}
-	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test
+	sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/*
         sed -i -e '/echo -ne "$_script... "/d' \
                -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \
                -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \
-- 
2.17.1



  parent reply	other threads:[~2020-01-27 14:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 14:19 [PATCH 1/9] core-image-sato-sdk-ptest: do not pull in ptest-pkgs Alexander Kanavin
2020-01-27 14:19 ` [PATCH 2/9] default-distrovars.inc: add vfat to DISTRO_FEATURES Alexander Kanavin
2020-01-27 14:19 ` Alexander Kanavin [this message]
2020-01-27 14:19 ` [PATCH 4/9] elfutils: additional ptest fixes Alexander Kanavin
2020-01-27 14:19 ` [PATCH 5/9] meson: update 0.52.1 -> 0.53.0 Alexander Kanavin
2020-01-27 14:19 ` [PATCH 6/9] lttng-tools: install additional scripts needed for ptests Alexander Kanavin
2020-01-27 14:19 ` [PATCH 7/9] core-image-sato-sdk-ptest: use 2G of RAM Alexander Kanavin
2020-01-27 20:54   ` Khem Raj
2020-01-27 20:55     ` Alexander Kanavin
2020-01-27 21:02       ` Khem Raj
2020-01-27 21:46         ` Alexander Kanavin
2020-01-27 22:07           ` Khem Raj
2020-01-27 14:19 ` [PATCH 8/9] valgrind: fix the remaining ptest failures Alexander Kanavin
2020-01-27 15:53   ` akuster808
2020-01-27 16:25     ` Alexander Kanavin
2020-01-27 16:26       ` Alexander Kanavin
2020-01-28  1:02   ` Khem Raj
2020-01-27 14:19 ` [PATCH 9/9] lttng-tools: disable tests that sporadically fail Alexander Kanavin
2020-01-27 16:59   ` Jonathan Rajotte-Julien

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=20200127141908.84922-3-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --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 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.