summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-02 08:56:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:30 -0500
commit37806f79cd612ab390e277ae4b1afac86413e979 (patch)
treee5b13f2462a802c8df98ad45bf05d21cded876a9 /source4/lib/replace
parent1344f235461f5713194af1fce6526d673f2c7e92 (diff)
downloadsamba-37806f79cd612ab390e277ae4b1afac86413e979.tar.gz
samba-37806f79cd612ab390e277ae4b1afac86413e979.tar.bz2
samba-37806f79cd612ab390e277ae4b1afac86413e979.zip
r19029: test if opendir() on a file sets errno = ENOTDIR
metze (This used to be commit 6b5f06b059583f9d685d71d48299ab334581c179)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/test/os2_delete.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/lib/replace/test/os2_delete.c b/source4/lib/replace/test/os2_delete.c
index d0aadb24ba..8501e0bb40 100644
--- a/source4/lib/replace/test/os2_delete.c
+++ b/source4/lib/replace/test/os2_delete.c
@@ -21,7 +21,7 @@
static int test_readdir_os2_delete_ret;
-#define FAILED(d) (fprintf(stderr, "Failed for %s - %s\n", d, strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
+#define FAILED(d) (fprintf(stderr, "Failed for %s - %d = %s\n", d, errno, strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
@@ -87,7 +87,11 @@ int test_readdir_os2_delete(void)
cleanup();
create_files();
-
+
+ d = opendir(TESTDIR "/test0.txt");
+ if (d != NULL) FAILED("opendir() on file succeed");
+ if (errno != ENOTDIR) FAILED("opendir() on file didn't give ENOTDIR");
+
d = opendir(TESTDIR);
/* skip past . and .. */