> X-Original-To: ksh93-integration-discuss at opensolaris.org
> Delivered-To: ksh93-integration-discuss at opensolaris.org
> Date: Tue, 30 Jan 2007 01:00:20 +0100
> From: Roland Mainz <roland.mainz at nrubsig.org>
> 
> > >>2 - Are there any unit tests?
> > >
> > >What do you mean with "unit tests" ?
> > >
> > Are you serious??
> 
> Erm, yes I am serious since I don't know the exact term "unit tests". I
> am not a native english speaker and try to be carefull before answering
> something completely wrong. With "unit tests" you mean "test suite for
> |wordexp()|", right ?
> 
> > Call me pig headed, but in my shop, code never gets
> > written or changed before there are unit tests for it.  If nothing else
> > when working with legacy code, tests can be used to document the
> > expected behaviour of the code under test.
> 
> If you're asking for a "test suite" for |libc::wordexp()|: glibc has one
> and April has another set of tests. But the more important issue is that
> it works propperly with SMF. This is the real "trap" where the various
> OpenSolaris distributions are suffering from and that's why we have it
> in the tree (and SMF is the only consumer of |libc::wordexp()| in
> Solaris and Google codesearch lists lots of implementations but no
> users...).

For wordexp() we use the VSX standards test suite for standard interfaces,
but at this point, it would be tested against the original code only
(code outside of the #ifdef WORDEXP_KSH93), since that will be compiled by
default.  The new #ifdef'd code in wordexp.c is only for those users
who wish to build with ksh93 as the default /usr/bin/ksh.  
When we move further along with transitioning /usr/bin/ksh, we will
need to make sure the new wordexp() passes VSX.

> 
> > >>5 - The duplication highlighted in point 4 will be a maintenance headache.
> > >
> > >AFAIK no since at some point we get rid of the old one.
> > 
> > Sooner rather than later, I hope.
> 
> Yes, but my current focus is the putback of ksh93. The |libc::wordexp()|
> thing was tacked-on later because the OpenSolaris distributions need it
> desperately.
> 
> > >>6 - 109, are multiple variables declared in one line acceptable?
> > >
> > >cstyle says "yes"... :-)
> > 
> > Yuck.
> 
> Why ? Sometimes it's usefull, sometimes it's just ugly. I've seen
> worse... MUCH worse things... =:-)
> 
> > >>If so,
> > >>to which one does the comment apply?
> > >
> > >To all three variables. They track the buffer itself and two working
> > >pointers .
> > >
> > Then neither the names or the comment are very helpful.
> 
> Tell that the original author of |wordexp()| ... :-)
> 
> > >[1]=Note: Am am planning to rewrite the function from scratch at a later
> > >date after this putback... the current version is only a quick solution
> > >to help non-Solaris OpenSolaris distributions to use SMF without having
> > >to rely on the old ksh stuffed in /usr/bin/ksh (and to help us
> > >collecting data for the /usr/bin/ksh migration to ksh93).
> >
> > When you do, don't forget the tests!
> 
> Well, I wish Sun would make their tests OpenSource... but that is AFAIK
> one of the future "ToDo" items which come after our putback...

We do not have the rights to release any of the standards tests, which
are owned by the Open Group. 

> 
> ----
> 
> Bye,
> Roland
> 
> -- 
>   __ .  . __
>  (o.\ \/ /.o) roland.mainz at nrubsig.org
>   \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
>   /O /==\ O\  TEL +49 641 7950090
>  (;O/ \/ \O;)
> _______________________________________________
> ksh93-integration-discuss mailing list
> ksh93-integration-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss


Reply via email to