On Friday 18 April 2008 20:36:18 Irene Huang wrote:
> just found out that some of the ipc test cases failed because the
> ls/shell implementation on Solaris is different from that on linux.
>
> if /tmp/testpipe does not exist
> On Solaris sh, "ls /tmp/testpipe &> /dev/null" returns 0
> While on linux, it returns a non-zero value as expected.
>
> If the test is all about deciding whether /tmp/testpipe exists or not,
> I'd suggest using
>
> fail_unless(system("test -p /tmp/testpipe") == 0, NULL);
> to make sure that the pipe /tmp/testpipe exists
>
> fail_unless(system("test -p /tmp/testpipe") != 0, NULL);
> to make sure it doesn't exist.
>
> Any comments?
I was never satisfied with all those system() calls in the testing code -
since this break the portability for sure in some places - like in this case.
We should try to get rid of all system(), if possible.
There are some tests which make use of system("diff ...."); which is very
likely not that trivial to get rid off.
I'll try to come up with some trivial patch to get rid of system calls which
check for existing directories/files. So this will also work in Windows -
hopefully ;)
Thanks for finding this!
best regards,
Daniel
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel