Skip to contentSkip to conversation

package/ltp-testsuite: bump version to 20210927

PATCH Superseded Petr Vorel 1 participant 1 message Sep 30, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 package/ltp-testsuite: bump version to 20210927

* Update unsupported testcases for musl (process.c has been removed in this release)

* refresh 0001-lapi-Add-sysinfo.h-to-fix-build-with-MUSL-libc.patch (unfortunately still needed, it'd be great to update all toolchains)

* Backport fix after this release:
- 3 patches for build fix on sourcery-arm
- functional fix from e42149e28 ("lib: fix MemAvailable parsing")

---
 ...ysinfo.h-to-fix-build-with-MUSL-libc.patch | 61 +++++++++++--------
 .../0002-lib-fix-MemAvailable-parsing.patch   | 36 +++++++++++
 ...-lapi-rtnetlink.h-Fix-include-guards.patch | 37 +++++++++++
 ...f_addr.h-and-reuse-it-in-rtnetlink.h.patch | 58 ++++++++++++++++++
 ...0005-lapi-if_addr.h-Define-IFA_FLAGS.patch | 60 ++++++++++++++++++
 package/ltp-testsuite/ltp-testsuite.hash      |  6 +-
 package/ltp-testsuite/ltp-testsuite.mk        |  3 +-
 7 files changed, 231 insertions(+), 30 deletions(-)
 create mode 100644 package/ltp-testsuite/0002-lib-fix-MemAvailable-parsing.patch
 create mode 100644 package/ltp-testsuite/0003-lapi-rtnetlink.h-Fix-include-guards.patch
 create mode 100644 package/ltp-testsuite/0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch
 create mode 100644 package/ltp-testsuite/0005-lapi-if_addr.h-Define-IFA_FLAGS.patch
package/ltp-testsuite/0001-lapi-Add-sysinfo.h-to-fix-build-with-MUSL-libc.patch +36 -25
index 2893026c03..246e35ad7d 100644
@@ -1,7 +1,7 @@
-From ac3e262cba81889c0bb04ce87a50a1709f2726e7 Mon Sep 17 00:00:00 2001
+From bee452dfa2a34ba7df7db677e5673cbdcd23f61e Mon Sep 17 00:00:00 2001
 From: Petr Vorel <[email protected]>
 Date: Thu, 1 Oct 2020 23:28:39 +0200
-Subject: [PATCH] lapi: Add sysinfo.h to fix build with MUSL libc
+Subject: [PATCH 1/5] lapi: Add sysinfo.h to fix build with MUSL libc
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -27,7 +27,9 @@ x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: origin
 
 Signed-off-by: Petr Vorel <[email protected]>
 
-[ upstream status: https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
+[ upstream status:
+https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/,
+rebased for 20210927 ]
 
 But this patch is not going to get upstreamed because it got fixed in Linux kernel:
 a85cbe6159ff "uapi: move constants from <linux/kernel.h> to <linux/const.h>"
@@ -36,6 +38,8 @@ This patch was also backported to stable and LTS versions,
 which we use since buildroot 54584d233b "{linux, linux-headers}: bump
 5.{4, 10}.x 4.{4, 9, 14, 19} series".
 We just wait for all musl based toolchains to be rebuilt. ]
+
+Signed-off-by: Petr Vorel <[email protected]>
 ---
  include/lapi/sysinfo.h                        | 22 +++++++++++++++++++
  include/tst_safe_macros.h                     |  2 +-
@@ -46,7 +50,8 @@ We just wait for all musl based toolchains to be rebuilt. ]
  testcases/kernel/syscalls/sysinfo/sysinfo01.c |  2 +-
  testcases/kernel/syscalls/sysinfo/sysinfo02.c |  2 +-
  testcases/kernel/syscalls/sysinfo/sysinfo03.c |  2 +-
- 9 files changed, 30 insertions(+), 8 deletions(-)
+ .../interfaces/pthread_cond_broadcast/1-2.c   |  2 +-
+ 10 files changed, 31 insertions(+), 9 deletions(-)
  create mode 100644 include/lapi/sysinfo.h
 
 diff --git a/include/lapi/sysinfo.h b/include/lapi/sysinfo.h
@@ -78,7 +83,7 @@ index 000000000..d0e0e93d7
 +
 +#endif /* SYSINFO_H__ */
 diff --git a/include/tst_safe_macros.h b/include/tst_safe_macros.h
-index ee3df4142..3cb1623f9 100644
+index d99441c86..0d26e9d45 100644
 --- a/include/tst_safe_macros.h
 +++ b/include/tst_safe_macros.h
 @@ -12,7 +12,7 @@
@@ -111,7 +116,7 @@ index a5b6bc504..20d01d304 100644
  char *safe_basename(const char *file, const int lineno,
  		    void (*cleanup_fn) (void), char *path)
 diff --git a/lib/tst_memutils.c b/lib/tst_memutils.c
