X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-hindex.c;h=4c4fdf2a6b2caf38d69a37527ed8af242dda1908;hb=003ce655b7116d18c86a74c50391e54990346931;hp=f0a8b93352f61935688041f63908148dc8dd5875;hpb=30cc7d2969aa5397328a49a7d85196a4afdc7f8b;p=sliver-openvswitch.git diff --git a/tests/test-hindex.c b/tests/test-hindex.c index f0a8b9335..4c4fdf2a6 100644 --- a/tests/test-hindex.c +++ b/tests/test-hindex.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2013 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ #include "hash.h" #include "random.h" #include "util.h" +#include "ovstest.h" #undef NDEBUG #include @@ -137,7 +138,7 @@ print_hindex(const char *name, struct hindex *hindex) printf("%s:", name); HINDEX_FOR_EACH (e, node, hindex) { - printf(" %d(%zu)", e->value, e->node.hash & hindex->mask); + printf(" %d(%"PRIuSIZE")", e->value, e->node.hash & hindex->mask); } printf("\n"); } @@ -315,13 +316,13 @@ run_test(void (*function)(hash_func *)) } } -int -main(void) +static void +test_hindex_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) { run_test(test_hindex_insert_delete); run_test(test_hindex_for_each_safe); run_test(test_hindex_reserve_shrink); printf("\n"); - return 0; } +OVSTEST_REGISTER("test-hindex", test_hindex_main);