NetBSD Problem Report #45613
From cheusov@tut.by Mon Nov 14 11:32:28 2011
Return-Path: <cheusov@tut.by>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id C100263B8A8
for <gnats-bugs@gnats.netbsd.org>; Mon, 14 Nov 2011 11:32:27 +0000 (UTC)
Message-Id: <878vnjaqik.fsf@asrock.chizhovka.net>
Date: Mon, 14 Nov 2011 14:32:19 +0300
From: cheusov@tut.by
To: gnats-bugs@gnats.NetBSD.org
Subject: /bin/sh: 'set -e' + 'if eval false' problem
X-Send-Pr-Version: 3.95
>Number: 45613
>Category: bin
>Synopsis: /bin/sh: 'set -e' + 'if eval false' problem
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 14 11:35:00 +0000 2011
>Closed-Date: Wed Dec 21 05:26:38 +0000 2011
>Last-Modified: Wed Dec 21 05:26:38 +0000 2011
>Originator: Aleksey Cheusov
>Release: NetBSD 5.99.56
>Organization:
>Environment:
System: NetBSD asrock.chizhovka.net 5.99.56 NetBSD 5.99.56 (GENERIC) #2: Mon Nov 7 21:06:55 FET 2011 cheusov@asrock.chizhovka.net:/srv/obj-current/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
The following code should print 'Test passed' but doesn't.
I consider this problem as a serious regression since 5.1 and 5.0.
0 cheusov>cat ~/tmp/1.sh
#!/bin/sh
set -e
if eval false; then
echo 'This should not happen'
fi
echo 'Test passed'
0 cheusov>/bin/sh ~/tmp/1.sh
1 cheusov>
>How-To-Repeat:
>Fix:
http://www.freebsd.org/cgi/query-pr.cgi?pr=134881&cat=
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45613 CVS commit: src/bin/sh
Date: Mon, 14 Nov 2011 13:24:45 -0500
Module Name: src
Committed By: christos
Date: Mon Nov 14 18:24:45 UTC 2011
Modified Files:
src/bin/sh: eval.c
Log Message:
PR/45613: Aleksey Cheusov: /bin/sh: 'set -e' + 'if eval false' problem
Fixed from: http://www.freebsd.org/cgi/query-pr.cgi?pr=134881&cat=
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/bin/sh/eval.c
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/45613 CVS commit: src/tests/util/sh
Date: Mon, 14 Nov 2011 15:23:29 -0500
Module Name: src
Committed By: christos
Date: Mon Nov 14 20:23:29 UTC 2011
Modified Files:
src/tests/util/sh: Makefile
Added Files:
src/tests/util/sh: t_evaltested.sh
Log Message:
Add a test for PR/45613 (eval failing in a tested context)
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/util/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/util/sh/t_evaltested.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->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 15 Nov 2011 10:25:08 +0000
State-Changed-Why:
Did christos commit fix the problem for you?
From: cheusov@tut.by
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: Re: bin/45613 /bin/sh: 'set -e' + 'if eval false' problem
Date: Tue, 20 Dec 2011 16:04:08 +0300
Yes, it works fine now.
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 21 Dec 2011 05:26:38 +0000
State-Changed-Why:
fixed.
>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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.