-index dd09db490..085392365 100644
+index 69077861f..ae1cad29b 100644
 --- a/lib/tst_memutils.c
 +++ b/lib/tst_memutils.c
 @@ -5,11 +5,11 @@
@@ -148,64 +153,70 @@ index 9676ea4b5..33b2ac822 100644
  
  #define FIVE_HUNDRED_MB         (500ULL*1024*1024)
 diff --git a/testcases/kernel/syscalls/madvise/madvise06.c b/testcases/kernel/syscalls/madvise/madvise06.c
-index 962554163..aa4d3bc91 100644
+index 263b8e78b..4fa52e6ea 100644
 --- a/testcases/kernel/syscalls/madvise/madvise06.c
 +++ b/testcases/kernel/syscalls/madvise/madvise06.c
-@@ -41,7 +41,7 @@
+@@ -46,7 +46,7 @@
  #include <errno.h>
  #include <stdio.h>
  #include <sys/mount.h>
 -#include <sys/sysinfo.h>
 +#include "lapi/sysinfo.h"
  #include "tst_test.h"
+ #include "tst_cgroup.h"
  
- #define CHUNK_SZ (400*1024*1024L)
 diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo01.c b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
-index 2ea44a2be..a95066bf5 100644
+index 2ea44a2be..a237345ef 100644
 --- a/testcases/kernel/syscalls/sysinfo/sysinfo01.c
 +++ b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
-@@ -69,9 +69,9 @@
+@@ -69,7 +69,7 @@
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/signal.h>
 -#include <sys/sysinfo.h>
++#include "lapi/sysinfo.h"
  
  #include "test.h"
-+#include "lapi/sysinfo.h"
  
- void setup();
- void cleanup();
 diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo02.c b/testcases/kernel/syscalls/sysinfo/sysinfo02.c
-index 678b8f1d3..5ce65d20e 100644
+index 7ad0e8bdc..61fa1ab75 100644
 --- a/testcases/kernel/syscalls/sysinfo/sysinfo02.c
 +++ b/testcases/kernel/syscalls/sysinfo/sysinfo02.c
-@@ -65,10 +65,10 @@
+@@ -65,7 +65,7 @@
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/signal.h>
 -#include <sys/sysinfo.h>
++#include "lapi/sysinfo.h"
  #include <stdint.h>
  
  #include "test.h"
-+#include "lapi/sysinfo.h"
- 
- #define INVALID_ADDRESS ((uintptr_t)-1)
- 
 diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo03.c b/testcases/kernel/syscalls/sysinfo/sysinfo03.c
-index af7cb6421..3b61a05b1 100644
+index af7cb6421..dc5ae65e3 100644
 --- a/testcases/kernel/syscalls/sysinfo/sysinfo03.c
 +++ b/testcases/kernel/syscalls/sysinfo/sysinfo03.c
-@@ -13,9 +13,9 @@
+@@ -13,7 +13,7 @@
  
   */
  
 -#include <sys/sysinfo.h>
++#include "lapi/sysinfo.h"
  #include "lapi/namespaces_constants.h"
  #include "lapi/posix_clocks.h"
-+#include "lapi/sysinfo.h"
  #include "tst_test.h"
+diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c
+index 22e7c3638..572701f9f 100644
+--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c
++++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_broadcast/1-2.c
+@@ -43,7 +43,7 @@
+ #include <sys/wait.h>
+ #include <semaphore.h>
+ #ifdef	__linux__
+-#include <sys/sysinfo.h>
++#include "lapi/sysinfo.h"
+ #endif
  
