summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-01-23 18:34:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commitfa7ca65e8b7e5727d3c1f832e81ab28a9a957d36 (patch)
treeb1ae6fceb63948cc4dc57eb8715c8cdcebc64902 /meta/recipes-extended/mdadm
parent4821e629efe0ec86cef32d326c2fc5ab6515d2f6 (diff)
downloadpoky-fa7ca65e8b7e5727d3c1f832e81ab28a9a957d36.tar.gz
mdadm: correctly set up testing location for ptests
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) (From OE-Core rev: cd4fc516ce0f8e4c5cadb7a700fe29643ed9128d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/mdadm')
-rw-r--r--meta/recipes-extended/mdadm/files/run-ptest3
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.1.bb3
2 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest
index e4a9c2b08b..7959c055ad 100644
--- a/meta/recipes-extended/mdadm/files/run-ptest
+++ b/meta/recipes-extended/mdadm/files/run-ptest
@@ -1,4 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3mkdir -p /mdadm-testing-dir
3# make the test continue to execute even one fail 4# make the test continue to execute even one fail
4./test --keep-going 5./test --keep-going
6
7rm -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 64f519e750..40c5273e00 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() {
75do_install_ptest() { 75do_install_ptest() {
76 cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests 76 cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
77 cp ${S}/test ${D}${PTEST_PATH} 77 cp ${S}/test ${D}${PTEST_PATH}
78 sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test 78 sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test
79 sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/*
79 sed -i -e '/echo -ne "$_script... "/d' \ 80 sed -i -e '/echo -ne "$_script... "/d' \
80 -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \ 81 -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \
81 -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \ 82 -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \