From fa78d768bd886c7f7e026d367008e47c0cca049a Mon Sep 17 00:00:00 2001 From: braam Date: Sun, 4 May 2003 05:04:44 +0000 Subject: [PATCH] - fixes to b_open - new UML patch 2.4.20-4 which works with Red Hat 9 - minor fixes to handling handles in open/close to avoid oopsing - fix erroneous mds_mfd_put in mds_open - fix the CVS tests added to sanity - the tests exposed more problem in this branch, probably related to the lack of a file handle cache. Only good parts of the branch will be merged. --- lustre/tests/fchdir_test.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lustre/tests/fchdir_test.c diff --git a/lustre/tests/fchdir_test.c b/lustre/tests/fchdir_test.c new file mode 100644 index 0000000..83c096e --- /dev/null +++ b/lustre/tests/fchdir_test.c @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include +#include +#include +#include + + +int main(int argc, char **argv) +{ + int fd; + int rc; + + fd = open(".", O_RDONLY); + if (fd < 0) { + perror("opening '.' :"); + exit(2); + } + + rc = chdir("/mnt/lustre/subdir/subdir"); + if (rc) { + perror("cannot chdir subdir:"); + exit(3); + } + + rc = fchdir(fd); + if (rc) { + perror("cannot fchdir back\n"); + exit(4); + } + + rc = close(fd); + if (rc) { + perror("cannot close '.'\n"); + exit(5); + } + + return(0); +} -- 1.8.3.1