[libdispatch-dev] [PATCH] Solaris portability fix for libdispatch test suite

Joakim Johansson jocke at tbricks.com
Thu Dec 23 03:45:02 PST 2010


Please consider the attached patches for portability of the test suite.

Attached are the shims and small patches required to get the portable parts of the test suite to run properly, it also includes a fix for spurious failures of dispatch_priority/dispatch_priority2 due to a wraparound bug, which should affect test stability on other platforms as well.

The compatibility wrappers were largely based of existing code from opensource.apple.com as referenced in the source files.

In bash with the patches unpacked alongside the trunk:

-------------
svn co http://svn.macosforge.org/repository/libdispatch/trunk 
cd trunk
for x in ../libdispatch-test-patches-r194/*.patch; do patch -p0 < ../libdispatch-test-patches-r194/$x; done
sh autogen.sh
./configure CFLAGS="-m64 -I/usr/local/include" LDFLAGS="-L/usr/local/lib"
gmake install CFLAGS=-m64
——————

After that, tests can be run ok:
------
dev2:~/gcd/new-merge/trunk> testing/dispatch_priority

==================================================
[TEST] Dispatch Priority
[PID] 11583
==================================================

LOW: 28
******************                                                              
DEFAULT: 36
***********************                                                         
HIGH: 128
********************************************************************************
        Actual: 192
        Expected: 192
[PASS] blocks completed
        Actual: 28
        Expected: <128
[PASS] high priority precedence
dev2:~/gcd/new-merge/trunk> 
------

Merry Christmas!

Joakim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libdispatch-test-patches-r194.zip
Type: application/zip
Size: 12922 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/libdispatch-dev/attachments/20101223/824501e7/attachment-0001.zip>
-------------- next part --------------


On 23 dec 2010, at 10.15, Joakim Johansson wrote:

> Very nice, exactly what I wished for Christmas! ;-)
> 
> Now libdispatch builds out of the box (with prerequisite libkqueue and libpthread_workqueue in /usr/local) on Solaris with:
> 
> —————————
> $ svn co http://svn.macosforge.org/repository/libdispatch/trunk 
> ...
> Checked out revision 194.
> $ cd trunk
> $ sh autogen.sh
> ...
> $ ./configure CFLAGS="-m64 -I/usr/local/include" LDFLAGS="-L/usr/local/lib”
> ...
> $ gmake install
> ...
> $ file /usr/local/lib/libdispatch.so
> /usr/local/lib/libdispatch.so:  ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available
> $
> —————————
> 
> A few patches remains for the test suite to pass through properly, hope to be able to package that up soon!
> 
> Also, testing of block support is dependent on getting clang up and working on Solaris, haven’t had time to look at that in-depth yet, it failed when I just tried it quickly.
> 
> Thanks!
> 
> Joakim
> 
> 
> On 23 dec 2010, at 02.36, Jordan K. Hubbard wrote:
> 
>> Sending        configure.ac
>> Sending        libdispatch.xcodeproj/project.pbxproj
>> Sending        m4/private-extern.m4
>> Sending        src/Makefile.am
>> Sending        src/queue.c
>> Sending        src/shims/getprogname.h
>> Sending        src/shims/time.c
>> Sending        testing/dispatch_after.c
>> Transmitting file data ........
>> Committed revision 194.
>> 
>> Merry Christmas. :-)
>> 
>> - Jordan
>> 
>> On Dec 10, 2010, at 8:23 AM, Joakim Johansson wrote:
>> 
>>> …a very nice present would be integration of the patches from Mark:
>>> 
>>> ——
>>> Subject: 	[libdispatch-dev] [PATCH] various portability issues
>>> Date: 	10 november 2010 02.51.03 CET
>>> -—
>>> 
>>> :-)
>>> 
>>> (then we can submit the required patches for passing the test suite next...)
>>> 
>>> Wishing for a friendly SC!
>>> 
>>> Cheers,
>>> 
>>> Joakim
>>> 
>>> _______________________________________________
>>> libdispatch-dev mailing list
>>> libdispatch-dev at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev
>> 
> 
> _______________________________________________
> libdispatch-dev mailing list
> libdispatch-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev



More information about the libdispatch-dev mailing list