Skip to contentSkip to conversation

ltp: Update to 20210927

PATCH Superseded Petr Vorel 3 participants 4 messages Sep 30, 2021 – Oct 4, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 ltp: Update to 20210927

New patches to fix functionality:
* 0002-lib-fix-MemAvailable-parsing.patch
* 0003-lapi-rtnetlink.h-Fix-include-guards.patch
* 0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch
* 0005-lapi-if_addr.h-Define-IFA_FLAGS.patch

Removed patch from this release
* 0001-syscalls-ioctl_ns05.c-ioctl_ns06.c-Fix-too-small-buf.patch

Rebased patch
* 0001-Remove-OOM-tests-from-runtest-mm.patch

---
Hi,

@Anders, @Naresh: could you please test it?

Kind regards,
Petr

 ...001-Remove-OOM-tests-from-runtest-mm.patch | 12 ++--
 ...s05.c-ioctl_ns06.c-Fix-too-small-buf.patch | 59 ------------------
 .../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 +++++++++++++++++++
 .../ltp/{ltp_20210524.bb => ltp_20210927.bb}  | 10 ++--
 7 files changed, 205 insertions(+), 67 deletions(-)
 delete mode 100644 meta/recipes-extended/ltp/ltp/0001-syscalls-ioctl_ns05.c-ioctl_ns06.c-Fix-too-small-buf.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0002-lib-fix-MemAvailable-parsing.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0003-lapi-rtnetlink.h-Fix-include-guards.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0005-lapi-if_addr.h-Define-IFA_FLAGS.patch
 rename meta/recipes-extended/ltp/{ltp_20210524.bb => ltp_20210927.bb} (93%)
meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch +8 -4
index e51950f153..6d945700be 100644
@@ -1,4 +1,4 @@
-From 93772c511d954d755cc9128c58ed8968a5af541b Mon Sep 17 00:00:00 2001
+From e87c2ad1e16cdbd62ba71b2ace3270503decaa56 Mon Sep 17 00:00:00 2001
 From: "Mingde (Matthew) Zeng" <[email protected]>
 Date: Wed, 29 Jul 2020 08:47:09 -0400
 Subject: [PATCH] Remove OOM tests from runtest/mm
@@ -7,16 +7,17 @@ Disable OOM tests, as they might cause oeqa ssh connection lost
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Mingde (Matthew) Zeng <[email protected]>
-
+[ pvorel: rebased for 20210927 ]
+Signed-off-by: Petr Vorel <[email protected]>
 ---
  runtest/mm | 6 ------
  1 file changed, 6 deletions(-)
 
 diff --git a/runtest/mm b/runtest/mm
-index 481d39691..cf207d10e 100644
+index 6537666a9..e5a091a5a 100644
 --- a/runtest/mm
 +++ b/runtest/mm
-@@ -74,12 +74,6 @@ ksm06_2 ksm06 -n 10000
+@@ -73,12 +73,6 @@ ksm06_2 ksm06 -n 8000
  
  cpuset01 cpuset01
  
@@ -29,3 +30,6 @@ index 481d39691..cf207d10e 100644
  swapping01 swapping01 -i 5
  
  thp01 thp01 -I 120
+-- 
+2.33.0
+
meta/recipes-extended/ltp/ltp/0001-syscalls-ioctl_ns05.c-ioctl_ns06.c-Fix-too-small-buf.patch deleted +0 -59

59 lines not on this page · raw message

meta/recipes-extended/ltp/ltp/0002-lib-fix-MemAvailable-parsing.patch new file +36 -0
new file mode 100644
index 0000000000..4a9a5b2363
@@ -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] 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
+
meta/recipes-extended/ltp/ltp/0003-lapi-rtnetlink.h-Fix-include-guards.patch new file +37 -0
new file mode 100644
index 0000000000..3c1b1ea486
@@ -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] 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
+
meta/recipes-extended/ltp/ltp/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

meta/recipes-extended/ltp/ltp/0005-lapi-if_addr.h-Define-IFA_FLAGS.patch new file +60 -0

60 lines not on this page · raw message

meta/recipes-extended/ltp/ltp_20210927.bb renamed from meta/recipes-extended/ltp/ltp_20210524.bb +6 -4
similarity index 93%
rename from meta/recipes-extended/ltp/ltp_20210524.bb
rename to meta/recipes-extended/ltp/ltp_20210927.bb
index 20e2deffa5..2088fb2ff3 100644
@@ -27,11 +27,14 @@ CFLAGS:append:x86-64 = " -fomit-frame-pointer"
 
 CFLAGS:append:powerpc64 = " -D__SANE_USERSPACE_TYPES__"
 CFLAGS:append:mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
