New webrev at:

  http://jurassic.us.oracle.com/~richb/7183526-v2/

(I'll update the diffs in the Bugster CR when you are happy with them).


On 09/05/2012 02:24 PM, Danek Duvall wrote:
Rich Burridge wrote:

    http://jurassic.us.oracle.com/~richb/7183526-v1/
Makefile:

   - line 45-46:  How about something like:

         # If SHELLOPTS is exported (as it is by the userland makefiles),
         # then all shell options get exported to child invocations of bash,
         # which results in test failures due to nounset and xtrace being
         # set unexpectedly, and errors such as "$1: unbound variable" and
         # diffs failing due to script tracing in output files.

Looks good. So changed.(I've also make a similar change to the coreutils Makefile,
but haven't respun a new webrev for it yet).


   - line 49: I think it's the case that the things being tested are
     actually pulled from the build area, but the scripts run in the course
     of the tests may rely on things that aren't in /usr/bin.  That made
     more sense for coreutils, where it relied on GNU coreutils instead of
     the Solaris commands; I don't really understand what it needs from the
     build area for gzip.  Or does it really only test the component once
     it's installed?

The problem here is the test scripts are looking for names like 'zdiff'
whereas, by the time the binaries have been installed in the proto
area (or if we were getting them from the /usr/bin), then name has
a g prepended (i.e. 'gzdiff). Getting them from the build area allows
us to get the binary names that the scripts are expecting.


   - line 50: could you pull from the proto area's usr/bin directory
     instead?  Every component will have its executables in different
     locations in the build area, but the executables in the proto area
     should generally be in consistent locations, and it would be nice to
     have this line be consistent across components.

See above.


   /net/stard.us.oracle.com/tank/ws/UL/7183526/components/gzip/test-trans.txt
   - I see that the zgrep-f test is skipped because we're using Solaris
     grep, which doesn't grok the -f option.  It looks like we're patching
     the test to force the use of /usr/gnu/bin/grep, but it's not working,
     probably because the test framework checks for a -f-supporting grep
     before running the test (see init.cfg).  You could set PATH to include
     /usr/gnu/bin or /usr/xpg4/bin before /usr/bin for the test run, or
     patch zgrep to make sure that a POSIX-compliant grep is used.  The
     latter might be nicer, since it would then not require gnu coreutils
     to be installed -- it could check for grep from /usr/gnu/bin, then
     /usr/xpg4, and finally /usr/bin.

I think I need both. I certainly just tried adjusting PATH in zgrep.in to
prepend '/usr/xpg4/bin'and the test was still skipped. Also adding it
to the PATH via COMPONENT_TEST_ENV in the Makefile now successfully
runs that test. New test output in:

/net/stard.us.oracle.com/tank/ws/UL/7183526/components/gzip/test-trans.txt


   - Did the zdiff test fail the first time through (test-trans.txt.prev)
     because SHELLOPTS was still defined?

No. SHELLOPTS definitely wasn't defined at this point (because when it
was defined, the 'help-version' testing was FAILing too. I think this was
from a test run where I hadn't yet added the build directory to the test $PATH.

Thanks for the review.

_______________________________________________
userland-discuss mailing list
userland-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/userland-discuss

Reply via email to