[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4853/8267] ltp: upgrade to 20170116



commit c9f9446585377e4873431849351b7c4f52191301
Author: Dengke Du <dengke du windriver com>
Date:   Wed Feb 22 05:04:50 2017 -0500

    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>

 .../0001-add-_GNU_SOURCE-to-pec_listener.c.patch   |   39 ++
 .../ltp/0001-ltp-Don-t-link-against-libfl.patch    |   30 --
 ...TH_MAX-undeclared-when-building-with-musl.patch |   30 ++
 ...sendfile-Use-off64_t-instead-of-__off64_t.patch |   31 --
 ...RDSIZE-undeclared-when-building-with-musl.patch |   30 ++
 .../ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch |  394 --------------------
 .../ltp/0009-Guard-error.h-with-__GLIBC__.patch    |  270 --------------
 ...ition-of-struct-msgbuf-error-building-wit.patch |   35 ++
 .../0011-Rename-sigset-variable-to-sigset1.patch   |   77 ++--
 ...essat01.c-build-fails-with-security-flags.patch |   70 ++++
 ...fsstress.c-Replace-__int64_t-with-int64_t.patch |  351 -----------------
 ...nclude-fcntl.h-for-getting-O_-definitions.patch |   67 ----
 ...ing-Include-sys-types.h-for-pid_t-definit.patch |   56 ---
 ...015-mincore01-Rename-PAGESIZE-to-pagesize.patch |   64 ----
 ...Change-header-from-ustat.h-to-sys-ustat.h.patch |   45 ---
 .../0017-replace-sigval_t-with-union-sigval.patch  |   88 -----
 ...lace-canonicalize_file_name-with-realpath.patch |   32 --
 .../ltp/ltp/0022-include-sys-types.h.patch         |   29 --
 ...sconf01-Use-_SC_2_C_VERSION-conditionally.patch |   23 +-
 .../ltp/0029-trace_shed-Fix-build-with-musl.patch  |   32 --
 ...READ_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch |   26 +-
 ...age-size-offset-as-per-page-size-alignmen.patch |   33 --
 ...-regen.sh-Include-asm-unistd.h-explicitly.patch |   30 --
 .../ltp/ltp/0035-fix-test_proc_kill-hang.patch     |   27 +-
 ...rs-netns_netlink-Avoid-segmentation-fault.patch |   50 ---
 ...ix-option-group-test-replace-CWD-qith-PWD.patch |   44 ---
 ...0039-fcntl-fix-the-time-def-to-use-time_t.patch |   17 +-
 ...iners-userns05-use-unsigned-int-for-ns-id.patch |   60 ---
 .../ltp/{ltp_20160126.bb => ltp_20170116.bb}       |   35 +--
 29 files changed, 306 insertions(+), 1809 deletions(-)
