This patch adds a test of libbu semaphore locking in response to this GCI task: http://www.google-melange.com/gci/task/view/google/gci2012/8095204
I made some changes (new version attached).
Make sure you add the standard header to your test file - see sh/header.sh for a handy script to help with that.
Please post a version of the patch with the correct license header on the test source file (should be LGPL in this case.)
I have added the header:
When trying to compile, I get the error:
src/libbu/tests/bu_semaphore.c: In function ‘single_thread_test_alarm_handler’:
src/libbu/tests/bu_semaphore.c:52: error: ‘SIGALRM’ undeclared (first use in this function)
src/libbu/tests/bu_semaphore.c:52: error: (Each undeclared identifier is reported only once
src/libbu/tests/bu_semaphore.c:52: error: for each function it appears in.)
cc1: warnings being treated as errors
src/libbu/tests/bu_semaphore.c: In function ‘single_thread_test’:
src/libbu/tests/bu_semaphore.c:59: error: implicit declaration of function ‘signal’
src/libbu/tests/bu_semaphore.c:59: error: ‘SIGALRM’ undeclared (first use in this function)
I didn't include signal.h. I have fixed that problem and added support for Windows. However, I'm not able to test that.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.