* [Buildroot] [PATCH] zeromq: disable test using fork() when fork() is no available
@ 2014-05-02 14:21 Samuel Martin
2014-05-02 15:45 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Martin @ 2014-05-02 14:21 UTC (permalink / raw)
To: buildroot
zeromp's configure script correctly detects the fork availability, but
unconditionally build all tests.
This patch just disables the piece of code using fork() in the given
test. This avoids the autoreconf step of the package.
Fixes:
http://autobuild.buildroot.org/results/359/3599cc3b7bf2bb22a78961cd84d21cb03cbd7015/
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...le-code-using-fork-when-fork-is-not-avail.patch | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 package/zeromq/zeromq-0001-tests-disable-code-using-fork-when-fork-is-not-avail.patch
diff --git a/package/zeromq/zeromq-0001-tests-disable-code-using-fork-when-fork-is-not-avail.patch b/package/zeromq/zeromq-0001-tests-disable-code-using-fork-when-fork-is-not-avail.patch
new file mode 100644
index 0000000..0c17b6a
--- /dev/null
+++ b/package/zeromq/zeromq-0001-tests-disable-code-using-fork-when-fork-is-not-avail.patch
@@ -0,0 +1,32 @@
+From 694440779ae41f46e01a1486cbe702982c29ef0e Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Fri, 2 May 2014 16:12:20 +0200
+Subject: [PATCH] tests: disable code using fork() when fork() is not available
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ tests/test_fork.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/test_fork.cpp b/tests/test_fork.cpp
+index 637b6e9..67bc957 100644
+--- a/tests/test_fork.cpp
++++ b/tests/test_fork.cpp
+@@ -35,6 +35,7 @@ int main (void)
+ int rc = zmq_bind (pull, address);
+ assert (rc == 0);
+
++#ifdef HAVE_FORK
+ int pid = fork ();
+ if (pid == 0) {
+ // Child process
+@@ -77,5 +78,6 @@ int main (void)
+ }
+ exit (0);
+ }
++#endif
+ return 0;
+ }
+--
+1.9.2
+
--
1.9.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH] zeromq: disable test using fork() when fork() is no available
2014-05-02 14:21 [Buildroot] [PATCH] zeromq: disable test using fork() when fork() is no available Samuel Martin
@ 2014-05-02 15:45 ` Thomas Petazzoni
2014-05-03 12:09 ` Samuel Martin
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2014-05-02 15:45 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Fri, 2 May 2014 16:21:38 +0200, Samuel Martin wrote:
> zeromp's configure script correctly detects the fork availability, but
> unconditionally build all tests.
>
> This patch just disables the piece of code using fork() in the given
> test. This avoids the autoreconf step of the package.
Huh, but then it completely breaks the test, no? Would it be better to
find an upstreamable solution instead?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] zeromq: disable test using fork() when fork() is no available
2014-05-02 15:45 ` Thomas Petazzoni
@ 2014-05-03 12:09 ` Samuel Martin
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Martin @ 2014-05-03 12:09 UTC (permalink / raw)
To: buildroot
Thomas,
On Fri, May 2, 2014 at 5:45 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Samuel Martin,
>
> On Fri, 2 May 2014 16:21:38 +0200, Samuel Martin wrote:
>> zeromp's configure script correctly detects the fork availability, but
>> unconditionally build all tests.
>>
>> This patch just disables the piece of code using fork() in the given
>> test. This avoids the autoreconf step of the package.
>
> Huh, but then it completely breaks the test, no? Would it be better to
> find an upstreamable solution instead?
I don't think so.
Zeromq code already uses "#ifdef HAVE_FORK ... #endif" to protect the
section using fork; I just did the same in the test source (disabling
most/all of this test, so it now has not real meaning when fork() is
not available).
BTW, I've just come up with a proper solution just by hacking the
autotools (<ironic>my favorite build-system! </ironic>), so I'll
repost this fix shortly.
Regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-03 12:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-02 14:21 [Buildroot] [PATCH] zeromq: disable test using fork() when fork() is no available Samuel Martin
2014-05-02 15:45 ` Thomas Petazzoni
2014-05-03 12:09 ` Samuel Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox