public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] nm01: Remove prefix zeros of the addresses output by nm before comparing
@ 2019-12-25  6:57 zhe.he
  2019-12-30 13:13 ` Li Wang
  0 siblings, 1 reply; 3+ messages in thread
From: zhe.he @ 2019-12-25  6:57 UTC (permalink / raw)
  To: ltp

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

The latest nm v2.33.1.20191208 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>
---
 testcases/commands/nm/nm01.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/commands/nm/nm01.sh b/testcases/commands/nm/nm01.sh
index 30c41bd..29b6bd7 100755
--- a/testcases/commands/nm/nm01.sh
+++ b/testcases/commands/nm/nm01.sh
@@ -84,6 +84,9 @@ 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 gensub(/(0+)([0-9a-fA-F]+)/, "\\2", "g")}' nm_bsd.out \> nm_bsd.out
+	ROD awk '{print gensub(/(0+)([0-9a-fA-F]+)/, "\\2", "g")}' nm_posix.out \> 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
 
-- 
2.7.4


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

end of thread, other threads:[~2019-12-31  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-25  6:57 [LTP] [PATCH] nm01: Remove prefix zeros of the addresses output by nm before comparing zhe.he
2019-12-30 13:13 ` Li Wang
2019-12-31  7:02   ` He Zhe

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