diff options
Diffstat (limited to 'source4/lib/replace/test')
-rw-r--r-- | source4/lib/replace/test/os2_delete.c | 10 | ||||
-rw-r--r-- | source4/lib/replace/test/testsuite.c | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/source4/lib/replace/test/os2_delete.c b/source4/lib/replace/test/os2_delete.c index 288e4a5d8f..c73b7e54cd 100644 --- a/source4/lib/replace/test/os2_delete.c +++ b/source4/lib/replace/test/os2_delete.c @@ -12,9 +12,6 @@ #include <errno.h> #include <string.h> #include <fcntl.h> -#ifdef REPLACE_READDIR -#include "lib/replace/repdir/repdir.h" -#endif #define NUM_FILES 700 #define READDIR_SIZE 100 @@ -22,7 +19,10 @@ #define TESTDIR "test.dir" -#define FAILED(d) (fprintf(stderr, "Failed for %s - %s\n", d, strerror(errno)), exit(1), 1) +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 CHECK do { if (test_readdir_os2_delete_ret != 0) return test_readdir_os2_delete_ret; } while (0) #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) @@ -78,7 +78,7 @@ static int os2_delete(DIR *d) return j; } -int main(void) +int test_readdir_os2_delete(void) { int total_deleted = 0; DIR *d; diff --git a/source4/lib/replace/test/testsuite.c b/source4/lib/replace/test/testsuite.c index 89d2ae6a88..6644fce6bd 100644 --- a/source4/lib/replace/test/testsuite.c +++ b/source4/lib/replace/test/testsuite.c @@ -229,8 +229,15 @@ static int test_opendir(void) return true; } -static int test_readdir(void) +extern int test_readdir_os2_delete(void); + +static bool test_readdir(void) { + printf("testing readdir\n"); + if (test_readdir_os2_delete() != 0) { + return false; + } + /* FIXME */ return true; } |