e2fsprogs: fix test f_detect_junk print error msg
PATCH 1/1 e2fsprogs: fix test f_detect_junk print error msg
From: Changqing Li <[email protected]>
test script have problem when the file want to grep don't exist, change the check command to fix it
--- .../0001-e2fsprogs-fix-ptest-error-msg.patch | 33 ++++++++++++++++++++++ .../recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patch
meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patch new file +33 -0
@@ -0,0 +1,33 @@ +From e193316891510ec3852699d57a860c65615196ef Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 11 Oct 2018 15:13:24 +0800 +Subject: [PATCH] e2fsprogs: fix ptest error msg + +Upstream-Status: Inappropriate [oe-specific] + +original command want to get count of match lines, but if +config.h is not existed, like our case, the result of +$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h) will not be +number, and cannot compare with 0, so fix it by check +command executed result. + +Signed-off-by: Changqing Li <[email protected]> +--- + tests/f_detect_junk/script | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/f_detect_junk/script b/tests/f_detect_junk/script +index 2577842..d56ec1a 100644 +--- a/tests/f_detect_junk/script ++++ b/tests/f_detect_junk/script +@@ -1,6 +1,6 @@ + #!/bin/bash + +-if [ "$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h)" -eq 0 ]; then ++if ! grep -q -c 'define HAVE_MAGIC_H' ./config.h 2>/dev/null + echo "$test_name: skipped (no magic)" + exit 0 + fi +-- +2.7.4 +
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb +1 -0
@@ -6,6 +6,7 @@ SRC_URI += "file://remove.ldconfig.call.patch \ file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ file://mkdir_p.patch \ file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \ + file://0001-e2fsprogs-fix-ptest-error-msg.patch \ " SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
Signature · 1 line
2.7.4
PATCH 1/1 e2fsprogs: fix test i_bitmaps failed
From: Changqing Li <[email protected]>
without diffutils, diff from busybox will be used, diff of busybox cause diff result different with expect file under test. The diff result generated by 2 /usr/bin/diff is different.
change to use diff under diffutils to fix it
--- meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb +1 -1
@@ -113,7 +113,7 @@ ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2" ALTERNATIVE_${PN}-tune2fs = "tune2fs" ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs" -RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash bzip2" +RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash bzip2 diffutils" do_compile_ptest() { oe_runmake -C ${B}/tests
Signature · 1 line
2.7.4
Re: [PATCH] e2fsprogs: fix test i_bitmaps failed
Please ignore this mail, I send to wrong email address. :-(
Quoted 26 lines · On 10/11/2018 04:17 PM, [email protected] wrote:
From: Changqing Li <[email protected]>
without diffutils, diff from busybox will be used, diff of busybox cause diff result different with expect file under test. The diff result generated by 2
/usr/bin/diffis different.change to use diff under diffutils to fix it
Signed-off-by Changqing Li <[email protected]>--- meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb +1
-1@@ -113,7 +113,7 @@ ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2" ALTERNATIVE_${PN}-tune2fs = "tune2fs" ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs" -RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash bzip2" +RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash bzip2 diffutils" do_compile_ptest() { oe_runmake -C ${B}/tests
Signature · 4 lines
BRs Sandy(Li Changqing) Wind River Linux
please ignore this mail.
Quoted 63 lines · On 10/11/2018 04:17 PM, [email protected] wrote:
From: Changqing Li <[email protected]>
test script have problem when the file want to grep don't exist, change the check command to fix it
Signed-off-by Changqing Li <[email protected]>--- .../0001-e2fsprogs-fix-ptest-error-msg.patch | 33 ++++++++++++++++++++++ .../recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb | 1 + 2 files changed, 34 insertions(+)create mode 100644
meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patchmeta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patch new file +33
-0@@ -0,0 +1,33 @@ +From e193316891510ec3852699d57a860c65615196ef Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 11 Oct 2018 15:13:24 +0800 +Subject: [PATCH] e2fsprogs: fix ptest error msg + +Upstream-Status: Inappropriate [oe-specific] + +original command want to get count of match lines, but if +config.h is not existed, like our case, the result of +$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h) will not be +number, and cannot compare with 0, so fix it by check +command executed result. + +Signed-off-by: Changqing Li <[email protected]> +--- + tests/f_detect_junk/script | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/f_detect_junk/script b/tests/f_detect_junk/script +index 2577842..d56ec1a 100644 +--- a/tests/f_detect_junk/script ++++ b/tests/f_detect_junk/script +@@ -1,6 +1,6 @@ + #!/bin/bash + +-if [ "$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h)" -eq 0 ]; then ++if ! grep -q -c 'define HAVE_MAGIC_H' ./config.h 2>/dev/null + echo "$test_name: skipped (no magic)" + exit 0 + fi +-- +2.7.4 +meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb +1
-0@@ -6,6 +6,7 @@ SRC_URI += "file://remove.ldconfig.call.patch \ file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ file://mkdir_p.patch \ file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \ + file://0001-e2fsprogs-fix-ptest-error-msg.patch \ " SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
Signature · 4 lines
BRs Sandy(Li Changqing) Wind River Linux