Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] ltp: Fix nm01 faliure
@ 2020-01-19  7:36 zhe.he
  2020-01-19  8:02 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: zhe.he @ 2020-01-19  7:36 UTC (permalink / raw)
  To: openembedded-core

From: He Zhe <zhe.he@windriver.com>

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: 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45)

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 ...ix-zeros-of-the-addresses-output-by-.patch | 41 +++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20190930.bb     |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch

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..a98a104384
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
@@ -0,0 +1,41 @@
+From 59cb0dd9f8e65b2d398fcaf4d163cbc8e1d0ae45 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Tue, 31 Dec 2019 15:02:48 +0800
+Subject: [PATCH] nm01: Remove prefix zeros of the addresses output by nm
+ before comparing
+
+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
+
+Let's remove the prefix zeros before comparing.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+Reviewed-by: Li Wang <liwang@redhat.com>
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Tested-by: Petr Vorel <pvorel@suse.cz>
+---
+ testcases/commands/nm/nm01.sh | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/commands/nm/nm01.sh b/testcases/commands/nm/nm01.sh
+index 30c41bd..fd9d3d9 100755
+--- a/testcases/commands/nm/nm01.sh
++++ b/testcases/commands/nm/nm01.sh
+@@ -84,8 +84,11 @@ test5()
+ 	EXPECT_PASS $NM -f bsd $TST_DATAROOT/f1 \> nm_bsd.out
+ 	EXPECT_PASS $NM -f posix $TST_DATAROOT/f1 \> nm_posix.out
+ 
+-	ROD awk '{print $3 $2 $1}' nm_bsd.out \> nm1.out
+-	ROD awk '{print $1 $2 $3}' nm_posix.out \> nm2.out
++	ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' nm_bsd.out \> trimmed_nm_bsd.out
++	ROD awk '{print gensub(/\y(0+)([0-9a-fA-F]+)\y/, "\\2", "g")}' nm_posix.out \> trimmed_nm_posix.out
++
++	ROD awk '{print $3 $2 $1}' trimmed_nm_bsd.out \> nm1.out
++	ROD awk '{print $1 $2 $3}' trimmed_nm_posix.out \> nm2.out
+ 
+ 	if diff nm1.out nm2.out > /dev/null; then
+ 		tst_res TPASS "Got BSD format with -f bsd"
+-- 
+2.7.4
+
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 \
            file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \
            file://0001-testcases-fix-an-absent-format-string-issue.patch \
            file://0001-Add-more-musl-exclusions.patch \
+           file://0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch \
            "
 
 S = "${WORKDIR}/git"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for ltp: Fix nm01 faliure
  2020-01-19  7:36 [PATCH] ltp: Fix nm01 faliure zhe.he
@ 2020-01-19  8:02 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2020-01-19  8:02 UTC (permalink / raw)
  To: zhe.he; +Cc: openembedded-core

== Series Details ==

Series: ltp: Fix nm01 faliure
Revision: 1
URL   : https://patchwork.openembedded.org/series/22131/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-extended/ltp/ltp/0001-nm01-Remove-prefix-zeros-of-the-addresses-output-by-.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-19  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-19  7:36 [PATCH] ltp: Fix nm01 faliure zhe.he
2020-01-19  8:02 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox