summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2020-01-19 16:50:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 23:49:39 +0000
commite3a844509c91d95f40b1cc8c949b604b0dc9f5f8 (patch)
tree134fe269616dcdb3a4644d2fa1b3e89eac051368 /meta
parente261883a0fa673b6c11bd4f81669843c3f0f8af6 (diff)
downloadpoky-e3a844509c91d95f40b1cc8c949b604b0dc9f5f8.tar.gz
ltp: Fix nm01 faliure
Backport a patch from upstream to fix the following runtime failure. The latest nm v2.33.1 outputs symbols addresses without prefix zeros for "nm -f posix", which causes the following error. nm01 5 TFAIL: Got wrong format with -f bsd (From OE-Core rev: bfffb32611c6d61286171af7f4b1b2edb227f186) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch43
-rw-r--r--meta/recipes-extended/ltp/ltp_20190930.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
new file mode 100644
index 0000000000..fe5e7314e0
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
@@ -0,0 +1,43 @@
1From 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45 Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Tue, 31 Dec 2019 15:02:48 +0800
4Subject: [PATCH] nm01: Remove prefix zeros of the addresses output by nm
5 before comparing
6
7The latest nm v2.33.1 outputs symbols addresses without prefix zeros
8for "nm -f posix", which causes the following error.
9nm01 5 TFAIL: Got wrong format with -f bsd
10
11Let's remove the prefix zeros before comparing.
12
13Upstream-Status: Backport [59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45]
14
15Signed-off-by: He Zhe <zhe.he@windriver.com>
16Reviewed-by: Li Wang <liwang@redhat.com>
17Reviewed-by: Petr Vorel <pvorel@suse.cz>
18Tested-by: Petr Vorel <pvorel@suse.cz>
19---
20 testcases/commands/nm/nm01.sh | 7 +++++--
21 1 file changed, 5 insertions(+), 2 deletions(-)
22
23diff --git a/testcases/commands/nm/nm01.sh b/testcases/commands/nm/nm01.sh
24index 30c41bd..fd9d3d9 100755
25--- a/testcases/commands/nm/nm01.sh
26+++ b/testcases/commands/nm/nm01.sh
27@@ -84,8 +84,11 @@ test5()
28 EXPECT_PASS $NM -f bsd $TST_DATAROOT/f1 \> nm_bsd.out
29 EXPECT_PASS $NM -f posix $TST_DATAROOT/f1 \> nm_posix.out
30
31- ROD awk '{print $3 $2 $1}' nm_bsd.out \> nm1.out
32- ROD awk '{print $1 $2 $3}' nm_posix.out \> nm2.out
33+ ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' nm_bsd.out \> trimmed_nm_bsd.out
34+ ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' nm_posix.out \> trimmed_nm_posix.out
35+
36+ ROD awk '{print $3 $2 $1}' trimmed_nm_bsd.out \> nm1.out
37+ ROD awk '{print $1 $2 $3}' trimmed_nm_posix.out \> nm2.out
38
39 if diff nm1.out nm2.out > /dev/null; then
40 tst_res TPASS "Got BSD format with -f bsd"
41--
422.7.4
43
diff --git a/meta/recipes-extended/ltp/ltp_20190930.bb b/meta/recipes-extended/ltp/ltp_20190930.bb
index e56bb575d2..2853b1c819 100644
--- a/meta/recipes-extended/ltp/ltp_20190930.bb
+++ b/meta/recipes-extended/ltp/ltp_20190930.bb
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
41 file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \ 41 file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
42 file://0001-testcases-fix-an-absent-format-string-issue.patch \ 42 file://0001-testcases-fix-an-absent-format-string-issue.patch \
43 file://0001-Add-more-musl-exclusions.patch \ 43 file://0001-Add-more-musl-exclusions.patch \
44 file://0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch \
44 " 45 "
45 46
46S = "${WORKDIR}/git" 47S = "${WORKDIR}/git"