debian/tmp/usr/lib/lustre/tests/* usr/lib/lustre/tests
debian/tmp/usr/bin/mcreate usr/bin
-debian/tmp/usr/bin/munlink usr/bin
debian/tmp/usr/bin/statx usr/bin
debian/tmp/usr/sbin/wire* usr/sbin
rm -rf debian/$(UTILS_PKG)/usr/bin/iokit-* \
debian/$(UTILS_PKG)/usr/bin/*-survey \
debian/$(UTILS_PKG)/usr/bin/mcreate \
- debian/$(UTILS_PKG)/usr/bin/munlink \
debian/$(UTILS_PKG)/usr/bin/statx \
debian/$(UTILS_PKG)/usr/sbin/wirecheck \
debian/$(UTILS_PKG)/usr/sbin/wiretest
echo '%dir %{_libdir}/lustre/tests' >>lustre-tests.files
echo '%{_libdir}/lustre/tests/*' >>lustre-tests.files
echo '%{_bindir}/mcreate' >>lustre-tests.files
-echo '%{_bindir}/munlink' >>lustre-tests.files
echo '%{_bindir}/statx' >>lustre-tests.files
echo '%{_sbindir}/wirecheck' >>lustre-tests.files
echo '%{_sbindir}/wiretest' >>lustre-tests.files
/mrename
/multifstat
/multiop
-/munlink
/newfile
/o_directory
/open_delay
SUBDIRS += lutf
endif # BUILD_LUTF
-bin_PROGRAMS = mcreate munlink statx
+bin_PROGRAMS = mcreate statx
testdir = $(libdir)/lustre/tests
test_SCRIPTS = $(noinst_SCRIPTS)
test_PROGRAMS = $(THETESTS)
+++ /dev/null
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int main(int argc, char **argv)
-{
- int rc = 0, i;
-
- if (argc < 2) {
- printf("Usage %s filename {filename ...}\n", argv[0]);
- return 1;
- }
-
- for (i = 1; i < argc; i++) {
- rc = unlink(argv[i]);
- if (rc) {
- printf("unlink(%s): %s ", argv[i], strerror(errno));
- rc = access(argv[i], F_OK);
- if (rc && errno == ENOENT)
- printf("(unlinked anyways)\n");
- else if (rc == 0)
- printf("(still exists)\n");
- else
- printf("(%s looking up)\n", strerror(errno));
- }
- }
- return rc;
-}
local LINK1=$DIR/$tfile.link1
local LINK2=$DIR/$tfile.link2
- do_facet_create_file client $T 10K ||
- error_noexit "Create file $T"
-
- drop_request "mlink $T $LINK1" ||
- error_noexit "mlink request for $T"
-
- drop_reint_reply "mlink $T $LINK2" ||
- error_noexit "mlink reply for $T"
-
- drop_request "munlink $LINK1" ||
- error_noexit "munlink request for $T"
-
- drop_reint_reply "munlink $LINK2" ||
- error_noexit "munlink reply for $T"
-
- do_facet client "rm $T" ||
- error_noexit "Can't remove file $T"
+ do_facet_create_file client $T 10K || error_noexit "Create file $T"
+ drop_request "mlink $T $LINK1" || error_noexit "mlink request for $T"
+ drop_reint_reply "mlink $T $LINK2" || error_noexit "mlink reply for $T"
+ drop_request "unlink $LINK1" || error_noexit "unlink request for $T"
+ drop_reint_reply "unlink $LINK2" || error_noexit "unlink reply for $T"
+ do_facet client "rm $T" || error_noexit "Can't remove file $T"
}
run_test 6 "link, unlink: drop req, drop rep"
drop_bl_callback_once $MULTIOP $DIR/$tfile Ow ||
echo "evicted as expected"
- do_facet client munlink $DIR/$tfile ||
- { error "munlink failed: $?"; return 4; }
+ do_facet client unlink $DIR/$tfile ||
+ { error "unlink failed: $?"; return 4; }
# allow recovery to complete
client_up || client_up || sleep $TIMEOUT
}
kill -USR1 $PID
echo "waiting for multiop $PID"
wait $PID || { error "wait for multiop faile: $?"; return 2; }
- do_facet client munlink $DIR/$tfile ||
- { error "client munlink failed: $?"; return 3; }
+ do_facet client unlink $DIR/$tfile ||
+ { error "client unlink failed: $?"; return 3; }
# allow recovery to complete
client_up || client_up || sleep $TIMEOUT
}
error "failed to ldlm_cancel: $?"
umount_client $DIR2 || error "failed to unmount $DIR2: $?"
- do_facet client munlink $DIR/$tfile ||
+ do_facet client unlink $DIR/$tfile ||
error "failed to unlink $DIR/$tfile: $?"
# let the client reconnect
test_10() {
mcreate $MOUNT1/$tfile-1
replay_barrier $SINGLEMDS
- munlink $MOUNT1/$tfile-1
+ unlink $MOUNT1/$tfile-1
mcreate $MOUNT2/$tfile-2
# drop first reint reply
do_facet $SINGLEMDS lctl set_param fail_loc=0x80000119
test_16() {
replay_barrier $SINGLEMDS
mcreate $DIR/$tfile
- munlink $DIR/$tfile
+ unlink $DIR/$tfile
mcreate $DIR/$tfile-2
fail $SINGLEMDS
[ -e $DIR/$tfile ] && error "file $DIR/$tfile should not exist"
[ -e $DIR/$tfile-2 ] || error "file $DIR/$tfile-2 does not exist"
- munlink $DIR/$tfile-2 || error "munlink $DIR/$tfile-2 failed"
+ unlink $DIR/$tfile-2 || error "unlink $DIR/$tfile-2 failed"
}
run_test 16 "|X| open(O_CREAT), unlink, touch new, unlink new"
[ -e $DIR/$tfile-2 ] || error "file $DIR/$tfile-2 does not exist"
# this touch frequently fails
touch $DIR/$tfile-3 || error "touch $DIR/$tfile-3 failed"
- munlink $DIR/$tfile-2 || error "munlink $DIR/$tfile-2 failed"
- munlink $DIR/$tfile-3 || error "munlink $DIR/$tfile-3 failed"
+ unlink $DIR/$tfile-2 || error "unlink $DIR/$tfile-2 failed"
+ unlink $DIR/$tfile-3 || error "unlink $DIR/$tfile-3 failed"
return 0
}
run_test 18 "open(O_CREAT), unlink, touch new, close, touch, unlink"
OPENFILE=${OPENFILE:-openfile}
OPENUNLINK=${OPENUNLINK:-openunlink}
READS=${READS:-"reads"}
-MUNLINK=${MUNLINK:-munlink}
SOCKETSERVER=${SOCKETSERVER:-socketserver}
SOCKETCLIENT=${SOCKETCLIENT:-socketclient}
MEMHOG=${MEMHOG:-memhog}
local tempfile=$(mktemp $1_XXXXXX)
mlink $tempfile $1 2> /dev/null &&
echo "$BASHPID: link $tempfile to $1 succeeded"
- munlink $tempfile
+ unlink $tempfile
}
test_31o() { # LU-2901
sync
dd if=/dev/zero of=$DIR/f42b bs=1024 count=100
BEFOREWRITES=$(count_ost_writes)
- $MUNLINK $DIR/f42b || error "$MUNLINK $DIR/f42b: $?"
+ unlink $DIR/f42b || error "unlink $DIR/f42b: $?"
AFTERWRITES=$(count_ost_writes)
if [[ $BEFOREWRITES -lt $AFTERWRITES ]]; then
error "$BEFOREWRITES < $AFTERWRITES on unlink"
error "$SOCKETSERVER $DIR/socket failed: $?"
LANG=C $SOCKETCLIENT $DIR/socket ||
error "$SOCKETCLIENT $DIR/socket failed: $?"
- $MUNLINK $DIR/socket || error "$MUNLINK $DIR/socket failed: $?"
+ unlink $DIR/socket || error "unlink $DIR/socket failed: $?"
}
run_test 54a "unix domain socket test =========================="