Skip to content

Instantly share code, notes, and snippets.

@Ironlenny
Created October 21, 2016 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ironlenny/0965fae8b3bba1c5505140ca6a3d76dd to your computer and use it in GitHub Desktop.
Save Ironlenny/0965fae8b3bba1c5505140ca6a3d76dd to your computer and use it in GitHub Desktop.
The test driver
#include <tap.h>
#include "../../nasfs_driver/meta_db.h"
#include <stdbool.h>
#include <lmdb.h>
#include <sys/stat.h>
const char db_file[] = "./meta_db";
MDB_env *env = NULL;
MDB_dbi *dbi = NULL;
int result = 0;
int main()
{
plan(NO_PLAN);
mkdir(db_file, 0777);
// result = meta_open(db_file, 0, false, &env, dbi);
result = meta_open(db_file, 0, false, &env, dbi);
cmp_ok(result , "==", 0, "Create db file");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment