echo
# backup files
- echo backup files to $TMP/files
+ echo backup files to $TMP/$tdir
local files=$(find $DIR/$tdir -type f -newer $TMP/modified_first)
- copy_files_xattrs $(hostname) $TMP/files $TMP/file_xattrs $files ||
+ copy_files_xattrs $(hostname) $TMP/$tdir $TMP/file_xattrs $files ||
error "Unable to copy files"
umount_client $MOUNT || error "Unable to umount client"
error "Some entry under /lost+found should be repaired"
# compare files
- diff_files_xattrs $(hostname) $TMP/files $TMP/file_xattrs $files ||
+ diff_files_xattrs $(hostname) $TMP/$tdir $TMP/file_xattrs $files ||
error "Unable to diff files"
- rm -rf $TMP/files $TMP/file_xattrs ||
+ rm -rf $TMP/$tdir $TMP/file_xattrs ||
error "Unable to delete temporary files"
do_node $ost1node "rm -rf $ost1tmp" ||
error "Unable to delete temporary files"
set -e
ONLY=${ONLY:-"$*"}
-# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 5188
-ALWAYS_EXCEPT=" 42a 42b 42c 42d 45 51d 68b $SANITY_EXCEPT"
+# bug number for skipped test: 13297 2108 9789 3637 9789 3561 5188
+ALWAYS_EXCEPT=" 42a 42b 42c 42d 45 68b $SANITY_EXCEPT"
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
# with LOD/OSP landing
skip_env "skipping test with few OSTs" && return
test_mkdir -p $DIR/$tdir
createmany -o $DIR/$tdir/t- 1000
- $GETSTRIPE $DIR/$tdir > $TMP/files
+ $GETSTRIPE $DIR/$tdir > $TMP/$tfile
for N in $(seq 0 $((OSTCOUNT - 1))); do
OBJS[$N]=$(awk -vobjs=0 '($1 == '$N') { objs += 1 } \
- END { printf("%0.0f", objs) }' $TMP/files)
- OBJS0[$N]=$(grep -A 1 idx $TMP/files | awk -vobjs=0 \
+ END { printf("%0.0f", objs) }' $TMP/$tfile)
+ OBJS0[$N]=$(grep -A 1 idx $TMP/$tfile | awk -vobjs=0 \
'($1 == '$N') { objs += 1 } \
END { printf("%0.0f", objs) }')
log "OST$N has ${OBJS[$N]} objects, ${OBJS0[$N]} are index 0"
" (${OBJS0[$N]} < ${OBJS0[$NLAST]}"
NLAST=$N
done
+ rm -f $TMP/$tfile
}
-run_test 51d "check object distribution ===================="
+run_test 51d "check object distribution"
test_51e() {
if [ "$(facet_fstype $SINGLEMDS)" != ldiskfs ]; then
lsattr $DIR/$tdir/foo | egrep -q "^-+a[-e]+ $DIR/$tdir/foo" ||
error "lsattr"
chattr -a $DIR/$tdir/foo || error "chattr -a failed"
- cp -r $DIR/$tdir /tmp/
- rm -fr $DIR/$tdir || error "cleanup rm failed"
+ cp -r $DIR/$tdir $TMP/
+ rm -fr $DIR/$tdir $TMP/$tdir || error "cleanup rm failed"
}
-run_test 52a "append-only flag test (should return errors) ====="
+run_test 52a "append-only flag test (should return errors)"
test_52b() {
[ -f $DIR/$tdir/foo ] && chattr -i $DIR/$tdir/foo
esac
done < $TMP/${tfile}.tmp
- #check that we actually got some stats
- [ "$read_bytes" ] || error "Missing read_bytes stats"
- [ "$write_bytes" ] || error "Missing write_bytes stats"
- [ "$read_bytes" != 0 ] || error "no read done"
- [ "$write_bytes" != 0 ] || error "no write done"
+ #check that we actually got some stats
+ [ "$read_bytes" ] || error "Missing read_bytes stats"
+ [ "$write_bytes" ] || error "Missing write_bytes stats"
+ [ "$read_bytes" != 0 ] || error "no read done"
+ [ "$write_bytes" != 0 ] || error "no write done"
+
+ rm -f $TMP/${tfile}.tmp
}
run_test 127b "verify the llite client stats are sane"
EOF
result=$(grep error $TMP/$tfile.log)
- rm -f $DIR/$tfile
- [ -z "$result" ] || error "consecutive find's under interactive lfs failed"
+ rm -f $DIR/$tfile $TMP/$tfile.log
+ [ -z "$result" ] ||
+ error "consecutive find's under interactive lfs failed"
}
run_test 128 "interactive lfs for 2 consecutive find's"
rm -f $DIR/f
restore_lustre_params < $save
+ rm -f $save
}
run_test 154f "get parent fids by reading link ea"
$CC -Wall -Werror $extra_flags -llustreapi -o $out $prog ||
error "client api broken"
done
+ rm -f $out
}
run_test 400a "Lustre client api program can compile and link"
$CC -Wall -Werror -include $header -c -x c /dev/null -o $out ||
error "cannot compile '$header'"
done
+ rm -f $out
}
run_test 400b "packaged headers can be compiled"