Author: idra Date: 2006-11-02 22:02:37 +0000 (Thu, 02 Nov 2006) New Revision: 19536
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19536 Log: Make output understandable (newlines) Modified: branches/SAMBA_4_0/source/torture/local/dbspeed.c Changeset: Modified: branches/SAMBA_4_0/source/torture/local/dbspeed.c =================================================================== --- branches/SAMBA_4_0/source/torture/local/dbspeed.c 2006-11-02 21:41:50 UTC (rev 19535) +++ branches/SAMBA_4_0/source/torture/local/dbspeed.c 2006-11-02 22:02:37 UTC (rev 19536) @@ -58,33 +58,33 @@ unlink("test.tdb"); - torture_comment(torture, "Testing tdb speed for sidmap"); + torture_comment(torture, "Testing tdb speed for sidmap\n"); tdbw = tdb_wrap_open(tmp_ctx, "test.tdb", 10000, 0, O_RDWR|O_CREAT|O_TRUNC, 0600); if (!tdbw) { - torture_fail(torture, "Failed to open test.tdb"); + torture_fail(torture, "Failed to open test.tdb\n"); goto failed; } - torture_comment(torture, "Adding %d SID records", torture_entries); + torture_comment(torture, "Adding %d SID records\n", torture_entries); for (i=0;i<torture_entries;i++) { if (!tdb_add_record(tdbw, "S-1-5-21-53173311-3623041448-2049097239-%u", "UID %u", i)) { - torture_result(torture, TORTURE_FAIL, "Failed to add SID %d", i); + torture_result(torture, TORTURE_FAIL, "Failed to add SID %d\n", i); goto failed; } if (!tdb_add_record(tdbw, "UID %u", "S-1-5-21-53173311-3623041448-2049097239-%u", i)) { - torture_result(torture, TORTURE_FAIL, "Failed to add UID %d", i); + torture_result(torture, TORTURE_FAIL, "Failed to add UID %d\n", i); goto failed; } } - torture_comment(torture, "Testing for %d seconds", timelimit); + torture_comment(torture, "Testing for %d seconds\n", timelimit); tv = timeval_current(); @@ -95,7 +95,7 @@ key.dsize = strlen((char *)key.dptr)+1; data = tdb_fetch(tdbw->tdb, key); if (data.dptr == NULL) { - torture_result(torture, TORTURE_FAIL, "Failed to fetch SID %d", i); + torture_result(torture, TORTURE_FAIL, "Failed to fetch SID %d\n", i); goto failed; } free(data.dptr); @@ -103,13 +103,13 @@ key.dsize = strlen((char *)key.dptr)+1; data = tdb_fetch(tdbw->tdb, key); if (data.dptr == NULL) { - torture_result(torture, TORTURE_FAIL, "Failed to fetch UID %d", i); + torture_result(torture, TORTURE_FAIL, "Failed to fetch UID %d\n", i); goto failed; } free(data.dptr); } - torture_comment(torture, "tdb speed %.2f ops/sec", count/timeval_elapsed(&tv)); + torture_comment(torture, "tdb speed %.2f ops/sec\n", count/timeval_elapsed(&tv)); unlink("test.tdb"); @@ -167,12 +167,12 @@ unlink("./test.ldb"); - torture_comment(torture, "Testing ldb speed for sidmap"); + torture_comment(torture, "Testing ldb speed for sidmap\n"); ldb = ldb_wrap_connect(tmp_ctx, "tdb://test.ldb", NULL, NULL, LDB_FLG_NOSYNC, NULL); if (!ldb) { - torture_fail(torture, "Failed to open test.ldb"); + torture_fail(torture, "Failed to open test.ldb\n"); goto failed; } @@ -182,21 +182,21 @@ if (ldb_add(ldb, ldif->msg) != LDB_SUCCESS) goto failed; talloc_free(ldif); - torture_comment(torture, "Adding %d SID records", torture_entries); + torture_comment(torture, "Adding %d SID records\n", torture_entries); for (i=0;i<torture_entries;i++) { if (!ldb_add_record(ldb, i)) { - torture_result(torture, TORTURE_FAIL, "Failed to add SID %d", i); + torture_result(torture, TORTURE_FAIL, "Failed to add SID %d\n", i); goto failed; } } if (talloc_total_blocks(torture) > 100) { - torture_result(torture, TORTURE_FAIL, "memory leak in ldb add"); + torture_result(torture, TORTURE_FAIL, "memory leak in ldb add\n"); goto failed; } - torture_comment(torture, "Testing for %d seconds", timelimit); + torture_comment(torture, "Testing for %d seconds\n", timelimit); tv = timeval_current(); @@ -211,7 +211,7 @@ if (ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res) != LDB_SUCCESS || res->count != 1) { torture_fail(torture, talloc_asprintf(torture, - "Failed to find SID %d", i)); + "Failed to find SID %d\n", i)); } talloc_free(res); talloc_free(dn); @@ -219,18 +219,18 @@ if (ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res) != LDB_SUCCESS || res->count != 1) { torture_fail(torture, talloc_asprintf(torture, - "Failed to find UID %d", i)); + "Failed to find UID %d\n", i)); } talloc_free(res); talloc_free(expr); } if (talloc_total_blocks(torture) > 100) { - torture_fail(torture, "memory leak in ldb search"); + torture_fail(torture, "memory leak in ldb search\n"); goto failed; } - torture_comment(torture, "ldb speed %.2f ops/sec", count/timeval_elapsed(&tv)); + torture_comment(torture, "ldb speed %.2f ops/sec\n", count/timeval_elapsed(&tv)); unlink("./test.ldb");