X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-atomic.c;h=21d8c9e117dbc0c11944ff2eb06a981cf29afdd5;hb=05d299e0ccca80736cd4438c3224540c5448a7d4;hp=27bf5520e95acfd059a153556a04ddb8cdab9bb3;hpb=d3b528838ba3df2d3ea07be3275bf3212c92b0be;p=sliver-openvswitch.git diff --git a/tests/test-atomic.c b/tests/test-atomic.c index 27bf5520e..21d8c9e11 100644 --- a/tests/test-atomic.c +++ b/tests/test-atomic.c @@ -22,7 +22,7 @@ #define TEST_ATOMIC_TYPE(ATOMIC_TYPE, BASE_TYPE) \ { \ ATOMIC_TYPE x = ATOMIC_VAR_INIT(1); \ - BASE_TYPE value, orig; \ + BASE_TYPE value; \ \ atomic_read(&x, &value); \ ovs_assert(value == 1); \ @@ -34,31 +34,6 @@ atomic_init(&x, 3); \ atomic_read(&x, &value); \ ovs_assert(value == 3); \ - \ - atomic_add(&x, 1, &orig); \ - ovs_assert(orig == 3); \ - atomic_read(&x, &value); \ - ovs_assert(value == 4); \ - \ - atomic_sub(&x, 2, &orig); \ - ovs_assert(orig == 4); \ - atomic_read(&x, &value); \ - ovs_assert(value == 2); \ - \ - atomic_or(&x, 6, &orig); \ - ovs_assert(orig == 2); \ - atomic_read(&x, &value); \ - ovs_assert(value == 6); \ - \ - atomic_and(&x, 10, &orig); \ - ovs_assert(orig == 6); \ - atomic_read(&x, &value); \ - ovs_assert(value == 2); \ - \ - atomic_xor(&x, 10, &orig); \ - ovs_assert(orig == 2); \ - atomic_read(&x, &value); \ - ovs_assert(value == 8); \ } int