Bug 248274 - devel/check: 0.15.1 regression in fail_*() macros since 0.15.0 breaks security/openvpn-auth-ldap build
Summary: devel/check: 0.15.1 regression in fail_*() macros since 0.15.0 breaks securit...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords: regression
Depends on:
Blocks: 248291
  Show dependency treegraph
 
Reported: 2020-07-26 08:16 UTC by Matthias Andree
Modified: 2020-08-13 07:31 UTC (History)
3 users (show)

See Also:
mandree: maintainer-feedback? (sunpoet)


Attachments
patch to revert check to v0.15.0 for now (828 bytes, patch)
2020-07-26 08:54 UTC, Matthias Andree
mandree: maintainer-approval? (sunpoet)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2020-07-26 08:16:48 UTC
With check 0.15.0, I could compile security/openvpn-auth-ldap just fine.

Since check 0.15.1, this has regressed and compilation fails in the test suite because the libcheck API got changed (possibly inadvertently).

This was also reported upstream.
https://github.com/libcheck/check/issues/293#issuecomment-663956834

TRLocalPacketFilterTests.m:62:5: error: too few arguments to function call, expected at least 4, have 3
    fail_if(pf == nil);
    ^~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:483:89: note: expanded from macro 'fail_if'
     _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__) \
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:70:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf tables: &tables] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:75:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless(strcmp([[tableIter nextObject] cString], "ips_artist") == 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:76:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless(strcmp([[tableIter nextObject] cString], "ips_developer") == 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:82:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf flushTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:94:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf flushTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:100:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addAddress: pfAddress toTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:101:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addressesFromTable: name withResult: &addresses] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:111:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addAddress: pfAddress toTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:112:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addressesFromTable: name withResult: &addresses] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:130:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf flushTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:136:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addAddress: pfAddress toTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:137:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addressesFromTable: name withResult: &addresses] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:140:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf deleteAddress: pfAddress fromTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:141:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addressesFromTable: name withResult: &addresses] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:158:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf flushTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:164:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addAddress: pfAddress toTable: name] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
TRLocalPacketFilterTests.m:165:5: error: too few arguments to function call, expected at least 4, have 3
    fail_unless([pf addressesFromTable: name withResult: &addresses] == PF_SUCCESS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/check.h:469:21: note: expanded from macro 'fail_unless'
#define fail_unless ck_assert_msg
                    ^
/usr/local/include/check.h:538:89: note: expanded from macro 'ck_assert_msg'
     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
     ~~~~~~~~~~~~~~~~~                                                                  ^
/usr/local/include/check.h:502:12: note: '_ck_assert_failed' declared here
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
           ^
18 errors generated.
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2020-07-26 08:54:28 UTC
Created attachment 216774 [details]
patch to revert check to v0.15.0 for now

I think we should revert this change for now and move back to 0.15.0 until the upstream fixes things. 

Next time when you update please see if the users of check still build - it's a list of currently 22 pacakges according to:

$ grep check-0.15 /usr/ports/INDEX-12  | cut -f1 -d\| | sort | nl
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2020-07-27 06:18:10 UTC
databases/galera26 is broken too.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2020-07-27 07:04:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248291
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-07-29 06:37:24 UTC
Matthias, thanks for figure out the root cause of the failure [1].
I prefer reverting the commit instead of going back to 0.15.0.
It works with both ports (security/openvpn-auth-ldap and databases/galera26).

[1] https://github.com/libcheck/check/commit/7ac1fcbcefe8813e2a75388ec61e20a184ddc8c8
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2020-07-29 15:37:35 UTC
Hello Po-Chuan, thank you. 

Please check the upstream report as well, there were some updates; beyond that, you are the maintainer and know the port history and best solutions better than I do. 

There will be no hard feelings if you waive my patch and go for another solution, but fixing the build will help :-)

Regards
Matthias
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-07-30 09:50:33 UTC
A commit references this bug:

Author: sunpoet
Date: Thu Jul 30 09:50:01 UTC 2020
New revision: 543741
URL: https://svnweb.freebsd.org/changeset/ports/543741

Log:
  Fix build of dependent ports by reverting [1]

  - Bump PORTREVISION for package change

  PR:		248274 [2], 248291 [3]
  Reported by:	mandree [2], shrdlu19@gmail.com [3]
  Reference:	https://github.com/libcheck/check/commit/7ac1fcbcefe8813e2a75388ec61e20a184ddc8c8 [1]

Changes:
  head/devel/check/Makefile
  head/devel/check/files/patch-src-check.c
  head/devel/check/files/patch-src-check.h.in
Comment 7 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-07-30 11:00:58 UTC
Committed. Thanks!