NetBSD Problem Report #43469
From www@NetBSD.org Mon Jun 14 16:07:46 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id EB1AE63B873
for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Jun 2010 16:07:45 +0000 (UTC)
Message-Id: <20100614160745.5D31B63B11D@www.NetBSD.org>
Date: Mon, 14 Jun 2010 16:07:45 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: tests/util/sh/t_expand:strip fails
X-Send-Pr-Version: www-1.0
>Number: 43469
>Category: bin
>Synopsis: tests/util/sh/t_expand:strip fails
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 14 16:10:01 +0000 2010
>Closed-Date: Mon Apr 04 13:13:36 +0000 2016
>Last-Modified: Mon Apr 04 13:13:36 +0000 2016
>Originator: Antti Kantee
>Release:
>Organization:
>Environment:
>Description:
util/sh/t_expand (160/174): 5 test cases
arithmetic: Passed.
dollar_at: Passed.
dollar_at_with_text: Passed.
strip: Failed: $stripped != ${line%%/\**} (#define bindir "/usr/bin" != #define bindir ")
varpattern_backslashes: Passed.
>How-To-Repeat:
(cd /usr/tests/util/sh ; atf-run t_expand | atf-report)
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43469 CVS commit: src/bin/sh
Date: Tue, 16 Nov 2010 13:17:33 -0500
Module Name: src
Committed By: christos
Date: Tue Nov 16 18:17:32 UTC 2010
Modified Files:
src/bin/sh: parser.c
Log Message:
PR/43469: Antii Kantee: test/util/sh/t_expand:strip fails.
Bring back fixes from revision 1.75:
- Fix a couple of bugs to make the following two echo statements print the
same output as they should:
line='#define bindir "/usr/bin" /* comment */'
echo "${line%%/\**}"
echo ${line%%/\**}
1. ISDBLQUOTE() was not working properly for non VSNORMAL expansions because
varnest was incremented before the variable was completely parsed. Add
an insub adjustment to keep track of that.
2. When we have a quoted backslash, we either need to escape twice, because
one level of escaping will be stripped later (in the variable substitution
case) or simply enter the backslash.
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/bin/sh/parser.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/43469 CVS commit: src/bin/sh
Date: Sat, 20 Nov 2010 18:55:47 +0000
On Tue, Nov 16, 2010 at 06:20:05PM +0000, Christos Zoulas wrote:
> Log Message:
> PR/43469: Antii Kantee: test/util/sh/t_expand:strip fails.
> Bring back fixes from revision 1.75:
for the gnats record, this was reverted again. sh is too fragile...
--
David A. Holland
dholland@netbsd.org
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43469 CVS commit: src/bin/sh
Date: Mon, 22 Feb 2016 15:02:00 -0500
Module Name: src
Committed By: christos
Date: Mon Feb 22 20:02:00 UTC 2016
Modified Files:
src/bin/sh: expand.c parser.c parser.h
Log Message:
PR bin/43469 - correctly handle quoting of the pattern part of ${var%pat}
type expansions. (from kre)
To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/bin/sh/expand.c
cvs rdiff -u -r1.97 -r1.98 src/bin/sh/parser.c
cvs rdiff -u -r1.18 -r1.19 src/bin/sh/parser.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43469 CVS commit: src/tests/bin/sh
Date: Mon, 22 Feb 2016 15:02:30 -0500
Module Name: src
Committed By: christos
Date: Mon Feb 22 20:02:30 UTC 2016
Modified Files:
src/tests/bin/sh: t_expand.sh
Log Message:
PR/43469 has been fixed
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_expand.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 04 Apr 2016 13:13:36 +0000
State-Changed-Why:
Fixed, thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.