---
diff --git a/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch 
b/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch
new file mode 100644
index 0000000..7ec66f8
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-add-_GNU_SOURCE-to-pec_listener.c.patch
@@ -0,0 +1,39 @@
+From ae10245c15a617bd57337981bb42eb36629f9b59 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Wed, 8 Feb 2017 15:53:31 +0800
+Subject: [PATCH 01/26] add _GNU_SOURCE to pec_listener.c
+
+In previous patch 0007-replace-SIGCLD-with-SIGCHLD.patch made by Khem Raj
+contains two aspects:
+
+       1. replace SIGCLD with SIGCHLD
+       2. add _GNU_SOURCE to pec_listener.c
+
+The replace SIGCLD with SIGCHLD have been integrated upstream, so make a
+another patch to add _GNU_SOURCE to pec_listener.c comply with Khem Raj's
+previous patch.
+
+Signed-off-by: Khem Raj <raj khem gmail com>
+Signed-off-by: Dengke Du <dengke du windriver com>
+Upstream-Status: Pending
+
+%% original patch: 0001-add-_GNU_SOURCE-to-pec_listener.c.patch
+---
+ testcases/kernel/connectors/pec/pec_listener.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
+index d11e4dc..b8b5e0d 100644
+--- a/testcases/kernel/connectors/pec/pec_listener.c
++++ b/testcases/kernel/connectors/pec/pec_listener.c
+@@ -20,6 +20,7 @@
+ /*                                                                            */
+ /******************************************************************************/
+ 
++#define _GNU_SOURCE
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <sys/types.h>
+-- 
+2.8.1
+
diff --git a/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch 
b/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
new file mode 100644
index 0000000..8874b95
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
@@ -0,0 +1,30 @@
+From 32644bde4d33b677614534ec37030e57883b8e15 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Thu, 9 Feb 2017 16:41:12 +0800
+Subject: [PATCH 1/3] fix PATH_MAX undeclared when building with musl
+
+fix PATH_MAX undeclared when building with musl.
+
+Signed-off-by: Dengke Du <dengke du windriver com>
+Upstream-Status: Pending
+---
+ include/tst_test.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/tst_test.h b/include/tst_test.h
+index 7ff33b2..9779c0e 100644
+--- a/include/tst_test.h
++++ b/include/tst_test.h
+@@ -19,6 +19,9 @@
+ #define TST_TEST_H__
+ 
+ #include <unistd.h>
++#ifndef __GLIBC__
++#include <limits.h>
++#endif
+ 
+ #include "tst_common.h"
+ #include "tst_res_flags.h"
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch 
b/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
new file mode 100644
index 0000000..8d0e739
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
@@ -0,0 +1,30 @@
+From a2639bd0f0d3f9f3049ee33e6710fed06225f54f Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Thu, 9 Feb 2017 18:20:58 +0800
+Subject: [PATCH 1/2] fix __WORDSIZE undeclared when building with musl
+
+fix __WORDSIZE undeclared when building with musl.
+
+Signed-off-by: Dengke Du <dengke du windriver com>
+Upstream-Status: Pending
+---
+ include/old/test.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/old/test.h b/include/old/test.h
+index d492560..263e92e 100644
+--- a/include/old/test.h
++++ b/include/old/test.h
+@@ -58,6 +58,9 @@
+ #include "tst_clone.h"
+ #include "old_device.h"
+ #include "old_tmpdir.h"
++#ifndef __GLIBC__
++#include <bits/reg.h>
++#endif
+ 
+ /*
+  * Ensure that NUMSIGS is defined.
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch 
b/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch
new file mode 100644
index 0000000..6886c55
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch
@@ -0,0 +1,35 @@
+From 2d7ea67e8eaa41cbd6816f7ab654254b40b530a1 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Thu, 9 Feb 2017 17:17:37 +0800
+Subject: [PATCH] fix redefinition of 'struct msgbuf' error building with musl
+
+When building with musl the file "sys/msg.h" already contain 'struct msgbuf'
+
+Signed-off-by: Dengke Du <dengke du windriver com>
+Upstream-Status: Pending
+---
+ testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c 
b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
+index a757c0d..e023114 100644
+--- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
++++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
+@@ -47,11 +47,13 @@ const char *TCID = "msgrcv08";
+ const int TST_TOTAL = 1;
+ 
+ #if __WORDSIZE == 32
+-
++#ifdef __GLIBC__
+ struct msgbuf {
+       long mtype;     /* message type, must be > 0 */
+       char mtext[16]; /* message data */
+ };
++#else
++#endif
+ 
+ static void msr(int msqid)
+ {
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch 
b/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
index 945280c..4ac14dc 100644
--- a/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
+++ b/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
@@ -1,11 +1,12 @@
-From aff0e2a8f011fa80b472355355a7e8cdacd50189 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj khem gmail com>
-Date: Thu, 7 Jan 2016 19:53:30 +0000
-Subject: [PATCH 11/32] Rename sigset variable to sigset1
+From dc1905b6d972f9176b40da270c83d8fb4d1751b5 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Wed, 8 Feb 2017 16:12:34 +0800
+Subject: [PATCH 2/5] Rename sigset variable to sigset1
 
 sigset API from signal.h is shadowed by this name conflict
 
 Signed-off-by: Khem Raj <raj khem gmail com>
+Signed-off-by: Dengke Du <dengke du windriver com>
 ---
  testcases/kernel/mem/shmt/shmt04.c                    | 10 +++++-----
  testcases/kernel/mem/shmt/shmt06.c                    | 10 +++++-----
@@ -13,15 +14,15 @@ Signed-off-by: Khem Raj <raj khem gmail com>
  3 files changed, 15 insertions(+), 15 deletions(-)
 
 diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
-index 7203e9e..fce87d6 100644
+index b2682da..3f35fad 100644
 --- a/testcases/kernel/mem/shmt/shmt04.c
 +++ b/testcases/kernel/mem/shmt/shmt04.c
 @@ -56,7 +56,7 @@ int TST_TOTAL = 2;           /* Total number of test cases. */
  /**************/
  
  key_t key;
--sigset_t sigset;
-+sigset_t sigset1;
+-sigset_t set;
++sigset_t set1;
  
  #define  SIZE  16*1024
  
@@ -29,12 +30,12 @@ index 7203e9e..fce87d6 100644
  
        key = (key_t) getpid();
  
--      sigemptyset(&sigset);
--      sigaddset(&sigset, SIGUSR1);
--      sigprocmask(SIG_BLOCK, &sigset, NULL);
-+      sigemptyset(&sigset1);
-+      sigaddset(&sigset1, SIGUSR1);
-+      sigprocmask(SIG_BLOCK, &sigset1, NULL);
+-      sigemptyset(&set);
+-      sigaddset(&set, SIGUSR1);
+-      sigprocmask(SIG_BLOCK, &set, NULL);
++      sigemptyset(&set1);
++      sigaddset(&set1, SIGUSR1);
++      sigprocmask(SIG_BLOCK, &set1, NULL);
  
        pid = fork();
        switch (pid) {
@@ -42,21 +43,21 @@ index 7203e9e..fce87d6 100644
        char *cp;
        int sig;
  
--      sigwait(&sigset, &sig);
-+      sigwait(&sigset1, &sig);
+-      sigwait(&set, &sig);
++      sigwait(&set1, &sig);
        chld_pid = getpid();
  /*--------------------------------------------------------*/
  
 diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
-index a3c9ca3..77b0fc9 100644
+index dd69de7..56fb1da 100644
 --- a/testcases/kernel/mem/shmt/shmt06.c
 +++ b/testcases/kernel/mem/shmt/shmt06.c
 @@ -57,7 +57,7 @@ int TST_TOTAL = 2;           /* Total number of test cases. */
  /**************/
  
  key_t key;
--sigset_t sigset;
-+sigset_t sigset1;
+-sigset_t set;
++sigset_t set1;
  
  int child();
  static int rm_shm(int);
@@ -64,12 +65,12 @@ index a3c9ca3..77b0fc9 100644
  
        key = (key_t) getpid();
  
--      sigemptyset(&sigset);
--      sigaddset(&sigset, SIGUSR1);
--      sigprocmask(SIG_BLOCK, &sigset, NULL);
-+      sigemptyset(&sigset1);
-+      sigaddset(&sigset1, SIGUSR1);
-+      sigprocmask(SIG_BLOCK, &sigset1, NULL);
+-      sigemptyset(&set);
+-      sigaddset(&set, SIGUSR1);
+-      sigprocmask(SIG_BLOCK, &set, NULL);
++      sigemptyset(&set1);
++      sigaddset(&set1, SIGUSR1);
++      sigprocmask(SIG_BLOCK, &set1, NULL);
  
        pid = fork();
        switch (pid) {
@@ -77,21 +78,21 @@ index a3c9ca3..77b0fc9 100644
        char *cp;
        int sig;
  
--      sigwait(&sigset, &sig);
-+      sigwait(&sigset1, &sig);
+-      sigwait(&set, &sig);
++      sigwait(&set1, &sig);
        chld_pid = getpid();
  
        if ((shmid = shmget(key, SIZE, 0)) < 0) {
 diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c 
b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
-index 20fca52..6fb1d57 100644
+index 232d25a..06d902f 100644
 --- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
 +++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
 @@ -91,7 +91,7 @@ int TST_TOTAL = 1;
  int sig_catch = 0;            /* variable to blocked/unblocked signals */
  
  struct sigaction sa_new;      /* struct to hold signal info */
--sigset_t sigset;              /* signal set to hold signal lists */
-+sigset_t sigset1;             /* signal set to hold signal lists */
+-sigset_t set;         /* signal set to hold signal lists */
++sigset_t set1;                /* signal set to hold signal lists */
  sigset_t sigset2;
  
  int main(int ac, char **av)
@@ -99,8 +100,8 @@ index 20fca52..6fb1d57 100644
                 * so that, signal will not be delivered to
                 * the test process.
                 */
--              TEST(sigprocmask(SIG_BLOCK, &sigset, 0));
-+              TEST(sigprocmask(SIG_BLOCK, &sigset1, 0));
+-              TEST(sigprocmask(SIG_BLOCK, &set, 0));
++              TEST(sigprocmask(SIG_BLOCK, &set1, 0));
  
                /* Get the process id of test process */
                my_pid = getpid();
@@ -108,8 +109,8 @@ index 20fca52..6fb1d57 100644
                                 */
                                errno = 0;
                                if (sigprocmask(SIG_UNBLOCK,
--                                              &sigset, 0) == -1) {
-+                                              &sigset1, 0) == -1) {
+-                                              &set, 0) == -1) {
++                                              &set1, 0) == -1) {
                                        tst_brkm(TFAIL, cleanup,
                                                 "sigprocmask() failed "
                                                 "to unblock signal, "
@@ -117,8 +118,8 @@ index 20fca52..6fb1d57 100644
         * Initialise the signal sets with the list that
         * excludes/includes  all system-defined signals.
         */
--      if (sigemptyset(&sigset) == -1) {
-+      if (sigemptyset(&sigset1) == -1) {
+-      if (sigemptyset(&set) == -1) {
++      if (sigemptyset(&set1) == -1) {
                tst_brkm(TFAIL, cleanup,
                         "sigemptyset() failed, errno=%d : %s",
                         errno, strerror(errno));
@@ -126,11 +127,11 @@ index 20fca52..6fb1d57 100644
         * Add specified signal (SIGINT) to the signal set
         * which excludes system-defined signals.
         */
--      if (sigaddset(&sigset, SIGINT) == -1) {
-+      if (sigaddset(&sigset1, SIGINT) == -1) {
+-      if (sigaddset(&set, SIGINT) == -1) {
++      if (sigaddset(&set1, SIGINT) == -1) {
                tst_brkm(TFAIL, cleanup,
                         "sigaddset() failed, errno=%d : %s",
                         errno, strerror(errno));
 -- 
-2.7.0
+2.7.4
 
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 0000000..2600bd6
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0012-fix-faccessat01.c-build-fails-with-security-flags.patch
@@ -0,0 +1,70 @@
+From 32f563008f95975d26d1c4fcb266c72c56f934be Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Wed, 22 Feb 2017 01:21:55 -0500
+Subject: [PATCH] fix faccessat01.c build fails with security flags
+
+When the distro is poky-lsb, fix the following error:
+
+| In file included from ../../../../include/old/test.h:47:0,
+|                  from faccessat01.c:44:
+| faccessat01.c: In function 'setup':
+| ../../../../include/old/old_safe_file_ops.h:55:27: error: format not a string literal and no format 
arguments [-Werror=format-security]
+|                    (path), (fmt), ## __VA_ARGS__)
+|                            ^
+| faccessat01.c:132:2: note: in expansion of macro 'SAFE_FILE_PRINTF'
+|   SAFE_FILE_PRINTF(cleanup, testfile, testfile);
+|   ^~~~~~~~~~~~~~~~
+| ../../../../include/old/old_safe_file_ops.h:55:27: error: format not a string literal and no format 
arguments [-Werror=format-security]
+|                    (path), (fmt), ## __VA_ARGS__)
+|                            ^
+| faccessat01.c:133:2: note: in expansion of macro 'SAFE_FILE_PRINTF'
+|   SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
+|   ^~~~~~~~~~~~~~~~
+
+This is because in macro "SAFE_FILE_PRINTF", its third argument should be a
+format arguments, but in file faccessat01.c, it passed the same argument to
+macro "SAFE_FILE_PRINTF", so it results in the fails. It should pass the format
+string to the third argument.
+
+The same for file fchmodat01.c.
+
+Signed-off-by: Dengke Du <dengke du windriver com>
+Upstream-Status: Pending
+---
+ testcases/kernel/syscalls/faccessat/faccessat01.c | 4 ++--
+ testcases/kernel/syscalls/fchmodat/fchmodat01.c   | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c 
b/testcases/kernel/syscalls/faccessat/faccessat01.c
+index 622dfd3..1ca90e9 100644
+--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
++++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
+@@ -129,8 +129,8 @@ void setup(void)
+       fds[0] = SAFE_OPEN(cleanup, pathname, O_DIRECTORY);
+       fds[1] = fds[4] = fds[0];
+ 
+-      SAFE_FILE_PRINTF(cleanup, testfile, testfile);
+-      SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
++      SAFE_FILE_PRINTF(cleanup, testfile, "faccessattestfile%d.txt");
++      SAFE_FILE_PRINTF(cleanup, testfile2, "%s/faccessattestfile%d.txt");
+ 
+       fds[2] = SAFE_OPEN(cleanup, testfile3, O_CREAT | O_RDWR, 0600);
+ 
+diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c 
b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+index 6bf66d8..89d072a 100644
+--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
++++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+@@ -127,8 +127,8 @@ void setup(void)
+       fds[0] = SAFE_OPEN(cleanup, pathname, O_DIRECTORY);
+       fds[1] = fds[4] = fds[0];
+ 
+-      SAFE_FILE_PRINTF(cleanup, testfile, testfile);
+-      SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
++      SAFE_FILE_PRINTF(cleanup, testfile, "fchmodattest%d.txt");
++      SAFE_FILE_PRINTF(cleanup, testfile2, "%s/fchmodattest%d.txt");
+ 
+       fds[2] = SAFE_OPEN(cleanup, testfile3, O_CREAT | O_RDWR, 0600);
+       fds[3] = 100;
+-- 
+2.8.1
+
diff --git a/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch 
b/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
index b47d097..f75e33b 100644
--- a/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
+++ b/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
@@ -1,29 +1,30 @@
-From 4a74b275acc8158850f2500928a1467c3482c986 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj khem gmail com>
-Date: Fri, 8 Jan 2016 07:23:11 +0000
-Subject: [PATCH 27/32] sysconf01: Use _SC_2_C_VERSION conditionally
+From 1471012164ba8f26046d4b1ce5531a0d92805ef5 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Wed, 8 Feb 2017 16:21:16 +0800
+Subject: [PATCH 4/5] sysconf01: Use _SC_2_C_VERSION conditionally
 
 _SC_2_C_VERSION is not available on musl
 
 Signed-off-by: Khem Raj <raj khem gmail com>
+Signed-off-by: Dengke Du <dengke du windriver com>
 ---
  testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
-index 8542e77..e806943 100644
+index 583deef..de93695 100644
 --- a/testcases/kernel/syscalls/sysconf/sysconf01.c
 +++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
-@@ -102,7 +102,9 @@ int main(void)
-       test_sysconf(_SC_ATEXIT_MAX);
+@@ -103,7 +103,9 @@ int main(void)
        test_sysconf(_SC_2_C_BIND);
        test_sysconf(_SC_2_C_DEV);
+ #ifdef _SC_2_C_VERSION
 +#ifdef __GLIBC__
        test_sysconf(_SC_2_C_VERSION);
 +#endif
-       /* 21 - 25 */
-       test_sysconf(_SC_2_CHAR_TERM);
-       test_sysconf(_SC_2_FORT_DEV);
+ #else
+       tst_resm(TCONF, "_SC_2_C_VERSION not defined");
+ #endif
 -- 
-2.7.0
+2.7.4
 
diff --git a/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch 
b/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
index d2d6d76..c5fac9b 100644
--- a/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
+++ b/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
@@ -1,33 +1,33 @@
-From 77c95dacffe90382a1f131c801ac569120d95949 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj khem gmail com>
-Date: Fri, 8 Jan 2016 07:32:24 +0000
-Subject: [PATCH 30/32] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
+From 00ba7cdd0608b1507027428f9f87b1cb9747372b Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Thu, 9 Feb 2017 15:54:53 +0800
+Subject: [PATCH] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
  PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
 
 e.g. musl does not implement the _NP mutex types
 
 Signed-off-by: Khem Raj <raj khem gmail com>
+Signed-off-by: Dengke Du <dengke du windriver com>
 ---
- lib/tst_res.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
+ lib/tst_res.c | 4 ++++
+ 1 file changed, 4 insertions(+)
 
 diff --git a/lib/tst_res.c b/lib/tst_res.c
-index 5c1c58c..3244b5e 100644
+index 61daaeb..435224f 100644
 --- a/lib/tst_res.c
 +++ b/lib/tst_res.c
-@@ -104,8 +104,11 @@ int TEST_ERRNO;
+@@ -79,7 +79,11 @@ int TEST_ERRNO;
        assert(strlen(buf) > 0);                \
  } while (0)
  
 +#ifdef __GLIBC__
  static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
--
 +#else
 +static pthread_mutex_t tmutex = {  PTHREAD_MUTEX_RECURSIVE };
 +#endif
- /*
-  * Define local function prototypes.
-  */
+ 
+ static void check_env(void);
+ static void tst_condense(int tnum, int ttype, const char *tmesg);
 -- 
-2.7.0
+2.7.4
 
diff --git a/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch 
b/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
index 32ae8aa..71e32a5 100644
--- a/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
+++ b/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
@@ -1,23 +1,32 @@
-Fix test_proc_kill hanging
+From f7c602b639db0d118e07d3fa7b6deead0be0c72b Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Wed, 8 Feb 2017 16:17:17 +0800
+Subject: [PATCH 3/5] Fix test_proc_kill hanging
 
 Sometimes the signal is delivered to memcg_process before the framework took
 into consideration its pid entered in the tasks. Fixed by delaying the signal
 send command.
 
 Signed-off-by: George Nita <george nita enea com>
-Upstream-Status: Pending 
+Signed-off-by: Dengke Du <dengke du windriver com>
+
+Upstream-Status: Pending
+---
+ testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh 
b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
-index ffbe006..e81bf74 100755
+index b785fe3..2918cc5 100755
 --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
 +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
-@@ -220,8 +220,8 @@ test_proc_kill()
- 
-       $TEST_PATH/memcg_process $2 -s $3 &
+@@ -283,6 +283,7 @@ test_proc_kill()
        pid=$!
--      sleep 1
+       TST_CHECKPOINT_WAIT 0
        echo $pid > tasks
 +      sleep 1
  
-       kill -s USR1 $pid 2> /dev/null
-       sleep 1
+       signal_memcg_process $pid $3
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch 
b/meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
index f7e805a..c0c1dad 100644
--- a/meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
+++ b/meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
@@ -1,28 +1,29 @@
-From 9590d073d3abe02fe0783ef8c530aef2e873ba9b Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson mentor com>
-Date: Tue, 13 Dec 2016 12:48:29 -0700
-Subject: [PATCH] fcntl: fix the time() def to use time_t
+From 7bce3d223494803cb32897cabe66119076e53d89 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke du windriver com>
+Date: Wed, 8 Feb 2017 16:23:51 +0800
+Subject: [PATCH 5/5] fcntl: fix the time() def to use time_t
 
 This fixes the build on X32, where long is 32-bit rather than 64-bit.
 
 Signed-off-by: Christopher Larson <chris_larson mentor com>
+Signed-off-by: Dengke Du <dengke du windriver com>
 ---
  testcases/kernel/syscalls/fcntl/fcntl14.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c
-index 3b36572..65ac8fa 100644
+index c61eb24..99e3867 100644
 --- a/testcases/kernel/syscalls/fcntl/fcntl14.c
 +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c
-@@ -789,7 +789,7 @@ void dochild(void)
+@@ -775,7 +775,7 @@ void dochild(void)
  
  void run_test(int file_flag, int file_mode, int seek, int start, int end)
  {
 -      extern long time();
 +      extern time_t time();
  
-       /* reset fail to 0 for each run_test call */
        fail = 0;
+ 
 -- 
-2.8.0
+2.7.4
 
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb b/meta/recipes-extended/ltp/ltp_20170116.bb
similarity index 77%
rename from meta/recipes-extended/ltp/ltp_20160126.bb
rename to meta/recipes-extended/ltp/ltp_20170116.bb
index aaa63c2..a5494bc 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20170116.bb
@@ -11,9 +11,6 @@ LIC_FILES_CHKSUM = "\
     file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
     file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
     file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
-    file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
-    file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
-    file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
     file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
     file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
     file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
@@ -24,49 +21,36 @@ DEPENDS_append_libc-musl = " fts "
 EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
 CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
 CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
-SRCREV = "fce797676b14f50406718e7ef640b50da66c9b36"
+SRCREV = "2c8457b0769fc026e4e1772f4c2a6da0be63a631"
 
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
-           file://0001-ltp-Don-t-link-against-libfl.patch \
+           file://0001-add-_GNU_SOURCE-to-pec_listener.c.patch \
            file://0002-Add-knob-to-control-whether-numa-support-should-be-c.patch \
            file://0003-Add-knob-to-control-tirpc-support.patch \
            file://0004-build-Add-option-to-select-libc-implementation.patch \
            file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
-           file://0006-sendfile-Use-off64_t-instead-of-__off64_t.patch \
-           file://0007-replace-SIGCLD-with-SIGCHLD.patch \
+           file://0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch \
+           file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
            file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
-           file://0009-Guard-error.h-with-__GLIBC__.patch \
+           file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
            file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
            file://0011-Rename-sigset-variable-to-sigset1.patch \
-           file://0012-fsstress.c-Replace-__int64_t-with-int64_t.patch \
-           file://0013-include-fcntl.h-for-getting-O_-definitions.patch \
-           file://0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch \
-           file://0015-mincore01-Rename-PAGESIZE-to-pagesize.patch \
-           file://0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch \
-           file://0017-replace-sigval_t-with-union-sigval.patch \
+           file://0012-fix-faccessat01.c-build-fails-with-security-flags.patch \
            file://0018-guard-mallocopt-with-__GLIBC__.patch \
-           file://0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch \
            file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
            file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
-           file://0022-include-sys-types.h.patch \
            file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
            file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
            file://0025-mc_gethost-include-sys-types.h.patch \
            file://0026-crash01-Define-_GNU_SOURCE.patch \
            file://0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch \
            file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
-           file://0029-trace_shed-Fix-build-with-musl.patch \
            file://0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch \
-           file://0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch \
-           file://0032-regen.sh-Include-asm-unistd.h-explicitly.patch \
            file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
            file://0034-periodic_output.patch \
            file://0035-fix-test_proc_kill-hang.patch \
            file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
-           file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch \
-           file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \
            file://0039-fcntl-fix-the-time-def-to-use-time_t.patch \
-           file://0040-containers-userns05-use-unsigned-int-for-ns-id.patch \
            "
 
 S = "${WORKDIR}/git"
@@ -104,13 +88,16 @@ do_install(){
     # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
     rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
 
+    # In oe-core, we doesn't support ksh and csh now, so remove in.csh and in.ksh.
+    rm ${D}/opt/ltp/testcases/data/file01/in.csh
+    rm ${D}/opt/ltp/testcases/data/file01/in.ksh
     # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
     cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
 }
 
-RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect ldd"
+RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect ldd unzip gzip cpio cronie 
logrotate which at"
 
-FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
+FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a /opt/ltp/testcases/data/nm01/lib.a"
 
 FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* 
/opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* 
/opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* 
/opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* 
/opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* 
/opt/ltp/testcases/open_posix_testsuite/tools/*"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]