summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2017-02-22 05:04:50 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-01 23:27:09 +0000
commitc9f9446585377e4873431849351b7c4f52191301 (patch)
tree15d8cf8fa8724270597b1507d9435e59982bf0be /meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch
parent6b3dda3cee9e88c7c8bbe55d84ab680f130f85b8 (diff)
downloadpoky-c9f9446585377e4873431849351b7c4f52191301.tar.gz
ltp: upgrade to 20170116
1. Upgrade ltp from 20160126 to 20170116. 2. Delete some patches because these have been integrated in upstream. 0001-ltp-Don-t-link-against-libfl.patch 0006-sendfile-Use-off64_t-instead-of-__off64_t.patch 0007-replace-SIGCLD-with-SIGCHLD.patch 0009-Guard-error.h-with-__GLIBC__.patch 0012-fsstress.c-Replace-__int64_t-with-int64_t.patch 0013-include-fcntl.h-for-getting-O_-definitions.patch 0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch 0015-mincore01-Rename-PAGESIZE-to-pagesize.patch 0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch 0017-replace-sigval_t-with-union-sigval.patch 0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch 0022-include-sys-types.h.patch 0029-trace_shed-Fix-build-with-musl.patch 0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch 0032-regen.sh-Include-asm-unistd.h-explicitly.patch 0037-containers-netns_netlink-Avoid-segmentation-fault.patch 0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch 0040-containers-userns05-use-unsigned-int-for-ns-id.patch 3. Add new patch based on Khem Raj's 0007-replace-SIGCLD-with-SIGCHLD.patch 0001-add-_GNU_SOURCE-to-pec_listener.c.patch 4. Add new patches fix building errors with musl: 0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch 0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch 0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch Add new patch fix building errors, when the distro is poky-lsb 0012-fix-faccessat01.c-build-fails-with-security-flags.patch 5. Modify some patches because the upstream contains changes, those patches maybe failed when they apply to the new version of ltp. 0011-Rename-sigset-variable-to-sigset1.patch 0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch 0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch 0035-fix-test_proc_kill-hang.patch 6. Rename and modify this patch. fcntl-fix-the-time-def-to-use-time_t.patch to 0039-fcntl-fix-the-time-def-to-use-time_t.patch 7. The new version of ltp add the checking for ksh and csh, we doesn't support ksh and csh in oe-core, so remove the checking files when the system executes do_install function. (From OE-Core rev: 25c71d320198d41cf760dbea96840d352681dced) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch b/meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch
new file mode 100644
index 0000000000..2600bd60d0
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch
@@ -0,0 +1,70 @@
1From 32f563008f95975d26d1c4fcb266c72c56f934be Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 22 Feb 2017 01:21:55 -0500
4Subject: [PATCH] fix faccessat01.c build fails with security flags
5
6When the distro is poky-lsb, fix the following error:
7
8| In file included from ../../../../include/old/test.h:47:0,
9| from faccessat01.c:44:
10| faccessat01.c: In function 'setup':
11| ../../../../include/old/old_safe_file_ops.h:55:27: error: format not a string literal and no format arguments [-Werror=format-security]
12| (path), (fmt), ## __VA_ARGS__)
13| ^
14| faccessat01.c:132:2: note: in expansion of macro 'SAFE_FILE_PRINTF'
15| SAFE_FILE_PRINTF(cleanup, testfile, testfile);
16| ^~~~~~~~~~~~~~~~
17| ../../../../include/old/old_safe_file_ops.h:55:27: error: format not a string literal and no format arguments [-Werror=format-security]
18| (path), (fmt), ## __VA_ARGS__)
19| ^
20| faccessat01.c:133:2: note: in expansion of macro 'SAFE_FILE_PRINTF'
21| SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
22| ^~~~~~~~~~~~~~~~
23
24This is because in macro "SAFE_FILE_PRINTF", its third argument should be a
25format arguments, but in file faccessat01.c, it passed the same argument to
26macro "SAFE_FILE_PRINTF", so it results in the fails. It should pass the format
27string to the third argument.
28
29The same for file fchmodat01.c.
30
31Signed-off-by: Dengke Du <dengke.du@windriver.com>
32Upstream-Status: Pending
33---
34 testcases/kernel/syscalls/faccessat/faccessat01.c | 4 ++--
35 testcases/kernel/syscalls/fchmodat/fchmodat01.c | 4 ++--
36 2 files changed, 4 insertions(+), 4 deletions(-)
37
38diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
39index 622dfd3..1ca90e9 100644
40--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
41+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
42@@ -129,8 +129,8 @@ void setup(void)
43 fds[0] = SAFE_OPEN(cleanup, pathname, O_DIRECTORY);
44 fds[1] = fds[4] = fds[0];
45
46- SAFE_FILE_PRINTF(cleanup, testfile, testfile);
47- SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
48+ SAFE_FILE_PRINTF(cleanup, testfile, "faccessattestfile%d.txt");
49+ SAFE_FILE_PRINTF(cleanup, testfile2, "%s/faccessattestfile%d.txt");
50
51 fds[2] = SAFE_OPEN(cleanup, testfile3, O_CREAT | O_RDWR, 0600);
52
53diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
54index 6bf66d8..89d072a 100644
55--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
56+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
57@@ -127,8 +127,8 @@ void setup(void)
58 fds[0] = SAFE_OPEN(cleanup, pathname, O_DIRECTORY);
59 fds[1] = fds[4] = fds[0];
60
61- SAFE_FILE_PRINTF(cleanup, testfile, testfile);
62- SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
63+ SAFE_FILE_PRINTF(cleanup, testfile, "fchmodattest%d.txt");
64+ SAFE_FILE_PRINTF(cleanup, testfile2, "%s/fchmodattest%d.txt");
65
66 fds[2] = SAFE_OPEN(cleanup, testfile3, O_CREAT | O_RDWR, 0600);
67 fds[3] = 100;
68--
692.8.1
70