lkml.org 
[lkml]   [2004]   [Jan]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 15 Jan 2004 15:38:59 +0900
FromTsuchiya Yoshihiro <>
SubjectRe: filesystem bug?
Hi,
I tried ramdisk again with more running process, and the script failed very
early just like Mr Dlion reported previously. It is about 20 minutes on 
my machines.

1. The script use nvi-1.79 tar ball
2. Prepare 64MB ramdisk, and mkfs on it.
3. edit the first three lines and run the script below(its name is xc-1.2)
4. wait half an hour and see the result will be in /tmp/xcresult

Thanks,
Yoshi
--------------------------------
#!/bin/bash
TARGETPREFIX=/mnt/foo   # filesystem that will be tested
#MOZSRC=/home/tsuchiya/src/mozilla-source-1.3.tar.gz    # tgz used for test
MOZSRC=/home/tsuchiya/src/nvi-1.79.tar.gz       # tgz used for test
RDIR="/tmp/xcresult"    # result directory
#SOURCE=mozilla
SOURCE=nvi-1.79

ERRORF=$RDIR/ERROR
INOFILE=$RDIR/INOF

touch $ERRORF

function _xtract+compare {
        echo "extracting directory to be compared against for $1"
        TARGETDIR=$TARGETPREFIX/$1
        mkdir -p $TARGETDIR
        cd $TARGETDIR
        tar zxf $MOZSRC
        echo "$1 done .... now the job is started."
# new
#       touch $INOFILE
        pwd >> $INOFILE-$1
        ls -lid $SOURCE >> $INOFILE-$1
        RESULTS=$RDIR/$1
        echo "test result will be stored under $RESULTS"
        mkdir -p $RESULTS;
#       echo "test dir is $TARGETDIR";
        mkdir -p $TARGETDIR;

        for ((i=0; i < 100000; i++))    # ext2/3 limit 32000
        do
                cd $TARGETDIR
                mkdir $TARGETDIR/dirXC$i
                cd $TARGETDIR/dirXC$i > $RDIR/CD-ERR-$1 2>&1
                if [ -s $RDIR/CD-ERR-$1 ]
                then
                        echo "something wrong happened at $1:$i-th trial "
                        df > $RDIR/DF-$1
                        exit;
                fi
                tar zxf $MOZSRC >> $ERRORF

#                echo "test dir for $TARGETDIR" >> $INOFILE-$1
                ls -lid $SOURCE >> $INOFILE-$1

                diff -rq $TARGETDIR/$SOURCE $TARGETDIR/dirXC$i/$SOURCE > 
$RESULT
S/dirXC$i.result 2>&1
                DIFFSIZE=`ls -l $RESULTS/dirXC$i.result | awk '{print $5}'`
                if [ $DIFFSIZE != 0 ];
                then
                        echo "something wrong happened at $1:$i-th trial "
                        df > $RDIR/DF-$1
                        exit;
                else
                        rm $RESULTS/dirXC$i.result
                        echo "test $1:$i-th passed"
                fi
                cd ..
                rm -rf $TARGETDIR/dirXC$i &
        done
}
for target in aa ab ac ad ae af #ag ah ai aj ak al am an
do
        _xtract+compare $target $RDIR &
done

--
Yoshihiro Tsuchiya



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [from the cache]
©2003-2008