diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-10-02 09:21:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:03 -0500 |
commit | f0244fbffee59eeb75b069fd3a5ea6e5452afabb (patch) | |
tree | f9d60572c08da2d8c7eef3383bb96ad2991b2400 | |
parent | a831353be45db24528fc65b2fdc7510cded62d57 (diff) | |
download | samba-f0244fbffee59eeb75b069fd3a5ea6e5452afabb.tar.gz samba-f0244fbffee59eeb75b069fd3a5ea6e5452afabb.tar.bz2 samba-f0244fbffee59eeb75b069fd3a5ea6e5452afabb.zip |
r19031: merge from samba4:
add test that opendir() on files sets errno = ENOTDIR
metze
(This used to be commit fdad2ce7346678d29adf877b580e9285be286755)
-rw-r--r-- | source3/lib/replace/test/os2_delete.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/lib/replace/test/os2_delete.c b/source3/lib/replace/test/os2_delete.c index d0aadb24ba..8501e0bb40 100644 --- a/source3/lib/replace/test/os2_delete.c +++ b/source3/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 .. */ |