From 65fe95f61b24e3103775670fca623a34ff4f92fa Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Wed, 8 Dec 2010 22:17:53 +0300 Subject: [PATCH] b=24239 use SAMPLE_FILE instead of termcap i=Vitaly.Fertman --- lustre/tests/lfsck.sh | 5 ++++- lustre/tests/recovery-small.sh | 4 ++-- lustre/tests/sanityn.sh | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lustre/tests/lfsck.sh b/lustre/tests/lfsck.sh index 866c1e9..53a2ca0 100644 --- a/lustre/tests/lfsck.sh +++ b/lustre/tests/lfsck.sh @@ -27,6 +27,9 @@ check_and_setup_lustre assert_DIR +SAMPLE_FILE=$TMP/$(basename $0 .sh).junk +dd if=/dev/urandom of=$SAMPLE_FILE bs=1M count=1 + # Create some dirs and files on the filesystem. create_files_sub() { local test_dir=$1 @@ -62,7 +65,7 @@ create_files() { # create files to be modified for f in $(seq -f $test_dir/testfile.%g $((num_files * 3))); do echo "creating $f" - cp /etc/termcap $f || error "cp /etc/termcap $f failed" + cp $SAMPLE_FILE $f || error "cp $SAMPLE_FILE $f failed" done # create some more files diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index a439a01..cb75978 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -221,7 +221,7 @@ test_17() { # OST bulk will time out here, client retries do_facet ost1 lctl set_param fail_loc=0x80000503 # need to ensure we send an RPC - do_facet client cp /etc/termcap $DIR/$tfile + do_facet client cp $SAMPLE_FILE $DIR/$tfile sync # with AT, client will wait adaptive_max*factor+net_latency before @@ -231,7 +231,7 @@ test_17() { do_facet ost1 lctl set_param fail_loc=0 do_facet client "df $DIR" # expect cmp to succeed, client resent bulk - do_facet client "cmp /etc/termcap $DIR/$tfile" || return 3 + do_facet client "cmp $SAMPLE_FILE $DIR/$tfile" || return 3 do_facet client "rm $DIR/$tfile" || return 4 [ $at_max_saved -ne 0 ] && at_max_set $at_max_saved ost1 return 0 diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 7ecfa9d..6f5236f 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -61,6 +61,9 @@ OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd` assert_DIR rm -rf $DIR1/[df][0-9]* $DIR1/lnk +SAMPLE_FILE=$TMP/$(basename $0 .sh).junk +dd if=/dev/urandom of=$SAMPLE_FILE bs=1M count=1 + # $RUNAS_ID may get set incorrectly somewhere else [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!" @@ -338,7 +341,7 @@ test_17() { # bug 3513, 3667 remote_ost_nodsh && skip "remote OST with nodsh" && return lfs setstripe $DIR1/$tfile -i 0 -c 1 - cp /etc/termcap $DIR1/$tfile + cp $SAMPLE_FILE $DIR1/$tfile cancel_lru_locks osc > /dev/null #define OBD_FAIL_ONCE|OBD_FAIL_LDLM_CREATE_RESOURCE 0x30a do_facet ost1 lctl set_param fail_loc=0x8000030a -- 1.8.3.1