[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [busybox] `cp' bug: Small test suite.

On Wed Jan 26, 2000 at 06:35:42PM -0800, Karl M. Hegbloom wrote:
>  I've begun writing a small test setup for `busybox'.  It's
>  implemented in `make'.  Here's the output of the first successful
>  run, which demonstrates the bug I was talking about.  I know what is
>  wrong, and plan to fix it.  I will mail a patch; give me a few days;
>  I'm a novice.  I'll put the test suite up also, when it's ready.
>  There are a lot of test cases for `cp'.  It will take a while to
>  write one up for every path through the code.
>  I guess that eventually what this test setup should do is direct the
>  `ls -l' output into a file, then `diff' the results of GNU `cp' with
>  those of BusyBox `cp'.  Any difference would indicate an error in
>  BusyBox.  It will be simple to add a test for any other of BusyBox's
>  $0's that might need one; just write a makefile chunk and plug it in.

Great, thanks!  I actually already stated doing this.  See reg_test.sh
in the busybox directory.  Does just what you describe.

>  Look closely at the last two sections, where BusyBox `cp' sets the
>  permissions of `afile', the thing that the symlink points to, to the
>  modes of the symlink.  `chmod' follows links; the error (one of
>  several I've found over the last two days) is in
>  `utility.c:copyFile'.

Cool.  Thanks for finding this. I'll add this test to reg_test.sh 
and then take a look at fixing it (unless you or somebody else beats
me to the fix).


Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

Reply to: