Hi! > >>> This is quite fragile, if anything has added a line into dmesg while the > >>> test was running it will fail. Better approach would be to save the > >>> dmesg output into a file and grep it for the rcutorture resutl. > >> Why copy it to a file? I'm thinking about changing to this command, it > >> will return the last test result. > >> > >> result_str=`dmesg | sed -nE '$s/.*End of test: ([A-Z]+):.*/\1/p'` > > I was just thinking how to make the race window as small as possible. In > > order to do that I would save the output right after the test has > > finished etc. > > > > But it's quite unlikely that the whole kernel log buffer will be filled > > with messages meanwhile. > > > Got it, so I will save it to a file, then parse the file with sed, OK?
Giving it second though piping it to sed directly is also acceptable. The kernel log buffer is not that small and the code will be a bit less complicated. -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
