r19034: merge from samba4:
authorStefan Metzmacher <metze@samba.org>
Mon, 2 Oct 2006 10:37:17 +0000 (10:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:15:04 +0000 (12:15 -0500)
prepare libreplace testsuite for usage in smbtorture

metze

source/lib/replace/test/testsuite.c

index 6644fce6bd4c766d08570f7a3b65fc89859c6514..fa5265f66f085bbe70230aa9e6b3b68f6bd7be99 100644 (file)
@@ -89,7 +89,7 @@ static int test_strlcpy(void)
        char buf[4];
        const struct {
                const char *src;
-               int result;
+               size_t result;
        } tests[] = {
                { "abc", 3 },
                { "abcdef", 6 },
@@ -373,9 +373,11 @@ static int test_MAX(void)
        return true;
 }
 
-int torture_local_replace(void *ctx)
+struct torture_context;
+
+bool torture_local_replace(struct torture_context *torture)
 {
-       int ret = true;
+       bool ret = true;
        ret &= test_ftruncate();
        ret &= test_strlcpy();
        ret &= test_strlcat();
@@ -423,7 +425,7 @@ int torture_local_replace(void *ctx)
        return ret;
 }
 
-#if !defined(_SAMBA_BUILD_) || ((SAMBA_VERSION_MAJOR==3)&&(SAMBA_VERSION_MINOR<9))
+#if _SAMBA_BUILD_<4
 int main(void)
 {
        if (!torture_local_replace(NULL)) {