LCOV - code coverage report
Current view: top level - lib/tdb/test - run-oldhash.c (source / functions) Hit Total Coverage
Test: coverage report for master 98b443d9 Lines: 18 18 100.0 %
Date: 2024-05-31 13:13:24 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "../common/tdb_private.h"
       2             : #include "../common/io.c"
       3             : #include "../common/tdb.c"
       4             : #include "../common/lock.c"
       5             : #include "../common/freelist.c"
       6             : #include "../common/traverse.c"
       7             : #include "../common/transaction.c"
       8             : #include "../common/error.c"
       9             : #include "../common/open.c"
      10             : #include "../common/check.c"
      11             : #include "../common/hash.c"
      12             : #include "../common/mutex.c"
      13             : #include "tap-interface.h"
      14             : #include <stdlib.h>
      15             : #include "logging.h"
      16             : 
      17           1 : int main(int argc, char *argv[])
      18             : {
      19             :         struct tdb_context *tdb;
      20             : 
      21             :         plan_tests(8);
      22             : 
      23             :         /* Old format (with zeroes in the hash magic fields) should
      24             :          * open with any hash (since we don't know what hash they used). */
      25           1 :         tdb = tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR, 0,
      26             :                           &taplogctx, NULL);
      27           1 :         ok1(tdb);
      28           1 :         ok1(tdb_check(tdb, NULL, NULL) == 0);
      29           1 :         tdb_close(tdb);
      30             : 
      31           1 :         tdb = tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR, 0,
      32             :                           &taplogctx, NULL);
      33           1 :         ok1(tdb);
      34           1 :         ok1(tdb_check(tdb, NULL, NULL) == 0);
      35           1 :         tdb_close(tdb);
      36             : 
      37           1 :         tdb = tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR, 0,
      38             :                           &taplogctx, tdb_jenkins_hash);
      39           1 :         ok1(tdb);
      40           1 :         ok1(tdb_check(tdb, NULL, NULL) == 0);
      41           1 :         tdb_close(tdb);
      42             : 
      43           1 :         tdb = tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR, 0,
      44             :                           &taplogctx, tdb_jenkins_hash);
      45           1 :         ok1(tdb);
      46           1 :         ok1(tdb_check(tdb, NULL, NULL) == 0);
      47           1 :         tdb_close(tdb);
      48             : 
      49           1 :         return exit_status();
      50             : }

Generated by: LCOV version 1.14