-SRCREV = "0fb171f2beddaf64bd27597577c206c0f892b3cd"
+SRCREV = "12beeda351b5d758a729aaf695b836ccc9eb5304"
 
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0001-Remove-OOM-tests-from-runtest-mm.patch \
-           file://0001-syscalls-ioctl_ns05.c-ioctl_ns06.c-Fix-too-small-buf.patch \
+           file://0002-lib-fix-MemAvailable-parsing.patch \
+           file://0003-lapi-rtnetlink.h-Fix-include-guards.patch \
+           file://0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch \
+           file://0005-lapi-if_addr.h-Define-IFA_FLAGS.patch \
            "
 
 S = "${WORKDIR}/git"
@@ -119,9 +122,8 @@ remove_broken_musl_sources() {
 	echo "WARNING: remove unsupported tests (until they're fixed)"
 
 	# sync with upstream
-	# https://github.com/linux-test-project/ltp/blob/master/travis/alpine.sh#L33
+	# https://github.com/linux-test-project/ltp/blob/master/ci/alpine.sh#L33
 	rm -rfv \
-		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 · 1 line
2.33.0
#1 lore raw

Hello!

Many thanks for this prompt recipe!

Quoted 13 lines · Petr Vorel

New patches to fix functionality:
* 0002-lib-fix-MemAvailable-parsing.patch
* 0003-lapi-rtnetlink.h-Fix-include-guards.patch
* 0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch
* 0005-lapi-if_addr.h-Define-IFA_FLAGS.patch

Removed patch from this release
* 0001-syscalls-ioctl_ns05.c-ioctl_ns06.c-Fix-too-small-buf.patch

Rebased patch
* 0001-Remove-OOM-tests-from-runtest-mm.patch

[...]

meta/recipes-extended/ltp/ltp_20210927.bb

Quoted 4 lines
meta/recipes-extended/ltp/ltp_20210927.bb renamed from meta/recipes-extended/ltp/ltp_20210524.bb +0 -0
similarity index 93%
rename from meta/recipes-extended/ltp/ltp_20210524.bb
rename to meta/recipes-extended/ltp/ltp_20210927.bb

This needs to be updated in the recipe:

LIC_FILES_CHKSUM = "\
    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
    file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947
\
    file://testcases/network/can/filter-tests/COPYING;md5=5b155ea7d7f86eae8e8832955d8b70bc

\
"

FWIW, we've build-tested it (against Sumo :(, changing the override separator), but have yet to execute the actual tests.

Greetings!

Daniel Díaz
[email protected]

author
#2 lore raw

Hi Daniel,

Quoted 3 lines

Hello!

Many thanks for this prompt recipe!

yw, thanks for helping to test!

Quoted 22 lines · Petr Vorel
Quoted 13 lines

New patches to fix functionality:
* 0002-lib-fix-MemAvailable-parsing.patch
* 0003-lapi-rtnetlink.h-Fix-include-guards.patch
* 0004-lapi-Create-if_addr.h-and-reuse-it-in-rtnetlink.h.patch
* 0005-lapi-if_addr.h-Define-IFA_FLAGS.patch

Removed patch from this release
* 0001-syscalls-ioctl_ns05.c-ioctl_ns06.c-Fix-too-small-buf.patch

Rebased patch
* 0001-Remove-OOM-tests-from-runtest-mm.patch

[...]

meta/recipes-extended/ltp/ltp_20210927.bb

Quoted 4 lines
meta/recipes-extended/ltp/ltp_20210927.bb renamed from meta/recipes-extended/ltp/ltp_20210524.bb +0 -0
similarity index 93%
rename from meta/recipes-extended/ltp/ltp_20210524.bb
rename to meta/recipes-extended/ltp/ltp_20210927.bb

This needs to be updated in the recipe:

Quoted 7 lines
LIC_FILES_CHKSUM = "\
    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
    file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947
\
    file://testcases/network/can/filter-tests/COPYING;md5=5b155ea7d7f86eae8e8832955d8b70bc

\
"

Ah, I reduced copying files, thanks for a reminder! Sending v2 in a minute.

Quoted 2 lines

FWIW, we've build-tested it (against Sumo :(, changing the override separator), but have yet to execute the actual tests.

Thanks!

Kind regards,
Petr

Quoted 4 lines

Greetings!

Daniel Díaz
[email protected]

#3 lore raw
In reply to Daniel Díaz

Hi Daniel and Petr,

Quoted 2 lines

FWIW, we've build-tested it (against Sumo :(, changing the override separator), but have yet to execute the actual tests.

Thanks Daniel for creating the latest LTP builds for arm, arm64, i386 and x86_64.
LTP syscall tested on these architectures and no regression found.

15 new test cases pass on arm and arm64.
17 new test cases pass on i386 and x86_64.

- Naresh