summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-11-01 11:25:39 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-11-01 11:25:39 +0300
commit9b5c548da220b8ffb07661c5c8fe0bbbee894725 (patch)
tree2035f45bdb805e02ad4ce6de89b8edd53162c632
parent94960e4f4c0370b751ccb2855b8a27fece4b657e (diff)
downloadlibatomic_ops-9b5c548da220b8ffb07661c5c8fe0bbbee894725.tar.gz
Fix reporting about missing and/or/xor_dd_acquire_read (test_atomic)
AO_XSIZE_and/or/xor_dd_acquire_read are meaningless and not implemented, thus their absence is not reported in the tests. * tests/test_atomic_include.template [!AO_HAVE_orXX] (test_atomicXX): Do not call MISSING(AO_or) if all AO_HAVE_or* excluding AO_HAVE_or_dd_acquire_read are not defined. * tests/test_atomic_include.template [!AO_HAVE_xorXX] (test_atomicXX): Do not call MISSING(AO_xor) if all AO_HAVE_xor* excluding AO_HAVE_xor_dd_acquire_read are not defined. * tests/test_atomic_include.template [!AO_HAVE_andXX] (test_atomicXX): Do not call MISSING(AO_and) if all AO_HAVE_and* excluding AO_HAVE_and_dd_acquire_read are not defined.
-rw-r--r--tests/test_atomic_include.template21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/test_atomic_include.template b/tests/test_atomic_include.template
index 7db5879..fe88e19 100644
--- a/tests/test_atomic_include.template
+++ b/tests/test_atomic_include.template
@@ -234,21 +234,36 @@ void test_atomicXX(void)
AO_orXX(&x, 66);
TA_assert(x == 106);
# else
- MISSING(AO_or);
+# if !defined(AO_HAVE_or) || !defined(AO_HAVE_or_acquire) \
+ || !defined(AO_HAVE_or_acquire_read) || !defined(AO_HAVE_or_full) \
+ || !defined(AO_HAVE_or_read) || !defined(AO_HAVE_or_release) \
+ || !defined(AO_HAVE_or_release_write) || !defined(AO_HAVE_or_write)
+ MISSING(AO_or);
+# endif
x |= 66;
# endif
# if defined(AO_HAVE_xorXX)
AO_xorXX(&x, 181);
TA_assert(x == 223);
# else
- MISSING(AO_xor);
+# if !defined(AO_HAVE_xor) || !defined(AO_HAVE_xor_acquire) \
+ || !defined(AO_HAVE_xor_acquire_read) || !defined(AO_HAVE_xor_full) \
+ || !defined(AO_HAVE_xor_read) || !defined(AO_HAVE_xor_release) \
+ || !defined(AO_HAVE_xor_release_write) || !defined(AO_HAVE_xor_write)
+ MISSING(AO_xor);
+# endif
x ^= 181;
# endif
# if defined(AO_HAVE_andXX)
AO_andXX(&x, 57);
TA_assert(x == 25);
# else
- MISSING(AO_and);
+# if !defined(AO_HAVE_and) || !defined(AO_HAVE_and_acquire) \
+ || !defined(AO_HAVE_and_acquire_read) || !defined(AO_HAVE_and_full) \
+ || !defined(AO_HAVE_and_read) || !defined(AO_HAVE_and_release) \
+ || !defined(AO_HAVE_and_release_write) || !defined(AO_HAVE_and_write)
+ MISSING(AO_and);
+# endif
x &= 57;
# endif
# if defined(AO_HAVE_fetch_compare_and_swapXX)