- static int offsets[] = {
+ #include "../testfrmw/testfrmw.h"
 -- 
-2.30.0
+2.33.0
 
package/ltp-testsuite/0002-lib-fix-MemAvailable-parsing.patch new file +36 -0
new file mode 100644
index 0000000000..bf0c71e45d
@@ -0,0 +1,36 @@
+From 29a096fe2bd356f419bd8a8404d5b652c996b92f Mon Sep 17 00:00:00 2001
+From: Ralph Siemsen <[email protected]>
+Date: Mon, 27 Sep 2021 22:18:50 -0400
+Subject: [PATCH 2/5] lib: fix MemAvailable parsing
+
+The amount of available memory was not being returned correctly, which
+resulted in tests being executed when they should have been skipped.
+
+Fixes: 8759f4 ("lib: adjust the tmpfs size according to .dev_min_size and MemAvailable")
+Signed-off-by: Ralph Siemsen <[email protected]>
+Signed-off-by: Li Wang <[email protected]>
+Signed-off-by: Petr Vorel <[email protected]>
+[ upstream status: e42149e28 ("lib: fix MemAvailable parsing") ]
+---
+ lib/tst_memutils.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/tst_memutils.c b/lib/tst_memutils.c
+index ae1cad29b..a46de78f5 100644
+--- a/lib/tst_memutils.c
++++ b/lib/tst_memutils.c
+@@ -65,9 +65,9 @@ void tst_pollute_memory(size_t maxsize, int fillchar)
+ 
+ long long tst_available_mem(void)
+ {
+-	long long mem_available;
++	unsigned long long mem_available = 0;
+ 
+-	if (FILE_LINES_SCANF("/proc/meminfo", "MemAvailable: %ld",
++	if (FILE_LINES_SCANF("/proc/meminfo", "MemAvailable: %llu",
+ 		&mem_available)) {
+ 		mem_available = SAFE_READ_MEMINFO("MemFree:")
+ 			+ SAFE_READ_MEMINFO("Cached:");
+-- 
+2.33.0
+
package/ltp-testsuite/0003-lapi-rtnetlink.h-Fix-include-guards.patch new file +37 -0
new file mode 100644
index 0000000000..8a09c3bf8d
@@ -0,0 +1,37 @@
+From 881709d1e4d1bba5bf8ca365bc058f338bd72dc2 Mon Sep 17 00:00:00 2001
+From: Petr Vorel <[email protected]>
+Date: Wed, 29 Sep 2021 19:38:42 +0200
+Subject: [PATCH 3/5] lapi/rtnetlink.h: Fix include guards
+
+Fixes: 5fea0638a ("lapi: Add missing IFA_FLAGS")
+
+Signed-off-by: Petr Vorel <[email protected]>
+[ upstream status: a2a212cf8 ("lapi/rtnetlink.h: Fix include guards") ]
+---
+ include/lapi/rtnetlink.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/lapi/rtnetlink.h b/include/lapi/rtnetlink.h
+index 8a1b5385b..04e9ad51a 100644
+--- a/include/lapi/rtnetlink.h
++++ b/include/lapi/rtnetlink.h
+@@ -1,8 +1,8 @@
+ // SPDX-License-Identifier: GPL-2.0-or-later
+ /* Copyright (c) 2021 Petr Vorel <[email protected]> */
+ 
+-#ifndef LAPI_IF_ADDR_H__
+-# define LAPI_IF_ADDR_H__
++#ifndef LAPI_RTNETLINK_H__
++# define LAPI_RTNETLINK_H__
+ 
+ #include <linux/rtnetlink.h>
+ 
+@@ -10,4 +10,4 @@
+ # define IFA_FLAGS 8
+ #endif
+ 
+-#endif	/* LAPI_IF_ADDR_H__ */
++#endif	/* LAPI_RTNETLINK_H__ */
+-- 
+2.33.0
+
package/ltp-testsuite/0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch new file +58 -0

58 lines not on this page · raw message

package/ltp-testsuite/0005-lapi-if_addr.h-Define-IFA_FLAGS.patch new file +60 -0

60 lines not on this page · raw message

package/ltp-testsuite/ltp-testsuite.hash +3 -3
index ed2a50cd4f..a9f3cfdfe1 100644
@@ -1,5 +1,5 @@
-# From: https://github.com/linux-test-project/ltp/releases/download/20210524/ltp-full-20210524.tar.xz.sha1
-sha1 08d84f8ac3ba0c800f3070768c651703869105d7  ltp-full-20210524.tar.xz
+# From: https://github.com/linux-test-project/ltp/releases/download/20210927/ltp-full-20210927.tar.xz.sha1
+sha1 dad7737f609e358c4060cb446b9cae5c026fc137  ltp-full-20210927.tar.xz
 # Locally computed
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
-sha256  831678c64b85a8c24957c71632752537b2266890f2d2f352da9ed0ec45458189  ltp-full-20210524.tar.xz
+sha256  779e9e5cc9af4f2b3d4cb32f5439ebd635504d2c4591bf900f0942dac290ed15  ltp-full-20210927.tar.xz
package/ltp-testsuite/ltp-testsuite.mk +1 -2
index badd161d5a..3d8fe3b78c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LTP_TESTSUITE_VERSION = 20210524
+LTP_TESTSUITE_VERSION = 20210927
 LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz
 LTP_TESTSUITE_SITE = https://github.com/linux-test-project/ltp/releases/download/$(LTP_TESTSUITE_VERSION)
 
@@ -70,7 +70,6 @@ LTP_TESTSUITE_UNSUPPORTED_TEST_CASES_$(BR2_TOOLCHAIN_USES_UCLIBC) += \
 	testcases/misc/math/float/float_bessel.c
 
 LTP_TESTSUITE_UNSUPPORTED_TEST_CASES_$(BR2_TOOLCHAIN_USES_MUSL) += \
-	testcases/kernel/sched/process_stress/process.c \
 	testcases/kernel/syscalls/confstr/confstr01.c \
 	testcases/kernel/syscalls/fmtmsg/fmtmsg01.c \
 	testcases/kernel/syscalls/getcontext/getcontext01.c \
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot