bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils 5.0 failed rm3 and rm5 tests


From: Jim Meyering
Subject: Re: coreutils 5.0 failed rm3 and rm5 tests
Date: Wed, 14 May 2003 08:15:43 +0200

Tony Leneis <address@hidden> wrote:
> I built coreutils 5.0 on a Tru64 4.0F system, and it fails the rm3 and rm5
> tests; however, I'm not sure it's a problem with rm.  The output from make
> check shows a blank line missing from the output of rm:
>
> out exp differ: char 1, line 1
> --- out 2003-04-08 21:58:01.000000000 -0700
> +++ exp 2003-04-08 21:58:01.000000000 -0700
> @@ -1,4 +1,3 @@
> -
>  rm: descend into directory `z'
>  rm: remove directory `z'
>  rm: remove directory `z/d'
> FAIL: rm3
> PASS: rm4
> cmp: EOF on exp
> --- out 2003-04-08 21:58:02.000000000 -0700
> +++ exp 2003-04-08 21:58:02.000000000 -0700
> @@ -1,4 +1,3 @@
>  rm: descend into directory `d'
>  rm: remove directory `d/e'
>  rm: remove directory `d'
> -
> FAIL: rm5

Thanks for the report.
The problem is that you're using Tru64's buggy version of sed.
Note the comment in each of those scripts,

  # The following loses with Tru64's sed, since that sed mistakenly
  # tacks a newline onto the end of the file.
  tr '?' '\012' < out |sed 's/^ //' > o2

The problem is that given input without a newline at the end,
that version of sed appends one.

> I think the problem is in the test harness - it's not taking into account
> the final line from rm that ends in "? ".  When it runs tr that gets
> converted into "\n " (i.e. the last line of the file contains only a space)
> which sed then turns into an empty line.  The simple solution, I suspect,
> is to simply add a blank line when creating the exp files in both the rm3
> and rm5 test scripts.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]