NetBSD Problem Report #49720

From dholland@macaran.localdomain  Thu Mar  5 03:56:04 2015
Return-Path: <dholland@macaran.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AD348A567D
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  5 Mar 2015 03:56:04 +0000 (UTC)
Message-Id: <20150305035611.8AAEA6E263@macaran.localdomain>
Date: Wed,  4 Mar 2015 22:56:11 -0500 (EST)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@NetBSD.org
Subject: make -k succeeds improperly on certain rules
X-Send-Pr-Version: 3.95

>Number:         49720
>Category:       bin
>Synopsis:       make -k succeeds improperly on certain rules
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rillig
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 05 04:00:00 +0000 2015
>Closed-Date:    Sat Feb 12 13:19:04 +0000 2022
>Last-Modified:  Sat Feb 12 20:10:01 +0000 2022
>Originator:     David A. Holland
>Release:        NetBSD 7.99.1 (20141024 (?))
>Organization:
>Environment:
System: NetBSD macaran 7.99.1 NetBSD 7.99.1 (MACARAN) #22: Fri Oct 24 18:32:54 EDT 2014 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:

Even though make -k is supposed to continue on error, in order to
build parts of the dependency graph not directly affected by a
failure, it's not supposed to call that "success" afterwards.

However, it's suppressing the error condition in some cases.

>How-To-Repeat:

Makefile:
   ------
reboom: boom
boom:
	false
   ------

then:
	% make -k boom; echo $?
	false
	*** Error code 1 (continuing)


	Stop.
	make: stopped in /tmp/muckle
	Exit 1
	1

which is as one would expect, as is:
	% make -j1 -k boom ; echo $?
	false
	*** [boom] Error code 1

	make: stopped in /tmp/muckle
	Exit 1
	1

(although the varying insertion of blank lines seems like a bug in its
own right)

but this seems wrong:
	% make -k reboom; echo $?
	false
	*** Error code 1 (continuing)
	`reboom' not remade because of errors.
	0

and doesn't happen in parallel mode:
	% make -j1 -k reboom; echo $?
	false
	*** [boom] Error code 1

	make: stopped in /tmp/muckle
	Exit 1
	1

(this is not because parallel mode -k fails to continue as -k is
supposed to, as can be readily checked by adding more stuff to the
makefile.)

>Fix:

dunno but I'll probably look into it eventually if nobody else gets
there first.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: bin-bug-people->rillig
Responsible-Changed-By: rillig@NetBSD.org
Responsible-Changed-When: Sat, 12 Feb 2022 01:48:36 +0000
Responsible-Changed-Why:
I'll take it.


State-Changed-From-To: open->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sat, 12 Feb 2022 13:19:04 +0000
State-Changed-Why:
Was fixed in compat.c 1.199 from 2020-12-07.  Thanks for the PR.
Will be included in NetBSD 10.


From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49720 CVS commit: src
Date: Sat, 12 Feb 2022 13:17:57 +0000

 Module Name:	src
 Committed By:	rillig
 Date:		Sat Feb 12 13:17:57 UTC 2022

 Modified Files:
 	src/distrib/sets/lists/tests: mi
 	src/usr.bin/make/unit-tests: Makefile
 Added Files:
 	src/usr.bin/make/unit-tests: opt-keep-going-indirect.exp
 	    opt-keep-going-indirect.mk

 Log Message:
 tests/make: document the history of bugs in '-k' mode

 Reported in PR#49720 in 2015, fixed independently in compat.c 1.199 from
 2020-12-07.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1187 -r1.1188 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.308 -r1.309 src/usr.bin/make/unit-tests/Makefile
 cvs rdiff -u -r0 -r1.1 \
     src/usr.bin/make/unit-tests/opt-keep-going-indirect.exp \
     src/usr.bin/make/unit-tests/opt-keep-going-indirect.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49720 CVS commit: src/usr.bin/make/unit-tests
Date: Sat, 12 Feb 2022 20:05:36 +0000

 Module Name:	src
 Committed By:	rillig
 Date:		Sat Feb 12 20:05:36 UTC 2022

 Modified Files:
 	src/usr.bin/make/unit-tests: opt-keep-going-indirect.mk

 Log Message:
 tests/make: clean up comments in test for indirect -k failures

 See PR#49720.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 \
     src/usr.bin/make/unit-tests/opt-keep-going-indirect.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.