[Fuego] [PATCH] busybox: cp - fix overwrite fail line, and add more info
Tim.Bird at sony.com
Tim.Bird at sony.com
Thu Aug 30 23:00:20 UTC 2018
Wang,
FYI, below is a patch I applied to busybox_cp.sh to fix some issues.
The 'cp' testcase was not showing up in my table of results in Jenkins until
I fixed the TEST-FAIL line in the overwrite case. Interestingly, it turns out
that the busybox on my beaglebone black system actually fails that testcase
(checking for the correct overwrite message on 'cp -i').
My version of busybox was 1.22.1. I checked the latest version of busybox
(1.30.0), and the bug is fixed. It's good to know the test actually catches a
real bug, even if it was already fixed.
-- Tim
---------
When the busybox cp overwrite message check fails, it does so
silently. Fix this by adding some diagnostic output.
Also, put a space in front of the TEST-FAIL line, so it
gets parsed correctly by Fuego.
This was causing this testcase (cp) to not be present at all in
the run.json file, or the test results table in the interface
Finally, fix a typo in '$test' (was &test).
Signed-off-by: Tim Bird <tim.bird at sony.com>
---
engine/tests/Functional.busybox/tests/busybox_cp.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/engine/tests/Functional.busybox/tests/busybox_cp.sh b/engine/tests/Functional.busybox/tests/busybox_cp.sh
index 36cd650..be02efd 100644
--- a/engine/tests/Functional.busybox/tests/busybox_cp.sh
+++ b/engine/tests/Functional.busybox/tests/busybox_cp.sh
@@ -14,7 +14,7 @@ then
echo " -> $test: cp succeeded."
else
echo " -> $test: cp failed."
- echo " -> &test: TEST-FAIL"
+ echo " -> $test: TEST-FAIL"
rm -rf test_dir_src
rm -rf test_dir_dest
exit
@@ -23,9 +23,13 @@ fi;
yes | busybox cp -i test_dir_dest/test1 test_dir_src/ 2>cp.log
if cat cp.log | grep "cp: overwrite 'test_dir_src/test1'?"
then
+ echo " -> $test: cp -i overwrite message was as expected"
echo " -> $test: TEST-PASS"
else
- echo "-> $test: TEST-FAIL"
+ echo " -> $test: cp -i overwrite message was not as expected"
+ echo "overwrite message was:"
+ cat cp.log
+ echo " -> $test: TEST-FAIL"
fi
rm cp.log
rm -rf test_dir_src
--
2.1.4
More information about the Fuego
mailing list