[MXS-382] Regular asserts should not be used in test programs. Created: 2015-09-25  Updated: 2015-11-11  Resolved: 2015-11-11

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.2.0, 1.2.1, 1.3.0
Fix Version/s: 1.3.0

Type: Task Priority: Major
Reporter: Johan Wikman Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None


 Description   

The test programs in server/core/test use ss_info_assert for testing that results are what they are expected to be.

Since ss_info_assert is compiled out in release mode, they don't test anything in that case and also cause compile time warnings (about variables being unused).

There should be en equivalent macro, say MD_CHECK or MD_VERIFY that are always active.



 Comments   
Comment by Johan Wikman [ 2015-11-10 ]

As a quick workaround, the following was added to the beginning of all files:

// To ensure that ss_info_assert asserts also when builing in non-debug mode.
#if !defined(SS_DEBUG)
#define SS_DEBUG
#endif
#if defined(NDEBUG)
#undef NDEBUG
#endif

Generated at Thu Feb 08 03:58:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.