MantisBT - libnslog
View Issue Details
0002736libnslog[All Projects] Generalpublic2020-01-23 06:492020-02-21 10:58
Assigned ToDaniel Silverstone 
PlatformLinuxOSGuix SystemOS Versionguix 9448d0e
Summary0002736: libnslog tests fail with latest check version 0.13
DescriptionRunning tests from libnslog version 0.1.2 that were linked against most recent check version 0.13 produces the following failures:

Running suite(s): Test suite for libnslog
 libnslog: Basic tests
70%: Checks: 24, Failures: 7, Errors: 0
test/basictests.c:86:F:Simple log checks, no filters:test_nslog_trivial_corked_message:0: Captured message wasn't correct function name
test/basictests.c:112:F:Simple log checks, no filters:test_nslog_trivial_uncorked_message:0: Captured message wasn't correct function name
test/basictests.c:153:F:Simple log checks, no filters:test_nslog_two_corked_messages:0: Captured message wasn't correct function name
test/basictests.c:226:F:Simple filter checks:test_nslog_simple_filter_corked_message:0: Captured message wasn't correct function name
test/basictests.c:253:F:Simple filter checks:test_nslog_simple_filter_uncorked_message:0: Captured message wasn't correct function name
test/basictests.c:280:F:Simple filter checks:test_nslog_simple_filter_subcategory_message:0: Captured message wasn't correct function name
test/basictests.c:534:F:Trivial, varied, filter checks:test_nslog_filter_funcname:0: Captured message count was wrong

The failures in question attempt to check the function name logged by libnslog against the expected test case function name. In check 0.13 however, the implementation of the "START_TEST" macro was changed in such a way that the testcase functions have a "_fn" suffix. That is, the actual function name of the test should maybe be treated as an implementation detail.
Steps To Reproduce1. Build libnslog against check version 0.13.
2. Run test_testrunner "basic" tests
Additional InformationWorkaround in GNU Guix package is currently to build with the older check 0.12 package:
TagsNo tags attached.
Attached Files

Daniel Silverstone   
2020-02-21 10:58   
Thanks, I've fixed the test suites to cope with both variants of check by using the `__func__` macro appropriately instead.

Issue History
2020-01-23 06:49bavierNew Issue
2020-02-21 10:01Daniel SilverstoneProjectNetSurf => libnslog
2020-02-21 10:01Daniel SilverstoneCategoryDevelopment => General
2020-02-21 10:07Daniel SilverstoneAssigned To => Daniel Silverstone
2020-02-21 10:07Daniel SilverstoneStatusnew => assigned
2020-02-21 10:58Daniel SilverstoneStatusassigned => resolved
2020-02-21 10:58Daniel SilverstoneResolutionopen => fixed
2020-02-21 10:58Daniel SilverstoneNote Added: 0002170