[LTP] [PATCH] lsmod01: parse a copy of /proc/modules

Cyril Hrubis chrubis@suse.cz
Tue Oct 11 18:15:57 CEST 2016


Hi!
> > Isn't the original patch just workaround? Since we write to the nfs
> > TMPDIR as well, just differently, there is always possibility that we
> > only made the problem less probable and that it will fail in one of
> > thousand runs. Have you tried to run the test in a loop for some time?
> 
> Yes, the original patch is a workaround.
> 
> On my system I met 1 failure of 20000 runs (~1 hour).
> 
> Maybe we need to follow your proposal and test only the first two fields
> from lsmod.

We may also try to store the output from lsmod and /proc/modules to
shell variables. Something as:

a=$(awk '{print $1, $2, $3}' /proc/modules |sort)
b=$(lsmod | awk '!/Module/{print $1, $2, $3}' |sort)

Then compare $a and $b.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list