Merge lp:~eday/gearmand/fix-struct-alignment into lp:gearmand/1.0

Proposed by Eric Day
Status: Merged
Merged at revision: not available
Proposed branch: lp:~eday/gearmand/fix-struct-alignment
Merge into: lp:gearmand/1.0
Diff against target: 93 lines (+25/-4)
4 files modified
libgearman/configure.h.in (+3/-1)
libgearman/connection.c (+1/-1)
m4/pandora_platform.m4 (+5/-0)
tests/client_test.c (+16/-2)
To merge this branch: bzr merge lp:~eday/gearmand/fix-struct-alignment
Reviewer Review Type Date Requested Status
Gearman-developers Pending
Review via email: mp+21012@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote :

The other option to this is just to turn down the optimization on
Solaris (since that is where the bug is).

On Mar 9, 2010, at 3:07 PM, Eric Day wrote:

> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> into lp:gearmand.
>
> Requested reviews:
> Gearman-developers (gearman-developers)
>
> --
> https://code.launchpad.net/~eday/gearmand/fix-struct-alignment/+merge/21012
> Your team Gearman-developers is subscribed to branch lp:gearmand.
> === modified file 'libgearman/configure.h.in'
> --- libgearman/configure.h.in 2010-02-12 20:26:31 +0000
> +++ libgearman/configure.h.in 2010-03-09 23:07:17 +0000
> @@ -16,7 +16,9 @@
> extern "C" {
> #endif
>
> -#ifdef TARGET_OS_LINUX
> +#define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@
> +
> +#if LIBGEARMAN_OPTIMIZE_BITFIELD == 1
> #define LIBGEARMAN_BITFIELD :1
> #else
> #define LIBGEARMAN_BITFIELD
>
> === modified file 'libgearman/connection.c'
> --- libgearman/connection.c 2010-01-28 23:46:52 +0000
> +++ libgearman/connection.c 2010-03-09 23:07:17 +0000
> @@ -115,7 +115,7 @@
> {
> connection= gearman_connection_create(gearman, connection, NULL);
>
> - if (from || connection == NULL)
> + if (from == NULL || connection == NULL)
> return connection;
>
> connection->options.ready= from->options.ready;
>
> === modified file 'm4/pandora_platform.m4'
> --- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000
> +++ m4/pandora_platform.m4 2010-03-09 23:07:17 +0000
> @@ -34,11 +34,14 @@
> ;;
> esac
>
> + PANDORA_OPTIMIZE_BITFIELD=0
> +
> case "$target_os" in
> *linux*)
> TARGET_LINUX="true"
> AC_SUBST(TARGET_LINUX)
> AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
> + PANDORA_OPTIMIZE_BITFIELD=1
> ;;
> *darwin*)
> TARGET_OSX="true"
> @@ -60,6 +63,8 @@
> ;;
> esac
>
> + AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
> +
> AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
> AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
>
>
> === modified file 'tests/client_test.c'
> --- tests/client_test.c 2010-01-28 21:45:14 +0000
> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> @@ -99,6 +99,7 @@
> test_return_t clone_test(void *object)
> {
> const gearman_client_st *from= (gearman_client_st *)object;
> + gearman_client_st *from_with_host;
> gearman_client_st *client;
>
> client= gearman_client_clone(NULL, NULL);
> @@ -110,8 +111,21 @@
>
> client= gearman_client_clone(NULL, from);
> test_truth(client);
> -
> - gearman_client_free(client);
> + gearman_client_free(client);
> +
> + from_with_host= gearman_client_create(NULL);
> + test_truth(from_with_host);
> + gearman_client_add_server(from_with_host, "127.0.0.1", 12345);
> +
> + client= gearman_client_clone(NULL, from_with_host);
> + test_truth(client);
> +
> + test_truth(client->universal.con_list);
> + test_truth(!strcmp(client->universal.con_list->host,
> from_with_host->universal.con_list->host));
> + test_truth(client->universal.con_list->port == from_with_host-
> >universal.con_list->port);
> +
> + gearman_client_free(client);
> + gearman_client_free(from_with_host);
>
> return TEST_SUCCESS;
> }
>

Revision history for this message
Eric Day (eday) wrote :
Download full text (3.8 KiB)

I don't really have a preference how this is fixed, this just seemed
like a generic way we can control from pandora-build if we want to
fine-tune it. We just can't have any public headers depending on
config.h like they do now.

-Eric

