}
run_test 27g "$LFS getstripe with no objects"
+test_27ga() {
+ test_mkdir $DIR/$tdir
+ touch $DIR/$tdir/$tfile || error "touch failed"
+ ln -s bogus $DIR/$tdir/$tfile.2 || error "ln failed"
+ $LFS getstripe -m $DIR/$tdir/$tfile $DIR/$tdir/$tfile.2
+ local rc=$?
+ (( rc == 2 )) || error "getstripe did not return ENOENT"
+}
+run_test 27ga "$LFS getstripe with missing file (should return error)"
+
test_27i() {
test_mkdir $DIR/$tdir
touch $DIR/$tdir/$tfile || error "touch failed"
test_27m() {
[[ $OSTCOUNT -lt 2 ]] && skip_env "needs >= 2 OSTs"
+ [ -n "$RCLIENTS" -o -n "$MOUNT_2" ] &&
+ skip_env "multiple clients -- skipping"
+
ORIGFREE=$($LCTL get_param -n lov.$FSNAME-clilov-*.kbytesavail |
head -n1)
if [[ $ORIGFREE -gt $MAXFREE ]]; then
cp -p $(which sleep) $DIR/$tdir/sleep || error "can't copy"
$DIR/$tdir/sleep 60 &
SLEEP_PID=$!
+ # Make sure exec of $tdir/sleep wins race with truncate
+ sleep 1
$MULTIOP $DIR/$tdir/sleep Oc && error "expected error, got success"
kill $SLEEP_PID
}
cp -p $(which sleep) $DIR/$tdir/sleep || error "can't copy"
$DIR/$tdir/sleep 60 &
SLEEP_PID=$!
+ # Make sure exec of $tdir/sleep wins race with truncate
+ sleep 1
$TRUNCATE $DIR/$tdir/sleep 0 && error "expected error, got success"
kill $SLEEP_PID
}
run_test 61a "mmap() writes don't make sync hang ================"
test_61b() {
- mmap_mknod_test $tfile || error "mmap_mknod_test failed"
+ mmap_mknod_test $DIR/$tfile || error "mmap_mknod_test failed"
}
run_test 61b "mmap() of unstriped file is successful"