[oe] [PATCH] e2fsprogs: fix test f_detect_junk print error msg
changqing.li at windriver.com
changqing.li at windriver.com
Thu Oct 11 08:17:24 UTC 2018
From: Changqing Li <changqing.li at windriver.com>
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 <changqing.li at windriver.com>
---
.../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
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patch
new file mode 100644
index 0000000..46d32ef
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-ptest-error-msg.patch
@@ -0,0 +1,33 @@
+From e193316891510ec3852699d57a860c65615196ef Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li at windriver.com>
+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 <changqing.li at windriver.com>
+---
+ 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
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb
index 823d18b..c935f98 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb
@@ -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 \
--
2.7.4
More information about the Openembedded-devel
mailing list