On 03/13/2014 10:00 PM, [email protected] wrote:
> Hi!
>> +
>> +    tst_require_root
>> +
>> +    EXT4_SUPPORT1=`grep -w ext4 /proc/filesystems | cut -f2`
>> +    EXT4_SUPPORT2=`grep -w ext4 /proc/modules | cut -f1`
> Hmm, that would not work when ext4 is compiled in kernel. I have ext4 in
> /proc/filesystems/ but not in /proc/modules/

EXT4_SUPPORT1=`grep -w ext4 /proc/filesystems | cut -f2`
EXT4_SUPPORT2=`grep -w ext4 /proc/modules | cut -f1`
if [ "$EXT4_SUPPORT1" != "ext4" ] && [ "$EXT4_SUPPORT2" != "ext4" ];then
    tst_brkm TCONF ignored "Ext4 is not supported"
    exit 0
fi

If you have ext4 compiled in kernel, EXT4_SUPPORT1's value  will be "ext4", so
the "tst_brkm TCONF ignored..." statement won't be executed.

But that would not work when ext4 is not compiled in kernel :-)
In this case, EXT4_SUPPORT1 will be none. And if there is no ext4 file system 
currently
mounted, the EXT4_SUPPORT2 will also be none.
Indeed  the ext4 module maybe exist in /lib/modules/`uname -r`, so
using modprobe would be better, thanks.

modprobe rcutorture > /dev/null 2>&1
if [ $? -ne 0 ]; then
    tst_brkm TCONF ignored "Ext4 is not supported"
fi

Wang
>
> Othewise it looks good. And sorry for the late review.
>


------------------------------------------------------------------------------
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

Reply via email to