|
rpm-build |
ca8475 |
#include "../common/tdb_private.h"
|
|
rpm-build |
ca8475 |
#include "../common/io.c"
|
|
rpm-build |
ca8475 |
#include "../common/tdb.c"
|
|
rpm-build |
ca8475 |
#include "../common/lock.c"
|
|
rpm-build |
ca8475 |
#include "../common/freelist.c"
|
|
rpm-build |
ca8475 |
#include "../common/traverse.c"
|
|
rpm-build |
ca8475 |
#include "../common/transaction.c"
|
|
rpm-build |
ca8475 |
#include "../common/error.c"
|
|
rpm-build |
ca8475 |
#include "../common/open.c"
|
|
rpm-build |
ca8475 |
#include "../common/check.c"
|
|
rpm-build |
ca8475 |
#include "../common/hash.c"
|
|
rpm-build |
ca8475 |
#include "../common/mutex.c"
|
|
rpm-build |
ca8475 |
#include "tap-interface.h"
|
|
rpm-build |
ca8475 |
#include <stdlib.h>
|
|
rpm-build |
ca8475 |
#include "logging.h"
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
int main(int argc, char *argv[])
|
|
rpm-build |
ca8475 |
{
|
|
rpm-build |
ca8475 |
struct tdb_context *tdb;
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
plan_tests(8);
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
/* Old format (with zeroes in the hash magic fields) should
|
|
rpm-build |
ca8475 |
* open with any hash (since we don't know what hash they used). */
|
|
rpm-build |
ca8475 |
tdb = tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR, 0,
|
|
rpm-build |
ca8475 |
&taplogctx, NULL);
|
|
rpm-build |
ca8475 |
ok1(tdb);
|
|
rpm-build |
ca8475 |
ok1(tdb_check(tdb, NULL, NULL) == 0);
|
|
rpm-build |
ca8475 |
tdb_close(tdb);
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
tdb = tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR, 0,
|
|
rpm-build |
ca8475 |
&taplogctx, NULL);
|
|
rpm-build |
ca8475 |
ok1(tdb);
|
|
rpm-build |
ca8475 |
ok1(tdb_check(tdb, NULL, NULL) == 0);
|
|
rpm-build |
ca8475 |
tdb_close(tdb);
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
tdb = tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR, 0,
|
|
rpm-build |
ca8475 |
&taplogctx, tdb_jenkins_hash);
|
|
rpm-build |
ca8475 |
ok1(tdb);
|
|
rpm-build |
ca8475 |
ok1(tdb_check(tdb, NULL, NULL) == 0);
|
|
rpm-build |
ca8475 |
tdb_close(tdb);
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
tdb = tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR, 0,
|
|
rpm-build |
ca8475 |
&taplogctx, tdb_jenkins_hash);
|
|
rpm-build |
ca8475 |
ok1(tdb);
|
|
rpm-build |
ca8475 |
ok1(tdb_check(tdb, NULL, NULL) == 0);
|
|
rpm-build |
ca8475 |
tdb_close(tdb);
|
|
rpm-build |
ca8475 |
|
|
rpm-build |
ca8475 |
return exit_status();
|
|
rpm-build |
ca8475 |
}
|