[ https://issues.apache.org/jira/browse/ZOOKEEPER-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15410315#comment-15410315 ]
Michael Han commented on ZOOKEEPER-1742: ---------------------------------------- The latest patch attached here does not apply unfortunately... One observation is the patch uses compile time interception which only works for source files we can instrument - so it is not semantically equivalent to the ld wrap option which also replaced calls from stand libraries (for functions such as calloc we are mocking in test.). Maybe that is why some of UTs were failing when we first tried the patch? For OS X, there is standard practice to simulate ld wrap option as described in TR [1], section 'Macintosh OS X function wrapping', and I tested it work for me locally, so we can explore that approach. I'll give a stab on this if no one else is interested. This approach requires link to shared library so created ZOOKEEPER-2505 to track that. I think we can keep the ld wrap option as is and add wrap option simulator for OSX specifically - so we can run c test on mac and meanwhile have minimum impact on other platforms. [1]https://wwwold.cs.umd.edu/Library/TRs/CS-TR-4585/CS-TR-4585.pdf > "make check" doesn't work on macos > ---------------------------------- > > Key: ZOOKEEPER-1742 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1742 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.4.5, 3.5.0 > Reporter: Flavio Junqueira > Assignee: Germán Blanco > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-1742-3.4.patch, ZOOKEEPER-1742-3.4.patch, > ZOOKEEPER-1742-3.4.patch, ZOOKEEPER-1742-3.4.patch, ZOOKEEPER-1742-3.4.patch, > ZOOKEEPER-1742-3.4.patch, ZOOKEEPER-1742.patch, ZOOKEEPER-1742.patch, > ZOOKEEPER-1742.patch, ZOOKEEPER-1742.patch, ZOOKEEPER-1742.patch > > > There are two problems I have spotted when running "make check" with the C > client. First, it complains that the sleep call is not defined in two test > files: tests/ZooKeeperQuorumServer.cc and tests/TestReconfigServer.cc. > Including unistd.h works. The second problem is with linker options. It > complains that "--wrap" is not a valid. I'm not sure how to deal with this > one yet, since I'm not sure why we are using it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)