apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r563183 - in /apr/apr-util/trunk/test: Makefile.in Makefile.win abts_tests.h testdbm.c testutil.h
Date Mon, 06 Aug 2007 16:26:51 GMT
Author: davi
Date: Mon Aug  6 09:26:49 2007
New Revision: 563183

URL: http://svn.apache.org/viewvc?view=rev&rev=563183
Log:
Remove previous testdbm and add a new one that opens room for further tests.

Modified:
    apr/apr-util/trunk/test/Makefile.in
    apr/apr-util/trunk/test/Makefile.win
    apr/apr-util/trunk/test/abts_tests.h
    apr/apr-util/trunk/test/testdbm.c
    apr/apr-util/trunk/test/testutil.h

Modified: apr/apr-util/trunk/test/Makefile.in
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/Makefile.in?view=diff&rev=563183&r1=563182&r2=563183
==============================================================================
--- apr/apr-util/trunk/test/Makefile.in (original)
+++ apr/apr-util/trunk/test/Makefile.in Mon Aug  6 09:26:49 2007
@@ -2,7 +2,7 @@
 
 INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
 
-PROGRAMS = testall testdbm dbd testssl echod sockperf
+PROGRAMS = testall dbd testssl echod sockperf
 TARGETS = $(PROGRAMS)
 
 APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@
@@ -29,11 +29,6 @@
 		fi; \
 	done
 
-testdbm_OBJECTS = testdbm.lo
-testdbm_LDADD =  $(TARGET_LIB_PATH)
-testdbm: $(testdbm_OBJECTS) $(testdbm_LDADD)
-	$(LINK_PROG) $(APRUTIL_LDFLAGS) $(testdbm_OBJECTS) $(testdbm_LDADD) $(PROGRAM_DEPENDENCIES)
-
 dbd_OBJECTS = dbd.lo
 dbd_LDADD =  $(TARGET_LIB_PATH)
 dbd: $(dbd_OBJECTS) $(dbd_LDADD)
@@ -64,7 +59,7 @@
 testall_OBJECTS = teststrmatch.lo testuri.lo testuuid.lo abts.lo testutil.lo \
 	testbuckets.lo testpass.lo testmd4.lo testmd5.lo testldap.lo \
 	testdate.lo testdbd.lo testmemcache.lo testreslist.lo testqueue.lo \
-	testxml.lo testxlate.lo testrmm.lo
+	testxml.lo testxlate.lo testrmm.lo testdbm.lo
 testall_LDADD =  $(TARGET_LIB_PATH)
 testall: $(testall_OBJECTS) $(testall_LDADD)
 	$(LINK_PROG) $(APRUTIL_LDFLAGS) $(testall_OBJECTS) $(testall_LDADD) $(PROGRAM_DEPENDENCIES)

Modified: apr/apr-util/trunk/test/Makefile.win
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/Makefile.win?view=diff&rev=563183&r1=563182&r2=563183
==============================================================================
--- apr/apr-util/trunk/test/Makefile.win (original)
+++ apr/apr-util/trunk/test/Makefile.win Mon Aug  6 09:26:49 2007
@@ -105,7 +105,6 @@
 
 
 ##!ALL_TARGETS = 	$(OUTPUT_DIR)\testdate.exe \
-##!		$(OUTPUT_DIR)\testdbm.exe \
 ##!		$(OUTPUT_DIR)\testmd4.exe \
 ##!		$(OUTPUT_DIR)\testmd5.exe \
 ##!		$(OUTPUT_DIR)\testqueue.exe \
@@ -113,8 +112,7 @@
 ##!		$(OUTPUT_DIR)\testuri.exe \
 ##!		$(OUTPUT_DIR)\testuuid.exe
 
-ALL_TARGETS = 	$(OUTPUT_DIR)\testdbm.exe \
-		$(OUTPUT_DIR)\testqueue.exe \
+ALL_TARGETS = 	$(OUTPUT_DIR)\testqueue.exe \
 		$(OUTPUT_DIR)\testmd4.exe \
 		$(OUTPUT_DIR)\testmd5.exe
                 