On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
> The other option to this is just to turn down the optimization on
> Solaris (since that is where the bug is).
>
>
> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
>
> > Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> > into lp:gearmand.
> >
> > Requested reviews:
> > Gearman-developers (gearman-developers)
> >
> > --
> > https://code.launchpad.net/~eday/gearmand/fix-struct-alignment/+merge/21012
> > Your team Gearman-developers is subscribed to branch lp:gearmand.
> > === modified file 'libgearman/configure.h.in'
> > --- libgearman/configure.h.in 2010-02-12 20:26:31 +0000
> > +++ libgearman/configure.h.in 2010-03-09 23:07:17 +0000
> > @@ -16,7 +16,9 @@
> > extern "C" {
> > #endif
> >
> > -#ifdef TARGET_OS_LINUX
> > +#define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@
> > +
> > +#if LIBGEARMAN_OPTIMIZE_BITFIELD == 1
> > #define LIBGEARMAN_BITFIELD :1
> > #else
> > #define LIBGEARMAN_BITFIELD
> >
> > === modified file 'libgearman/connection.c'
> > --- libgearman/connection.c 2010-01-28 23:46:52 +0000
> > +++ libgearman/connection.c 2010-03-09 23:07:17 +0000
> > @@ -115,7 +115,7 @@
> > {
> > connection= gearman_connection_create(gearman, connection, NULL);
> >
> > - if (from || connection == NULL)
> > + if (from == NULL || connection == NULL)
> > return connection;
> >
> > connection->options.ready= from->options.ready;
> >
> > === modified file 'm4/pandora_platform.m4'
> > --- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000
> > +++ m4/pandora_platform.m4 2010-03-09 23:07:17 +0000
> > @@ -34,11 +34,14 @@
> > ;;
> > esac
> >
> > + PANDORA_OPTIMIZE_BITFIELD=0
> > +
> > case "$target_os" in
> > *linux*)
> > TARGET_LINUX="true"
> > AC_SUBST(TARGET_LINUX)
> > AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
> > + PANDORA_OPTIMIZE_BITFIELD=1
> > ;;
> > *darwin*)
> > TARGET_OSX="true"
> > @@ -60,6 +63,8 @@
> > ;;
> > esac
> >
> > + AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
> > +
> > AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
> > AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
> >
> >
> > === modified file 'tests/client_test.c'
> > --- tests/client_test.c 2010-01-28 21:45:14 +0000
> > +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> > @@ -99,6 +99,7 @@
> > test_return_t clone_test(void *object)
> > {
> > const gearman_client_st *from= (gearman_client_st *)object;
> > + gearman_client_st *from_with_host;
> > gearman_client_st *client;
> >
> > client= gearman_client_clone(NULL, NULL);
> > @@ -110,8 +111,21 @@
> >
> > client= gearman_client_clone(NULL, from);
> > test_truth(client);
> > -
> > - gearman_client_free(client);
> > + gearman_client_free(client);
> > +
> > + from_with_host= gearman_client_create(NULL);
> > + test_truth(from_with_host);
> > + gearman_client_add_server(from_with_host, "127.0.0.1", ...

Read more...

Revision history for this message
Brian Aker (brianaker) wrote :
Download full text (4.0 KiB)

Ok, just disable optimizations on Solaris and pull the macro.

On Mar 9, 2010, at 3:15 PM, Eric Day wrote:

> I don't really have a preference how this is fixed, this just seemed
> like a generic way we can control from pandora-build if we want to
> fine-tune it. We just can't have any public headers depending on
> config.h like they do now.
>
> -Eric
>
> On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
>> The other option to this is just to turn down the optimization on
>> Solaris (since that is where the bug is).
>>
>>
>> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
>>
>>> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
>>> into lp:gearmand.
>>>
>>> Requested reviews:
>>> Gearman-developers (gearman-developers)
>>>
>>> --
>>> https://code.launchpad.net/~eday/gearmand/fix-struct-alignment/+merge/21012
>>> Your team Gearman-developers is subscribed to branch lp:gearmand.
>>> === modified file 'libgearman/configure.h.in'
>>> --- libgearman/configure.h.in 2010-02-12 20:26:31 +0000
>>> +++ libgearman/configure.h.in 2010-03-09 23:07:17 +0000
>>> @@ -16,7 +16,9 @@
>>> extern "C" {
>>> #endif
>>>
>>> -#ifdef TARGET_OS_LINUX
>>> +#define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@
>>> +
>>> +#if LIBGEARMAN_OPTIMIZE_BITFIELD == 1
>>> #define LIBGEARMAN_BITFIELD :1
>>> #else
>>> #define LIBGEARMAN_BITFIELD
>>>
>>> === modified file 'libgearman/connection.c'
>>> --- libgearman/connection.c 2010-01-28 23:46:52 +0000
>>> +++ libgearman/connection.c 2010-03-09 23:07:17 +0000
>>> @@ -115,7 +115,7 @@
>>> {
>>> connection= gearman_connection_create(gearman, connection, NULL);
>>>
>>> - if (from || connection == NULL)
>>> + if (from == NULL || connection == NULL)
>>> return connection;
>>>
>>> connection->options.ready= from->options.ready;
>>>
>>> === modified file 'm4/pandora_platform.m4'
>>> --- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000
>>> +++ m4/pandora_platform.m4 2010-03-09 23:07:17 +0000
>>> @@ -34,11 +34,14 @@
>>> ;;
>>> esac
>>>
>>> + PANDORA_OPTIMIZE_BITFIELD=0
>>> +
>>> case "$target_os" in
>>> *linux*)
>>> TARGET_LINUX="true"
>>> AC_SUBST(TARGET_LINUX)
>>> AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
>>> + PANDORA_OPTIMIZE_BITFIELD=1
>>> ;;
>>> *darwin*)
>>> TARGET_OSX="true"
>>> @@ -60,6 +63,8 @@
>>> ;;
>>> esac
>>>
>>> + AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
>>> +
>>> AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
>>> AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
>>>
>>>
>>> === modified file 'tests/client_test.c'
>>> --- tests/client_test.c 2010-01-28 21:45:14 +0000
>>> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
>>> @@ -99,6 +99,7 @@
>>> test_return_t clone_test(void *object)
>>> {
>>> const gearman_client_st *from= (gearman_client_st *)object;
>>> + gearman_client_st *from_with_host;
>>> gearman_client_st *client;
>>>
>>> client= gearman_client_clone(NULL, NULL);
>>> @@ -110,8 +111,21 @@
>>>
>>> client= gearman_client_clone(NULL, from);
>>> test_truth(client);
>>> -
>>> - gearman_client_free(client);
>>> + gearman_client_free(client);
>>> +
>>> + from_with_host= gearman_client_create(NULL);...

Read more...

Revision history for this message
Eric Day (eday) wrote :
Download full text (4.7 KiB)

You mean remove all references to LIBGEARMAN_BITFIELD, and don't
optimize for any platform? I don't see any problem with keeping
the optimization in, what specifically about the proposed branch is
an issue?

-Eric

On Tue, Mar 09, 2010 at 11:21:19PM -0000, Brian Aker wrote:
> Ok, just disable optimizations on Solaris and pull the macro.
>
> On Mar 9, 2010, at 3:15 PM, Eric Day wrote:
>
> > I don't really have a preference how this is fixed, this just seemed
> > like a generic way we can control from pandora-build if we want to
> > fine-tune it. We just can't have any public headers depending on
> > config.h like they do now.
> >
> > -Eric
> >
> > On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
> >> The other option to this is just to turn down the optimization on
> >> Solaris (since that is where the bug is).
> >>
> >>
> >> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
> >>
> >>> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> >>> into lp:gearmand.
> >>>
> >>> Requested reviews:
> >>> Gearman-developers (gearman-developers)
> >>>
> >>> --
> >>> https://code.launchpad.net/~eday/gearmand/fix-struct-alignment/+merge/21012
> >>> Your team Gearman-developers is subscribed to branch lp:gearmand.
> >>> === modified file 'libgearman/configure.h.in'
> >>> --- libgearman/configure.h.in 2010-02-12 20:26:31 +0000
> >>> +++ libgearman/configure.h.in 2010-03-09 23:07:17 +0000
> >>> @@ -16,7 +16,9 @@
> >>> extern "C" {
> >>> #endif
> >>>
> >>> -#ifdef TARGET_OS_LINUX
> >>> +#define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@
> >>> +
> >>> +#if LIBGEARMAN_OPTIMIZE_BITFIELD == 1
> >>> #define LIBGEARMAN_BITFIELD :1
> >>> #else
> >>> #define LIBGEARMAN_BITFIELD
> >>>
> >>> === modified file 'libgearman/connection.c'
> >>> --- libgearman/connection.c 2010-01-28 23:46:52 +0000
> >>> +++ libgearman/connection.c 2010-03-09 23:07:17 +0000
> >>> @@ -115,7 +115,7 @@
> >>> {
> >>> connection= gearman_connection_create(gearman, connection, NULL);
> >>>
> >>> - if (from || connection == NULL)
> >>> + if (from == NULL || connection == NULL)
> >>> return connection;
> >>>
> >>> connection->options.ready= from->options.ready;
> >>>
> >>> === modified file 'm4/pandora_platform.m4'
> >>> --- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000
> >>> +++ m4/pandora_platform.m4 2010-03-09 23:07:17 +0000
> >>> @@ -34,11 +34,14 @@
> >>> ;;
> >>> esac
> >>>
> >>> + PANDORA_OPTIMIZE_BITFIELD=0
> >>> +
> >>> case "$target_os" in
> >>> *linux*)
> >>> TARGET_LINUX="true"
> >>> AC_SUBST(TARGET_LINUX)
> >>> AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
> >>> + PANDORA_OPTIMIZE_BITFIELD=1
> >>> ;;
> >>> *darwin*)
> >>> TARGET_OSX="true"
> >>> @@ -60,6 +63,8 @@
> >>> ;;
> >>> esac
> >>>
> >>> + AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
> >>> +
> >>> AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
> >>> AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
> >>>
> >>>
> >>> === modified file 'tests/client_test.c'
> >>> --- tests/client_test.c 2010-01-28 21:45:14 +0000
> >>> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> >>> @@ -99,6 +99,7 @@
> >>> test_return_t clone_...

Read more...

333. By Eric Day

Changed default bitfield optimize setting to only be off for Solaris.

Revision history for this message
Eric Day (eday) wrote :
Download full text (4.5 KiB)

Ok, branch updated with default from only Linux to not Solaris.

On Tue, Mar 09, 2010 at 11:21:19PM -0000, Brian Aker wrote:
> Ok, just disable optimizations on Solaris and pull the macro.
>
> On Mar 9, 2010, at 3:15 PM, Eric Day wrote:
>
> > I don't really have a preference how this is fixed, this just seemed
> > like a generic way we can control from pandora-build if we want to
> > fine-tune it. We just can't have any public headers depending on
> > config.h like they do now.
> >
> > -Eric
> >
> > On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
> >> The other option to this is just to turn down the optimization on
> >> Solaris (since that is where the bug is).
> >>
> >>
> >> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
> >>
> >>> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> >>> into lp:gearmand.
> >>>
> >>> Requested reviews:
> >>> Gearman-developers (gearman-developers)
> >>>
> >>> --
> >>> https://code.launchpad.net/~eday/gearmand/fix-struct-alignment/+merge/21012
> >>> Your team Gearman-developers is subscribed to branch lp:gearmand.
> >>> === modified file 'libgearman/configure.h.in'
> >>> --- libgearman/configure.h.in 2010-02-12 20:26:31 +0000
> >>> +++ libgearman/configure.h.in 2010-03-09 23:07:17 +0000
> >>> @@ -16,7 +16,9 @@
> >>> extern "C" {
> >>> #endif
> >>>
> >>> -#ifdef TARGET_OS_LINUX
> >>> +#define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@
> >>> +
> >>> +#if LIBGEARMAN_OPTIMIZE_BITFIELD == 1
> >>> #define LIBGEARMAN_BITFIELD :1
> >>> #else
> >>> #define LIBGEARMAN_BITFIELD
> >>>
> >>> === modified file 'libgearman/connection.c'
> >>> --- libgearman/connection.c 2010-01-28 23:46:52 +0000
> >>> +++ libgearman/connection.c 2010-03-09 23:07:17 +0000
> >>> @@ -115,7 +115,7 @@
> >>> {
> >>> connection= gearman_connection_create(gearman, connection, NULL);
> >>>
> >>> - if (from || connection == NULL)
> >>> + if (from == NULL || connection == NULL)
> >>> return connection;
> >>>
> >>> connection->options.ready= from->options.ready;
> >>>
> >>> === modified file 'm4/pandora_platform.m4'
> >>> --- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000
> >>> +++ m4/pandora_platform.m4 2010-03-09 23:07:17 +0000
> >>> @@ -34,11 +34,14 @@
> >>> ;;
> >>> esac
> >>>
> >>> + PANDORA_OPTIMIZE_BITFIELD=0
> >>> +
> >>> case "$target_os" in
> >>> *linux*)
> >>> TARGET_LINUX="true"
> >>> AC_SUBST(TARGET_LINUX)
> >>> AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
> >>> + PANDORA_OPTIMIZE_BITFIELD=1
> >>> ;;
> >>> *darwin*)
> >>> TARGET_OSX="true"
> >>> @@ -60,6 +63,8 @@
> >>> ;;
> >>> esac
> >>>
> >>> + AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
> >>> +
> >>> AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
> >>> AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
> >>>
> >>>
> >>> === modified file 'tests/client_test.c'
> >>> --- tests/client_test.c 2010-01-28 21:45:14 +0000
> >>> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> >>> @@ -99,6 +99,7 @@
> >>> test_return_t clone_test(void *object)
> >>> {
> >>> const gearman_client_st *from= (gearman_client_st *)object;
> >>> + gearman_client_st *from_with_host;
> >>> gearm...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libgearman/configure.h.in'
--- libgearman/configure.h.in 2010-02-12 20:26:31 +0000
+++ libgearman/configure.h.in 2010-03-09 23:48:32 +0000
@@ -16,7 +16,9 @@
16extern "C" {16extern "C" {
17#endif17#endif
1818
19#ifdef TARGET_OS_LINUX19#define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@
20
21#if LIBGEARMAN_OPTIMIZE_BITFIELD == 1
20#define LIBGEARMAN_BITFIELD :122#define LIBGEARMAN_BITFIELD :1
21#else23#else
22#define LIBGEARMAN_BITFIELD24#define LIBGEARMAN_BITFIELD
2325
=== modified file 'libgearman/connection.c'
--- libgearman/connection.c 2010-01-28 23:46:52 +0000
+++ libgearman/connection.c 2010-03-09 23:48:32 +0000
@@ -115,7 +115,7 @@
115{115{
116 connection= gearman_connection_create(gearman, connection, NULL);116 connection= gearman_connection_create(gearman, connection, NULL);
117117
118 if (from || connection == NULL)118 if (from == NULL || connection == NULL)
119 return connection;119 return connection;
120120
121 connection->options.ready= from->options.ready;121 connection->options.ready= from->options.ready;
122122
=== modified file 'm4/pandora_platform.m4'
--- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000
+++ m4/pandora_platform.m4 2010-03-09 23:48:32 +0000
@@ -34,6 +34,8 @@
34 ;;34 ;;
35 esac35 esac
3636
37 PANDORA_OPTIMIZE_BITFIELD=1
38
37 case "$target_os" in39 case "$target_os" in
38 *linux*)40 *linux*)
39 TARGET_LINUX="true"41 TARGET_LINUX="true"
@@ -47,6 +49,7 @@
47 ;;49 ;;
48 *solaris*)50 *solaris*)
49 TARGET_SOLARIS="true"51 TARGET_SOLARIS="true"
52 PANDORA_OPTIMIZE_BITFIELD=0
50 AC_SUBST(TARGET_SOLARIS)53 AC_SUBST(TARGET_SOLARIS)
51 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])54 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
52 ;;55 ;;
@@ -60,6 +63,8 @@
60 ;;63 ;;
61 esac64 esac
6265
66 AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
67
63 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])68 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
64 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])69 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
6570
6671
=== modified file 'tests/client_test.c'
--- tests/client_test.c 2010-01-28 21:45:14 +0000
+++ tests/client_test.c 2010-03-09 23:48:32 +0000
@@ -99,6 +99,7 @@
99test_return_t clone_test(void *object)99test_return_t clone_test(void *object)
100{100{
101 const gearman_client_st *from= (gearman_client_st *)object;101 const gearman_client_st *from= (gearman_client_st *)object;
102 gearman_client_st *from_with_host;
102 gearman_client_st *client;103 gearman_client_st *client;
103104
104 client= gearman_client_clone(NULL, NULL);105 client= gearman_client_clone(NULL, NULL);
@@ -110,8 +111,21 @@
110111
111 client= gearman_client_clone(NULL, from);112 client= gearman_client_clone(NULL, from);
112 test_truth(client);113 test_truth(client);
113114 gearman_client_free(client);
114 gearman_client_free(client);115
116 from_with_host= gearman_client_create(NULL);
117 test_truth(from_with_host);
118 gearman_client_add_server(from_with_host, "127.0.0.1", 12345);
119
120 client= gearman_client_clone(NULL, from_with_host);
121 test_truth(client);
122
123 test_truth(client->universal.con_list);
124 test_truth(!strcmp(client->universal.con_list->host, from_with_host->universal.con_list->host));
125 test_truth(client->universal.con_list->port == from_with_host->universal.con_list->port);
126
127 gearman_client_free(client);
128 gearman_client_free(from_with_host);
115129
116 return TEST_SUCCESS;130 return TEST_SUCCESS;
117}131}

Subscribers

People subscribed via source and target branches

to all changes: