Whamcloud - gitweb
b=24239 use SAMPLE_FILE instead of termcap
authorElena Gryaznova <elena.gryaznova@oracle.com>
Wed, 8 Dec 2010 19:17:53 +0000 (22:17 +0300)
committerVitaly Fertman <vitaly.fertman@oracle.com>
Fri, 10 Dec 2010 23:57:10 +0000 (02:57 +0300)
i=Vitaly.Fertman

lustre/tests/lfsck.sh
lustre/tests/recovery-small.sh
lustre/tests/sanityn.sh

index 866c1e9..53a2ca0 100644 (file)
@@ -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
index a439a01..cb75978 100755 (executable)
@@ -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
index 7ecfa9d..6f5236f 100644 (file)
@@ -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