X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-atomic.c;h=b1a5d9da4642f0b9f2ef1f8f8acf3969db380dfd;hb=a4fdb0f3bdbfff1924afefd19239260ed429c193;hp=e6df1cd8307d6d4ec6ba0764b3e61613f3ca928e;hpb=22eb07cd9b1200678d25ca4ffe43fd3b670cc42e;p=sliver-openvswitch.git diff --git a/tests/test-atomic.c b/tests/test-atomic.c index e6df1cd83..b1a5d9da4 100644 --- a/tests/test-atomic.c +++ b/tests/test-atomic.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Nicira, Inc. + * Copyright (c) 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. @@ -18,6 +18,7 @@ #include "ovs-atomic.h" #include "util.h" +#include "ovstest.h" #define TEST_ATOMIC_TYPE(ATOMIC_TYPE, BASE_TYPE) \ { \ @@ -71,8 +72,9 @@ test_atomic_flag(void) ovs_assert(atomic_flag_test_and_set(&flag) == false); } -int -main(void) + +static void +test_atomic_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) { TEST_ATOMIC_TYPE(atomic_char, char); TEST_ATOMIC_TYPE(atomic_uchar, unsigned char); @@ -101,6 +103,6 @@ main(void) TEST_ATOMIC_TYPE(atomic_int64_t, int64_t); test_atomic_flag(); - - return 0; } + +OVSTEST_REGISTER("test-atomic", test_atomic_main);