Optimization #4066
closedAdd a PASS_IF_NULL macro to the FAIL/PASS API
Description
src/util-unittests.h contains a few macro definitions that are being used in the new tests. There is PASS, PASS_IF for the success paths. Add a `PASS_IF_NULL` macro. Its function should be as the name suggests. It should pass if the value provided to it is NULL.
Updated by Janani Ramjee about 4 years ago
- Subject changed from Add a FAIL_IF_NULL macro to the FAIL/PASS API to Add a PASS_IF_NULL macro to the FAIL/PASS API
- Assignee changed from Community Ticket to Janani Ramjee
Updated by Juliana Fajardini Reichow about 3 years ago
- Related to Optimization #4795: Remove PASS_IF macro from the FAIL/PASS API added
Updated by Juliana Fajardini Reichow about 3 years ago
This idea was discontinued after some further discussion (see https://github.com/OISF/suricata/pull/5485).
One of the reasons is that having PASS_IF macros could end up breaking the guideline of having PASS to be the last
thing called in a unit tests (as the PASS_IF macros could end up implicitly calling FAIL, internally).
The other is because it requires reverting the logic of the FAIL calls in order to be written, therefore making the process
more convoluted.
Updated by Juliana Fajardini Reichow almost 3 years ago
- Status changed from In Review to Closed
Commit https://github.com/OISF/suricata/pull/6582/commits/d581fc82b18219d9c5bef8f0e0c0c42545c7b054, merged in https://github.com/OISF/suricata/pull/6582, removed the PASS_IF macro, as per the decision shared in the related issue.
Closing this one, then...