1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00
pgbackrest/test
David Steele bb7e1724a9 Update String, Buffer, and Variant constants to work with cast-qual.
These three objects can be created as constants at compile time using specialized macros. Unfortunately since the values assigned are also const, cast-qual complained about the cost qualifier being lost.

Fix this by creating new structures to be used just for creating these constants. This is not ideal due to the need to keep the duplicated structures in sync, but in practice these structures are almost never modified. Testing should catch any out of sync structures and this feature is valuable enough to keep even though in theory there could be memory safety issues. In practice the APIs prevent const objects from being used in an unsafe way and testing provides a fair assurance of safety. Writing to these consts would be a fatal error even if it did not cause a segfault.

Ideally, we would be able to use warning suppression in these macros to avoid the extra struct, but due to the way they are used it is not possible to add the required pragmas (even using _Pragma).

Finally this construction makes it obvious that something special is being done, rather than it being under the covers.
2024-10-28 13:21:35 +02:00
..
certificate Support IP-based SANs for TLS certificate validation. 2024-07-11 10:54:20 +07:00
code-count Remove support for PostgreSQL 9.4. 2024-10-21 13:56:04 +03:00
data Remove test data files made obsolete by d41b21c8. 2024-03-30 10:43:05 +11:00
lib/pgBackRestTest/Common Remove support for PostgreSQL 9.4. 2024-10-21 13:56:04 +03:00
src Update String, Buffer, and Variant constants to work with cast-qual. 2024-10-28 13:21:35 +02:00
.gitignore
ci.pl Migrate CentOS 7 integration tests to Rocky 8. 2024-06-11 15:20:04 +10:00
container.yaml Update CI containers to include newest PostgreSQL patch releases. 2024-10-16 12:14:12 +03:00
define.yaml Improve SFTP error messages. 2024-10-10 11:17:35 +03:00
Dockerfile Migrate coverage testing to C and remove dependency on lcov. 2024-05-31 14:52:07 +10:00
test.pl Remove autoconf/make build. 2024-10-21 13:32:35 +03:00
uncrustify.cfg
Vagrantfile Migrate coverage testing to C and remove dependency on lcov. 2024-05-31 14:52:07 +10:00