Re: SED regression

2002-12-05 Thread Tim Robbins
On Thu, Dec 05, 2002 at 11:49:01PM +0900, FUJISHIMA Satsuki wrote:

> Does anyone see this?
> both -CURRENT and -STABLE fail at the same place.
> 
> note: GNU sed 3.02 from ports passed this test.
> 
> /usr/src/tools/regression/usr.bin/sed$ make
> Running test G
> PASS: Test G detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test P
> PASS: Test P detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test psl
> PASS: Test psl detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test bcb
> PASS: Test bcb detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test y
> --- regress.y.out Fri Jun 28 01:07:51 2002
> +++ - Thu Dec  5 23:26:19 2002
> @@ -1 +1 @@
> -fOO
> \ No newline at end of file
> +fOO
> FAIL: Test y failed: regression detected.  See above. (in 
>/usr/src/tools/regression/usr.bin/sed)
> *** Error code 1
> 
> Stop in /usr/src/tools/regression/usr.bin/sed.

Our current behaviour is correct according to the relevant standards,
but it is not what a user might expect. The problem was that sed
previously stored the last newline of a space (pattern/hold), but now
it is implicit. This makes it easier to implement many of the commands
that were wrong in earlier releases of FreeBSD and were hacked around
(see process.c revision 1.4, for example).

We do need to restore support for missing newlines at EOF, though, but
it's not a very high priority.


Tim

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: SED regression

2002-12-05 Thread Juli Mallett
* De: Ruslan Ermilov <[EMAIL PROTECTED]> [ Data: 2002-12-05 ]
[ Subjecte: Re: SED regression ]
> But I'm pretty confident that what we do now is correct, and it seems to
> be in agreement with POSIX.1-2001, which says:

Feel free to regenerate regress.y.out or whatnot then...  Really should add
a "regenerate" thing to the regression stuff some time, wouldn't be hard...

Thanks,
juli.
-- 
Juli Mallett <[EMAIL PROTECTED]>
OpenDarwin, Mono, FreeBSD Developer.
ircd-hybrid Developer, EFnet addict.
FreeBSD on MIPS-Anything on FreeBSD.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: SED regression

2002-12-05 Thread Ruslan Ermilov
On Thu, Dec 05, 2002 at 11:49:01PM +0900, FUJISHIMA Satsuki wrote:
> Does anyone see this?
> both -CURRENT and -STABLE fail at the same place.
> 
> note: GNU sed 3.02 from ports passed this test.
> 
> /usr/src/tools/regression/usr.bin/sed$ make
> Running test G
> PASS: Test G detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test P
> PASS: Test P detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test psl
> PASS: Test psl detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test bcb
> PASS: Test bcb detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
> Running test y
> --- regress.y.out Fri Jun 28 01:07:51 2002
> +++ - Thu Dec  5 23:26:19 2002
> @@ -1 +1 @@
> -fOO
> \ No newline at end of file
> +fOO
> FAIL: Test y failed: regression detected.  See above. (in 
>/usr/src/tools/regression/usr.bin/sed)
> *** Error code 1
> 
> Stop in /usr/src/tools/regression/usr.bin/sed.
> 
The usr.bin/sed/process.c,v 1.21 change is responsible for the "breakage":

: revision 1.21
: date: 2002/06/22 01:42:26;  author: tjr;  state: Exp;  lines: +10 -11
: Don't store newlines at the end of each line in the hold/pattern spaces,
: instead add the newline when the pattern space is printed. Make the `G' and
: `H' commands add a newline to the space before the data, remove bogus
: addition of newline from `x' command.
: 
: PR:   29790, 38195

But I'm pretty confident that what we do now is correct, and it seems to
be in agreement with POSIX.1-2001, which says:

: In default operation, sed cyclically shall append a line of input,
: less its terminating , into the pattern space.
: ...
: Whenever the pattern space is written to standard output or a named
: file, sed shall immediately follow it with a .

(This regression test turned into a failure only after a
contrib/diff/util.c,v 1.5 commit.)


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age



msg48149/pgp0.pgp
Description: PGP signature


SED regression

2002-12-05 Thread FUJISHIMA Satsuki
Does anyone see this?
both -CURRENT and -STABLE fail at the same place.

note: GNU sed 3.02 from ports passed this test.

/usr/src/tools/regression/usr.bin/sed$ make
Running test G
PASS: Test G detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
Running test P
PASS: Test P detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
Running test psl
PASS: Test psl detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
Running test bcb
PASS: Test bcb detected no regression. (in /usr/src/tools/regression/usr.bin/sed)
Running test y
--- regress.y.out   Fri Jun 28 01:07:51 2002
+++ -   Thu Dec  5 23:26:19 2002
@@ -1 +1 @@
-fOO
\ No newline at end of file
+fOO
FAIL: Test y failed: regression detected.  See above. (in 
/usr/src/tools/regression/usr.bin/sed)
*** Error code 1

Stop in /usr/src/tools/regression/usr.bin/sed.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message