test32root

来自「Non-Networked File System在几个非网络的(或慢网络的)U」· 代码 · 共 134 行

TXT
134
字号
#!/bin/sh# export NOX11=" "if [ `id -nu` != root ]	then	echo "This script must be run by root"	su -c "cd `pwd` ; $0"	exit	fi. ./init_teststop() {    if [ "" != "$1" ]	then	ls -ls $H/A	ls -ls $H/B	df $H/A	df $H/B	read N <number	N=`expr $N - 1`	# vi TMP/$N	fi    ./loop umount TMP/A $H/A    ./loop umount TMP/B $H/B    rm -r $H $M TMP/* >/dev/null 2>&1    make clean 2>/dev/null >&2    if [ "" != "$1" ]	then	Exit $1	fi}echo "*** Write on full filesystem"if ./loop mount TMP/A $H/A >TMP/loopA.log 2>&1    then    :    else    echo "Not possible to run this test, to run it you must have a loop device"    Exit 0    fi./loop mount TMP/B $H/B >TMP/loopB.log 2>&1init_rc# cat $H/B/.nnfs/nnfsrcecho 'CONFIRMATION="yes"' >>$H/A/.nnfs/nnfsrccp -p  $H/A/.nnfs/nnfsrc $H/B/.nnfs/nnfsrcrunA -f $H/ArunB -a $H/B# Take all the space on A with files not copied on BI=0while truedo    if dd bs=1024 count=50 </dev/zero >$H/A/${I}~    then    :    else    break    fi    I=`expr $I + 1`done 2>/dev/null >&2if [ ! -f $H/A/3~ ]    then    echo "In the 'loop' script, use a bigger file device (dd count arg)"    stop 1    firunArunB# Create a file on Bcp $H/A/1~ $H/B/filerunByes | runAif [ -f $H/A/file ]    then    stop 2    firm $H/A/1~runAif [ -f $H/A/file ]    then    stop 3    firunBrunAif [ ! -f $H/A/file ]    then    stop 4    ficp $H/A/2~ $H/B/file2runB( sleep 2 ; rm $H/A/[234]~ ; while true ; do echo c ; done ) | runAif [ ! -f $H/A/file2 ]    then    stop 5    fiN=`cat number`N=`expr $N - 1`if [ `fgrep -c "Hit RETURN when problem is corrected" <TMP/${N}.` -ne 1 ]    then    stop 6    fistopExit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?