Testsuite fails strangely on Solaris

8 views
Skip to first unread message

Dagobert

unread,
Dec 7, 2010, 9:41:32 AM12/7/10
to pacparser, d...@opencsw.org
Hi,

I noticed the testsuite fails on my Solaris 9 i386 host, but shows no
errors on Solaris 9 Sparc. My investigation shows that
return myIpAddress();
in proxy.pac returns different styles:
- Sparc: ???;192.168.1.11
- i386: 192.168.1.18

Both machines are in a 192.168.1.0/24 network and the proxy.pac
returns 192.0.0.0 on the i386 host where the testsuite expects END-OF-
SCRIPT. Maybe the testscript should better set value of myIpAddress
with "-c" on pactester?


Best regards

-- Dago

Manu Garg

unread,
Dec 7, 2010, 12:30:51 PM12/7/10
to pacp...@googlegroups.com, d...@opencsw.org
Thanks a lot Dagobert for trying to build pacparser on Solaris and
reporting the issues. Comments inline.

On Tue, Dec 7, 2010 at 8:11 PM, Dagobert <honk...@googlemail.com> wrote:
> Hi,
>
> I noticed the testsuite fails on my Solaris 9 i386 host, but shows no
> errors on Solaris 9 Sparc. My investigation shows that
>  return myIpAddress();
> in proxy.pac returns different styles:
> - Sparc: ???;192.168.1.11
> - i386: 192.168.1.18

This garbled text in ip addresses is a problem. I am surprised that I
didn't find it earlier. Opened an issue to track this:
http://goo.gl/ww69d

This change should fix it: http://goo.gl/RFEln. This is in dev clone
right now. I'll push it to the main branch soon.

>
> Both machines are in a 192.168.1.0/24 network and the proxy.pac
> returns 192.0.0.0 on the i386 host where the testsuite expects END-OF-
> SCRIPT. Maybe the testscript should better set value of myIpAddress
> with "-c" on pactester?

This is happening because of a logic problem in test scripts.
proxy.pac is hitting this block

---
if (isInNet(myIpAddress(), '192.0.0.0', '255.0.0.0'))
return '192.0.0.0';
---
for your network, before falling over to:

---
else
return "END-OF-SCRIPT";
---

I'll create an issue to track this and release a fix for this pretty soon.
>
>
> Best regards
>
>  -- Dago
>
> --
> You received this message because you are subscribed to the Google Groups "pacparser" group.
> To post to this group, send email to pacp...@googlegroups.com.
> To unsubscribe from this group, send email to pacparser+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pacparser?hl=en.
>
>

--
Manu Garg
http://www.manugarg.com
"Journey is the destination of life."

Dagobert Michelsen

unread,
Dec 7, 2010, 1:03:41 PM12/7/10
to Manu Garg, pacp...@googlegroups.com
Hi Manu,

Am 07.12.2010 um 18:30 schrieb Manu Garg:
> Thanks a lot Dagobert for trying to build pacparser on Solaris and
> reporting the issues. Comments inline.

I had some more porting issues which are probably not bugs,
but you may be interested to have a look at the rest of my
patches:

This is about GNU-tar specific flags, va_copy on Solaris, gcc-specific flags
and a reordering to get -L. before the library in the current directory:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0001-Adjust-Makefile.patch

This is probably another real bug:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0002-Fix-nullpointer-bug.patch

Solaris grep does't know "-q":
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0003-Only-GNU-grep-knows-q.patch

Propagate CFLAGS from build environment:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0004-Some-more-Makefile-tweaks.patch

Also CFLAGS propagation and Solaris linker specific SONAME setting:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0005-Fix-soname-and-pactester-compilation.patch

Solaris needs extra libs for the resolver, not really necessary,
but otherwise "ldd -r" bails out:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0006-Add-flags-to-make-library-self-sufficient.patch

And a nasty thing which avoids compilation of spidermonkey on Solaris i386:
The proper config is missing (only copied over, may not be 100% correct) for SunOS i386.
The detection of the Sparc assembly lock_SunOS.s is also only shielded against
Solaris, not between sparc/i386. As I couldn't find the place to add the functionality
I simply removed the file for i386 after extraction:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0007-Add-config-for-spidermonkey-i386.patch
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/Makefile#L89

> On Tue, Dec 7, 2010 at 8:11 PM, Dagobert <honk...@googlemail.com> wrote:
>> I noticed the testsuite fails on my Solaris 9 i386 host, but shows no
>> errors on Solaris 9 Sparc. My investigation shows that
>> return myIpAddress();
>> in proxy.pac returns different styles:
>> - Sparc: ???;192.168.1.11
>> - i386: 192.168.1.18
>
> This garbled text in ip addresses is a problem. I am surprised that I
> didn't find it earlier. Opened an issue to track this:
> http://goo.gl/ww69d
>
> This change should fix it: http://goo.gl/RFEln. This is in dev clone
> right now. I'll push it to the main branch soon.

Cool!


Best regards

-- Dago


Manu Garg

unread,
Dec 10, 2010, 12:34:32 AM12/10/10
to Dagobert Michelsen, pacp...@googlegroups.com
On Tue, Dec 7, 2010 at 11:33 PM, Dagobert Michelsen <d...@opencsw.org> wrote:
> Hi Manu,
>
> Am 07.12.2010 um 18:30 schrieb Manu Garg:
>> Thanks a lot Dagobert for trying to build pacparser on Solaris and
>> reporting the issues. Comments inline.
>
> I had some more porting issues which are probably not bugs,
> but you may be interested to have a look at the rest of my
> patches:

That's some great work you have done. Really appreciate it. pacpaser
should move to using autotools some day. That will make platform
porting a lot easier. pacparser@, any volunteers? :)

>
> This is about GNU-tar specific flags, va_copy on Solaris, gcc-specific flags
> and a reordering to get -L. before the library in the current directory:
>  http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/pacparser/trunk/files/0001-Adjust-Makefile.patch

Yes. I have already applied your patch from http://goo.gl/HpIeA to the
dev clone. Thanks again for the bug and the fix.

--

Manu Garg

unread,
Dec 13, 2010, 4:02:30 AM12/13/10
to Dagobert Michelsen, pacp...@googlegroups.com
I have cut a new releases (1.2.7), which includes fixes to some of the
issues mentioned in this thread:

[Issue 6]: Wrong argument in freeaddrinfo tries to free nullpointer.
[Issue 7]: resolve_host in pacparser.c returns garbled IP address list.
[Issue 8]: Build tests fail for hosts on 192.* and 10.10.* networks.

Please give it a try.

Dagobert Michelsen

unread,
Dec 14, 2010, 4:13:50 AM12/14/10
to Manu Garg, pacp...@googlegroups.com
Hi Manu,

Am 13.12.2010 um 10:02 schrieb Manu Garg:
> I have cut a new releases (1.2.7), which includes fixes to some of the
> issues mentioned in this thread:
>
> [Issue 6]: Wrong argument in freeaddrinfo tries to free nullpointer.
> [Issue 7]: resolve_host in pacparser.c returns garbled IP address list.
> [Issue 8]: Build tests fail for hosts on 192.* and 10.10.* networks.
>
> Please give it a try.

I removed patches #2 and #8 and the testsuite now runs cleanly on both
Sparc and i386 both for 32 and 64 bit.


Best regards

-- Dago

Reply all
Reply to author
Forward
0 new messages