All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] lsmod01: parse a copy of /proc/modules
@ 2016-08-29 11:08 Stanislav Kholmanskikh
  2016-08-29 12:50 ` Cyril Hrubis
  2016-08-31 13:55 ` [LTP] [PATCH] lsmod01: parse a copy of /proc/modules Cyril Hrubis
  0 siblings, 2 replies; 19+ messages in thread
From: Stanislav Kholmanskikh @ 2016-08-29 11:08 UTC (permalink / raw)
  To: ltp

In my environment, if TMPDIR is on NFSv4, this test case fails with:

lsmod01 1 TFAIL : lsmod output different from /proc/modules.
  21c21
  < sunrpc 207591 28
  ---
  > sunrpc 207591 29

To avoid such problems I separate the process of getting data from
/proc/modules and the process of parsing it in the pipe structure.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
This was found while preparing for the next LTP release.

testcases/commands/lsmod/lsmod01.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/testcases/commands/lsmod/lsmod01.sh b/testcases/commands/lsmod/lsmod01.sh
index 5cf2fee..a880b97 100755
--- a/testcases/commands/lsmod/lsmod01.sh
+++ b/testcases/commands/lsmod/lsmod01.sh
@@ -45,7 +45,8 @@ lsmod_test()
 
 	awk '!/Module/{print $1, $2, $3}' temp |sort >temp1
 
-	awk '{print $1, $2, $3}' /proc/modules |sort >temp2
+	cat /proc/modules > temp
+	awk '{print $1, $2, $3}' temp |sort >temp2
 
 	diff temp1 temp2 >temp3
 	if [ $? -ne 0 ]; then
-- 
1.7.1


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

end of thread, other threads:[~2016-11-10 14:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 11:08 [LTP] [PATCH] lsmod01: parse a copy of /proc/modules Stanislav Kholmanskikh
2016-08-29 12:50 ` Cyril Hrubis
2016-08-29 13:05   ` Stanislav Kholmanskikh
2016-08-29 13:34     ` Jan Stancek
2016-08-29 14:00       ` Stanislav Kholmanskikh
2016-08-29 14:03         ` Stanislav Kholmanskikh
2016-08-29 15:17           ` Cyril Hrubis
2016-08-29 15:49           ` Jan Stancek
2016-10-11 12:03             ` Stanislav Kholmanskikh
2016-10-11 13:38               ` Cyril Hrubis
2016-10-11 15:47                 ` Stanislav Kholmanskikh
2016-10-11 16:15                   ` Cyril Hrubis
2016-11-09 14:34                     ` [LTP] [PATCH] lsmod01: keep the output in variables Stanislav Kholmanskikh
2016-11-09 16:49                       ` Cyril Hrubis
2016-11-10 10:07                         ` Stanislav Kholmanskikh
2016-11-10 11:39                           ` Cyril Hrubis
2016-11-10 14:15                             ` Stanislav Kholmanskikh
2016-08-31 13:55 ` [LTP] [PATCH] lsmod01: parse a copy of /proc/modules Cyril Hrubis
2016-09-02 14:12   ` Stanislav Kholmanskikh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.