aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2018-09-03 11:22:10 -0500
committerFathi Boudra <fathi.boudra@linaro.org>2018-09-04 13:11:04 +0000
commitf728550b7d82da272daf21d3ce7a8237c2745f87 (patch)
treea658b776562984e7fbb8355b210a4203979c364e
parentcdc263e7f5034e485c40efd1318bea554ad17dcb (diff)
ltp: Update fs/read_all patch
It's been merged in upstream LTP now. Change-Id: Id885b1ca6a88403f2b7da7d44936a2d5bd429858 Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
-rw-r--r--core/recipes-extended/ltp/ltp/0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch67
-rw-r--r--core/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch44
-rw-r--r--core/recipes-extended/ltp/ltp_20180515.bb2
3 files changed, 68 insertions, 45 deletions
diff --git a/core/recipes-extended/ltp/ltp/0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch b/core/recipes-extended/ltp/ltp/0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch
new file mode 100644
index 0000000..7310472
--- /dev/null
+++ b/core/recipes-extended/ltp/ltp/0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch
@@ -0,0 +1,67 @@
+From 822ad20433799193e2180862137c36f24e5d27d6 Mon Sep 17 00:00:00 2001
+From: Rafael David Tinoco <rafael.tinoco@linaro.org>
+Date: Tue, 28 Aug 2018 14:16:54 -0300
+Subject: [PATCH] fs/read_all: define FNM_EXTMATCH if needed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+FNM_EXTMATCH is not defined in musl libc:
+
+| read_all.c: In function 'read_test':
+| read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this function); did you mean 'FNM_NOMATCH'?
+| if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) {
+| ^~~~~~~~~~~~
+| FNM_NOMATCH
+| read_all.c:201:41: note: each undeclared identifier is reported only once for each function it appears in
+| <builtin>: recipe for target 'read_all' failed
+| make[4]: *** [read_all] Error 1
+
+Even not being 100% musl ready at the moment, this seems a trivial fix
+to allow LTP to be built with musl libc.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
+Tested-by: Daniel Díaz <daniel.diaz@linaro.org>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+---
+ include/lapi/fnmatch.h | 14 ++++++++++++++
+ testcases/kernel/fs/read_all/read_all.c | 1 +
+ 2 files changed, 15 insertions(+)
+ create mode 100644 include/lapi/fnmatch.h
+
+diff --git a/include/lapi/fnmatch.h b/include/lapi/fnmatch.h
+new file mode 100644
+index 0000000..9628ac4
+--- /dev/null
++++ b/include/lapi/fnmatch.h
+@@ -0,0 +1,14 @@
++// SPDX-License-Identifier: GPL-2.0-or-later
++/*
++ * Copyright (c) 2018 Linaro Limited. All rights reserved.
++ * Author: Rafael David Tinoco <rafael.tinoco@linaro.org>
++ */
++
++#ifndef FNMATCH_H__
++#define FNMATCH_H__
++
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
++#endif
+diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c
+index ac463db..1f0b315 100644
+--- a/testcases/kernel/fs/read_all/read_all.c
++++ b/testcases/kernel/fs/read_all/read_all.c
+@@ -40,6 +40,7 @@
+ */
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <lapi/fnmatch.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <dirent.h>
+--
+2.7.4
+
diff --git a/core/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch b/core/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
deleted file mode 100644
index 0245a89..0000000
--- a/core/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 23518508de307790231d16af307291f1b45e903a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
-Date: Tue, 5 Jun 2018 15:36:30 -0500
-Subject: [PATCH] read_all: Define FNM_EXTMATCH if not already (like under
- musl).
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-With musl, FNM_EXTMATCH is not defined:
-| read_all.c: In function 'read_test':
-| read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this function); did you mean 'FNM_NOMATCH'?
-| if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) {
-| ^~~~~~~~~~~~
-| FNM_NOMATCH
-| read_all.c:201:41: note: each undeclared identifier is reported only once for each function it appears in
-| <builtin>: recipe for target 'read_all' failed
-| make[4]: *** [read_all] Error 1
-
-Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
-
-Upstream-Status: Pending
----
- testcases/kernel/fs/read_all/read_all.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/testcases/kernel/fs/read_all/read_all.c b/testcases/kernel/fs/read_all/read_all.c
-index a8e1611..e9ff47a 100644
---- a/testcases/kernel/fs/read_all/read_all.c
-+++ b/testcases/kernel/fs/read_all/read_all.c
-@@ -59,6 +59,10 @@
- #define MAX_PATH 4096
- #define MAX_DISPLAY 40
-
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- struct queue {
- sem_t sem;
- int front;
---
-2.7.4
-
diff --git a/core/recipes-extended/ltp/ltp_20180515.bb b/core/recipes-extended/ltp/ltp_20180515.bb
index 7dff388..d8a9462 100644
--- a/core/recipes-extended/ltp/ltp_20180515.bb
+++ b/core/recipes-extended/ltp/ltp_20180515.bb
@@ -47,7 +47,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0035-fix-test_proc_kill-hang.patch \
file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
- file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \
+ file://0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch \
file://0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch \
"