postgresql/src/test
Andres Freund 73709f1c1e Fix and improve pg_atomic_flag fallback implementation.
The atomics fallback implementation for pg_atomic_flag was broken,
returning the inverted value from pg_atomic_test_set_flag().  This was
unnoticed because a) atomic flags were unused until recently b) the
test code wasn't run when the fallback implementation was in
use (because it didn't allow to test for some edge cases).

Fix the bug, and improve the fallback so it has the same behaviour as
the non-fallback implementation in the problematic edge cases. That
breaks ABI compatibility in the back branches when fallbacks are in
use, but given they were broken until now...

Author: Andres Freund
Reported-by: Daniel Gustafsson
Discussion:
    https://postgr.es/m/FB948276-7B32-4B77-83E6-D00167F8EEB4@yesql.se
    https://postgr.es/m/20180406233854.uni2h3mbnveczl32@alap3.anarazel.de
Backpatch: 9.5-, where the atomics abstraction was introduced.
2018-04-06 20:02:12 -07:00
..
examples Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
isolation Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
locale Add a temp-install prerequisite to "check"-like targets not having one. 2017-11-05 18:54:52 -08:00
mb Revert "Fix broken multibyte regression tests." 2016-01-26 09:00:33 +09:00
modules test_ddl_deparse: rename matview 2018-03-15 15:21:32 -03:00
perl Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
regress Fix and improve pg_atomic_flag fallback implementation. 2018-04-06 20:02:12 -07:00
ssl In SSL tests, don't scribble on permissions of a repo file. 2017-05-15 23:27:51 -04:00
thread Fix up .gitignore and cleanup actions in some src/test/ subdirectories. 2015-04-24 17:13:06 -04:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00