Modified: apr/apr-util/trunk/test/abts_tests.h
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/abts_tests.h?view=diff&rev=563183&r1=563182&r2=563183
==============================================================================
--- apr/apr-util/trunk/test/abts_tests.h (original)
+++ apr/apr-util/trunk/test/abts_tests.h Mon Aug  6 09:26:49 2007
@@ -38,7 +38,8 @@
     {testqueue},
     {testxml},
     {testxlate},
-    {testrmm}
+    {testrmm},
+    {testdbm}
 };
 
 #endif /* APR_TEST_INCLUDES */

Modified: apr/apr-util/trunk/test/testdbm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testdbm.c?view=diff&rev=563183&r1=563182&r2=563183
==============================================================================
--- apr/apr-util/trunk/test/testdbm.c (original)
+++ apr/apr-util/trunk/test/testdbm.c Mon Aug  6 09:26:49 2007
@@ -13,413 +13,209 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* This file came from the SDBM package (written by oz@nexus.yorku.ca).
- * That package was under public domain. This file has been ported to
- * APR, updated to ANSI C and other, newer idioms, and added to the Apache
- * codebase under the above copyright and license.
- */
-
-/*
- * testdbm: Simple APR dbm tester.
- * Automatic test case: ./testdbm auto foo
- *  - Attempts to store and fetch values from the DBM.
- *
- * Run the program for more help.
- */
 
 #include "apr.h"
 #include "apr_general.h"
 #include "apr_pools.h"
 #include "apr_errno.h"
-#include "apr_getopt.h"
-#include "apr_time.h"
-#define APR_WANT_STRFUNC
-#include "apr_want.h"
-
-#if APR_HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if APR_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h>     /* for atexit(), malloc() */
-#include <string.h>
-
 #include "apr_dbm.h"
+#include "apr_uuid.h"
+#include "apr_strings.h"
+#include "abts.h"
+#include "testutil.h"
 
-static const char *progname;
-static int rflag;
-
-#define DERROR      0
-#define DLOOK       1
-
-#define DDELETE     3
-#define DCAT        4
-#define DBUILD      5
-#define DPRESS      6
-#define DCREAT      7
-#define DNAME       8
-#define DTRUNC      9
-#define DAUTO      10
-
-#define LINEMAX     8192
+#define NUM_TABLE_ROWS  1024
 
 typedef struct {
-    const char *sname;
-    int scode;
-    int flags;
-} cmd;
-
-static const cmd cmds[] = {
-
-    { "fetch",   DLOOK,   APR_DBM_READONLY },
-    { "get",     DLOOK,   APR_DBM_READONLY },
-    { "look",    DLOOK,   APR_DBM_READONLY },
-    { "add",     DBUILD,  APR_DBM_READWRITE },
-    { "insert",  DBUILD,  APR_DBM_READWRITE },
-    { "store",   DBUILD,  APR_DBM_READWRITE },
-    { "delete",  DDELETE, APR_DBM_READWRITE },
-    { "remove",  DDELETE, APR_DBM_READWRITE },
-    { "dump",    DCAT,    APR_DBM_READONLY },
-    { "list",    DCAT,    APR_DBM_READONLY },
-    { "cat",     DCAT,    APR_DBM_READONLY },
-    { "build",   DBUILD,  APR_DBM_RWCREATE },    /** this one creates the DB */
-    { "creat",   DCREAT,  APR_DBM_RWCREATE },
-    { "trunc",   DTRUNC,  APR_DBM_RWTRUNC },
-    { "new",     DCREAT,  APR_DBM_RWCREATE },
-    { "names",   DNAME,   APR_DBM_READONLY },
-#if 0
-    {"squash",   DPRESS,  APR_DBM_READWRITE, },
-    {"compact",  DPRESS,  APR_DBM_READWRITE, },
-    {"compress", DPRESS,  APR_DBM_READWRITE, },
-#endif
-    { "auto",    DAUTO,   APR_DBM_RWCREATE },
-};
-
-#define CMD_SIZE (sizeof(cmds)/sizeof(cmd))
+    apr_datum_t key;
+    apr_datum_t val;
+    int deleted;
+    int visited;
+} dbm_table_t;
+
+static dbm_table_t *generate_table(void)
+{
+    unsigned int i;
+    apr_uuid_t uuid;
+    dbm_table_t *table = apr_pcalloc(p, sizeof(*table) * NUM_TABLE_ROWS);
+
+    for (i = 0; i < NUM_TABLE_ROWS/2; i++) {
+        apr_uuid_get(&uuid);
+        table[i].key.dptr = apr_pmemdup(p, uuid.data, sizeof(uuid.data));
+        table[i].key.dsize = sizeof(uuid.data);
+        table[i].val.dptr = apr_palloc(p, APR_UUID_FORMATTED_LENGTH);
+        table[i].val.dsize = APR_UUID_FORMATTED_LENGTH;
+        apr_uuid_format(table[i].val.dptr, &uuid);
+    }
+
+    for (; i < NUM_TABLE_ROWS; i++) {
+        apr_uuid_get(&uuid);
+        table[i].val.dptr = apr_pmemdup(p, uuid.data, sizeof(uuid.data));
+        table[i].val.dsize = sizeof(uuid.data);
+        table[i].key.dptr = apr_palloc(p, APR_UUID_FORMATTED_LENGTH);
+        table[i].key.dsize = APR_UUID_FORMATTED_LENGTH;
+        apr_uuid_format(table[i].key.dptr, &uuid);
+    }
 
-static void doit(const cmd *act, const char*type, const char *file, apr_pool_t *pool);
-static const cmd *parse_command(const char *str);
-static void prdatum(FILE *stream, apr_datum_t d);
-static void oops(apr_dbm_t *dbm, apr_status_t rv, const char *s1,
-                 const char *s2);
-static void show_usage(void);
+    return table;
+}
 
-int main(int argc, const char * const * argv)
+static void test_dbm_store(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
 {
-    apr_pool_t *pool;
-    const cmd *act;
-    apr_getopt_t *os;
-    char optch;
-    const char *optarg;
-    const char*dbtype;
-
-    (void) apr_initialize();
-    apr_pool_create(&pool, NULL);
-    atexit(apr_terminate);
-
-    (void) apr_getopt_init(&os, pool, argc, argv);
-
-    progname = argv[0];
-    dbtype = "default";
-
-    while (apr_getopt(os, "Rt:", &optch, &optarg) == APR_SUCCESS) {
-        switch (optch) {
-        case 'R':       /* raw processing  */
-            rflag++;
-            break;
-        case 't':
-            dbtype = optarg;
-            break;
-        default:
-            show_usage();
-            fputs("unknown option.",stderr);
-            exit(-1);
-            break;
-        }
-    }
-
-    if (argc <= os->ind) {
-        show_usage();
-        fputs("Note: If you have no clue what this program is, start with:\n", stderr);
-        fputs("      ./testdbm auto foo\n", stderr);
-        fputs("      where foo is the DBM prefix.\n", stderr);
-        exit(-2);
-    }
+    apr_status_t rv;
+    unsigned int i = NUM_TABLE_ROWS - 1;
 
-    if ((act = parse_command(argv[os->ind])) == NULL) {
-        show_usage();
-        fprintf(stderr, "unrecognized command: %s\n", argv[os->ind]);
-        exit(-3);
+    for (; i >= NUM_TABLE_ROWS/2; i--) {
+        rv = apr_dbm_store(db, table[i].key, table[i].val);
+        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        table[i].deleted = FALSE;
     }
 
-    if (++os->ind >= argc) {
-        show_usage();
-        fputs("please supply a DB file to use (may be created)\n", stderr);
-        exit(-4);
+    for (i = 0; i < NUM_TABLE_ROWS/2; i++) {
+        rv = apr_dbm_store(db, table[i].key, table[i].val);
+        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        table[i].deleted = FALSE;
     }
-
-    doit(act, dbtype, argv[os->ind], pool);
-
-    apr_pool_destroy(pool);
-
-    return 0;
 }
 
-static void doit(const cmd *act, const char*type, const char *file, 
-                 apr_pool_t *pool)
+static void test_dbm_fetch(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
 {
     apr_status_t rv;
-    apr_datum_t key;
+    unsigned int i;
     apr_datum_t val;
-    apr_dbm_t *db;
-    char *op;
-    int n;
-    char *line;
-    const char *use1;
-    const char *use2;
-#ifdef TIME
-    long start;
-    extern long time();
-#endif
 
-    rv = apr_dbm_open_ex(&db, type, file, act->flags, APR_OS_DEFAULT, pool);
-    if (rv != APR_SUCCESS)
-        oops(db, rv, "cannot open: %s", file);
-
-    line = (char *) apr_palloc(pool,LINEMAX);
-
-    switch (act->scode) {
-
-    case DLOOK:
-        while (fgets(line, LINEMAX, stdin) != NULL) {
-            n = strlen(line) - 1;
-            line[n] = 0;
-            if (n == 0)
-                break;
-
-            key.dptr = line;
-            key.dsize = n;
-            rv = apr_dbm_fetch(db, key, &val);
-            if (rv == APR_SUCCESS) {
-                prdatum(stdout, val);
-                putchar('\n');
-                continue;
-            }
-            prdatum(stderr, key);
-            fprintf(stderr, ": not found.\n");
+    for (i = 0; i < NUM_TABLE_ROWS; i++) {
+        memset(&val, 0, sizeof(val));
+        rv = apr_dbm_fetch(db, table[i].key, &val);
+        if (!table[i].deleted) {
+            ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+            ABTS_INT_EQUAL(tc, table[i].val.dsize, val.dsize);
+            ABTS_INT_EQUAL(tc, 0, memcmp(table[i].val.dptr, val.dptr, val.dsize));
+            apr_dbm_freedatum(db, val);
+        } else {
+            ABTS_INT_EQUAL(tc, 0, val.dsize);
         }
-        break;
-
-    case DDELETE:
-        while (fgets(line, LINEMAX, stdin) != NULL) {
-            n = strlen(line) - 1;
-            line[n] = 0;
-            if (n == 0)
-                break;
-
-            key.dptr = line;
-            key.dsize = n;
-            if (apr_dbm_delete(db, key) != APR_SUCCESS) {
-                prdatum(stderr, key);
-                fprintf(stderr, ": not found.\n");
-            }
-        }
-        break;
-    case DCAT:
-        rv = apr_dbm_firstkey(db, &key);
-        if (rv != APR_SUCCESS)
-            oops(db, rv, "could not fetch first key: %s", file);
-
-        while (key.dptr != NULL) {
-            prdatum(stdout, key);
-            putchar('\t');
-            rv = apr_dbm_fetch(db, key, &val);
-            if (rv != APR_SUCCESS)
-                oops(db, rv, "apr_dbm_fetch", "failure");
-            prdatum(stdout, val);
-            putchar('\n');
-            rv = apr_dbm_nextkey(db, &key);
-            if (rv != APR_SUCCESS)
-                oops(db, rv, "NextKey", "failure");
-        }
-        break;
-    case DBUILD:
-#ifdef TIME
-        start = time(0);
-#endif
-        while (fgets(line, LINEMAX, stdin) != NULL) {
-            n = strlen(line) - 1;
-            line[n] = 0;
-            if (n == 0)
-                break;
-
-            key.dptr = line;
-            if ((op = strchr(line, '\t')) != 0) {
-                key.dsize = op - line;
-                *op++ = 0;
-                val.dptr = op;
-                val.dsize = line + n - op;
-            }
-            else
-                oops(NULL, APR_EGENERAL, "bad input: %s", line);
-
-            rv = apr_dbm_store(db, key, val);
-            if (rv != APR_SUCCESS) {
-                prdatum(stderr, key);
-                fprintf(stderr, ": ");
-                oops(db, rv, "store: %s", "failed");
-            }
-        }
-#ifdef TIME
-        printf("done: %d seconds.\n", time(0) - start);
-#endif
-        break;
-    case DPRESS:
-        break;
-    case DCREAT:
-        break;
-    case DTRUNC:
-        break;
-    case DNAME:
-        apr_dbm_get_usednames_ex(pool, type, file, &use1, &use2);
-        fprintf(stderr, "%s %s\n", use1, use2);
-        break;
-    case DAUTO:
-        {
-            int i;
-            char *valdata = "0123456789";
-            fprintf(stderr, "Generating data: ");
-            for (i = 0; i < 10; i++) {
-                int j;
-                char c, keydata[10];
-                for (j = 0, c = 'A' + (i % 16); j < 10; j++, c++) {
-                    keydata[j] = c;
-                }
-                key.dptr = keydata;
-                key.dsize = 10;
-                val.dptr = valdata;
-                val.dsize = 10;
-                rv = apr_dbm_store(db, key, val);
-                if (rv != APR_SUCCESS) {
-                    prdatum(stderr, key);
-                    fprintf(stderr, ": ");
-                    oops(db, rv, "store: %s", "failed");
-                }
-            }
-            fputs("OK\n", stderr);
-            fputs("Testing existence/retrieval: ", stderr);
-            for (i = 0; i < 10; i++) {
-                int j;
-                char c, keydata[10];
-                for (j = 0, c = 'A' + (i % 16); j < 10; j++, c++) {
-                    keydata[j] = c;
-                }
-                key.dptr = keydata;
-                key.dsize = 10;
-                if (!apr_dbm_exists(db, key)) {
-                    prdatum(stderr, key);
-                    oops(db, 0, "exists: %s", "failed");
-                }
-                rv = apr_dbm_fetch(db, key, &val);
-                if (rv != APR_SUCCESS || val.dsize != 10 ||
-                    (strncmp(val.dptr, valdata, 10) != 0) ) { 
-                    prdatum(stderr, key);
-                    fprintf(stderr, ": ");
-                    oops(db, rv, "fetch: %s", "failed");
-                }
-            }
-            fputs("OK\n", stderr);
-        }
-        break;
     }
-
-    apr_dbm_close(db);
 }
 
-static const cmd *parse_command(const char *str)
+static void test_dbm_delete(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
 {
-    int i;
-
-    for (i = 0; i < CMD_SIZE; i++)
-        if (strcasecmp(cmds[i].sname, str) == 0)
-            return &cmds[i];
+    apr_status_t rv;
+    unsigned int i;
 
-    return NULL;
+    for (i = 0; i < NUM_TABLE_ROWS; i++) {
+        /* XXX: random */
+        if (i & 1)
+            continue;
+        rv = apr_dbm_delete(db, table[i].key);
+        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+        table[i].deleted = TRUE;
+    }
 }
 
-static void prdatum(FILE *stream, apr_datum_t d)
+static void test_dbm_exists(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
 {
-    int c;
-    const char *p = d.dptr;
-    int n = d.dsize;
-
-    while (n--) {
-        c = *p++ & 0377;
-        if (c & 0200) {
-            fprintf(stream, "M-");
-            c &= 0177;
+    unsigned int i;
+    int cond;
+
+    for (i = 0; i < NUM_TABLE_ROWS; i++) {
+        cond = apr_dbm_exists(db, table[i].key);
+        if (table[i].deleted) {
+            ABTS_TRUE(tc, cond == 0);
+        } else {
+            ABTS_TRUE(tc, cond != 0);
         }
-        if (c == 0177 || c < ' ') 
-            fprintf(stream, "^%c", (c == 0177) ? '?' : c + '@');
-        else
-            putc(c, stream);
     }
 }
 
-static void oops(apr_dbm_t * dbm, apr_status_t rv, const char *s1,
-                 const char *s2)
+static void test_dbm_traversal(abts_case *tc, apr_dbm_t *db, dbm_table_t *table)
 {
-    char errbuf[200];
+    apr_status_t rv;
+    unsigned int i;
+    apr_datum_t key;
 
-    if (progname) {
-        fprintf(stderr, "%s: ", progname);
-    }
-    fprintf(stderr, s1, s2);
-    fprintf(stderr, "\n");
+    rv = apr_dbm_firstkey(db, &key);
+    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+    do {
+        if (key.dptr == NULL || key.dsize == 0)
+            break;
 
-    if (rv != APR_SUCCESS) {
-        apr_strerror(rv, errbuf, sizeof(errbuf));
-        fprintf(stderr, "APR Error %d - %s\n", rv, errbuf);
-
-        if (dbm) {
-            apr_dbm_geterror(dbm, &rv, errbuf, sizeof(errbuf));
-            fprintf(stderr, "APR_DB Error %d - %s\n", rv, errbuf);
+        for (i = 0; i < NUM_TABLE_ROWS; i++) {
+            if (table[i].key.dsize != key.dsize)
+                continue;
+            if (memcmp(table[i].key.dptr, key.dptr, key.dsize))
+                continue;
+            ABTS_INT_EQUAL(tc, table[i].deleted, 0);
+            ABTS_INT_EQUAL(tc, table[i].visited, 0);
+            table[i].visited++;
         }
+
+        rv = apr_dbm_nextkey(db, &key);
+        ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+    } while (1);
+
+    for (i = 0; i < NUM_TABLE_ROWS; i++) {
+        if (table[i].deleted)
+            continue;
+        ABTS_INT_EQUAL(tc, table[i].visited, 1);
+        table[i].visited = 0;
     }
-    exit(1);
 }
 
-static void show_usage(void)
+static void test_dbm(abts_case *tc, void *data)
 {
-    int i;
+    apr_dbm_t *db;
+    apr_status_t rv;
+    dbm_table_t *table;
+    const char *type = data;
+    const char *file = apr_pstrcat(p, "data/test-", type, NULL);
 
-    if (!progname) {
-        progname = "testdbm";
-    }
+    rv = apr_dbm_open_ex(&db, type, file, APR_DBM_RWCREATE, APR_OS_DEFAULT, p);
+    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+    if (rv != APR_SUCCESS)
+        return;
+
+    table = generate_table();
 
-    fprintf(stderr, "%s [-t DBM-type] [-R] [commands] dbm-file-path\n", 
-            progname);
+    test_dbm_store(tc, db, table);
+    test_dbm_fetch(tc, db, table);
+    test_dbm_delete(tc, db, table);
+    test_dbm_exists(tc, db, table);
+    test_dbm_traversal(tc, db, table);
+
+    apr_dbm_close(db);
+
+    rv = apr_dbm_open_ex(&db, type, file, APR_DBM_READONLY, APR_OS_DEFAULT, p);
+    ABTS_INT_EQUAL(tc, rv, APR_SUCCESS);
+
+    if (rv != APR_SUCCESS)
+        return;
+
+    test_dbm_exists(tc, db, table);
+    test_dbm_traversal(tc, db, table);
+    test_dbm_fetch(tc, db, table);
+
+    apr_dbm_close(db);
+}
+
+abts_suite *testdbm(abts_suite *suite)
+{
+    suite = ADD_SUITE(suite);
 
-    fputs("Available DBM-types:", stderr);
 #if APU_HAVE_GDBM
-    fputs(" GDBM", stderr);
+    abts_run_test(suite, test_dbm, "gdbm");
 #endif
 #if APU_HAVE_NDBM
-    fputs(" NDBM", stderr);
+    abts_run_test(suite, test_dbm, "ndbm");
 #endif
 #if APU_HAVE_SDBM
-    fputs(" SDBM", stderr);
+    abts_run_test(suite, test_dbm, "sdbm");
 #endif
 #if APU_HAVE_DB
-    fputs(" DB", stderr);
+    abts_run_test(suite, test_dbm, "db");
 #endif
-    fputs(" default\n", stderr);
 
-    fputs("Available commands:\n", stderr);
-    for (i = 0; i < CMD_SIZE; i++) {
-        fprintf(stderr, "%-8s%c", cmds[i].sname,
-                ((i + 1) % 6 == 0) ? '\n' : ' ');
-    }
-    fputs("\n", stderr);
+    return suite;
 }

Modified: apr/apr-util/trunk/test/testutil.h
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testutil.h?view=diff&rev=563183&r1=563182&r2=563183
==============================================================================
--- apr/apr-util/trunk/test/testutil.h (original)
+++ apr/apr-util/trunk/test/testutil.h Mon Aug  6 09:26:49 2007
@@ -59,5 +59,6 @@
 abts_suite *testxml(abts_suite *suite);
 abts_suite *testxlate(abts_suite *suite);
 abts_suite *testrmm(abts_suite *suite);
+abts_suite *testdbm(abts_suite *suite);
 
 #endif /* APR_TEST_INCLUDES */



Mime
View raw message