sript (Perl) test code needed (was: How to build JDK15 on AMD64 with FreeBSD?)

Roman Neuhauser neuhauser at sigpipe.cz
Thu Jun 30 10:29:29 GMT 2005


# obrien at freebsd.org / 2005-06-29 15:10:47 -0700:
> On Sat, Jun 25, 2005 at 10:23:56PM -0600, Greg Lewis wrote:
> > and follow the instructions.  There is one caveat on amd64 -- one of the
> > build commands will fail strangely (this is a bug in the Linux emulation
> > on amd64 as far as I can determine).
> 
> I know this should be trivial to do in perl and maybe someone here has the
> time to hack it up.  I want a small test script (actually some other
> scripting language than perl preferred).
> 
> The script should run the following commands until an error is returned:
> 
>     ls
>     ls .
>     ls ./
>     ls ./.
>     ls ././
>     ls ././.
>     ls ./././
>     etc...
> 
> and when the error occurs print out the length of the command line.
> I want to get the bottom of the "command too long" issue that causes too
> much trouble deploying Java on FreeBSD/AMD64.

    This prints the length of the argument (add 3 for "ls "), works in
    zsh:

    setopt ksh_arrays
    p=; i=0; c=(. /);
    while ls $p; do
        p=$p${c[i++ % 2]};
    done >/dev/null 2>&1;
    echo $i ${#p}

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991


More information about the freebsd-amd64 mailing list