X-Original-To: bind9-public@bugs.isc.org Message-ID: <20170724091140.0A3737F799E7@rock.dv.isc.org> From marka@isc.org Mon Jul 24 09:11:44 2017 Return-Path: X-Spam-Status: No, score=-1.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, MISSING_HEADERS,RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.0 X-RT-Incoming-Encryption: Not encrypted content-type: text/plain; charset="utf-8" X-RT-Original-Encoding: utf-8 Subject: Re: [ISC-Bugs #45602] rrchecker system test improperly handles some failures Date: Mon, 24 Jul 2017 19:11:40 +1000 X-RT-Interface: Email X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org CC: bind9-public@isc.org In-Reply-To: Your message of "Mon, 24 Jul 2017 19:08:46 +1000." From: "Mark Andrews" Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.pao1.isc.org", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by bugs.isc.org (Postfix) with ESMTPS id A61DFD78A91 for ; Mon, 24 Jul 2017 09:11:44 +0000 (UTC) Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 9D5C8349315 for ; Mon, 24 Jul 2017 09:11:42 +0000 (UTC) Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 8B262160041 for ; Mon, 24 Jul 2017 09:11:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 5132C16004A for ; Mon, 24 Jul 2017 09:11:42 +0000 (UTC) Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GuQCFY2oflZT for ; Mon, 24 Jul 2017 09:11:42 +0000 (UTC) Received: from rock.dv.isc.org (c27-253-115-14.carlnfd2.nsw.optusnet.com.au [27.253.115.14]) by zmx1.isc.org (Postfix) with ESMTPSA id EC816160041 for ; Mon, 24 Jul 2017 09:11:41 +0000 (UTC) Received: from rock.dv.isc.org (localhost [IPv6:::1]) by rock.dv.isc.org (Postfix) with ESMTP id 0A3737F799E7 for ; Mon, 24 Jul 2017 19:11:40 +1000 (AEST) Delivered-To: bind9-public@bugs.isc.org RT-Message-ID: Content-Length: 1960 Mark Andrews writes: > > In message , "Michal Kepien via RT" writes: > > Most contemporary shells execute each command of a multi-command > > pipeline in a subshell environment. Environment variables set inside a > > subshell do not affect the parent shell's environment. Meanwhile, the > > rrchecker system test sets the ret variable inside a while loop which is > > the last command in a pipeline. Thus, while error messages will be > > printed out when named-rrchecker encounters a problem, these problems > > will not affect the result of the system test. > > The shell is broken if { } fails to update the variable. If ( ) > was being used then you would have a point. (list) list is executed in a subshell environment (see COMMAND EXECUTION ENVIRONMENT below). Variable assignments and builtin commands that affect the shell's environment do not remain in effect after the command completes. The return status is the exit status of list. { list; } list is simply executed in the current shell environment. list must be terminated with a newline or semicolon. This is known as a group command. The return status is the exit status of list. Note that unlike the metachar- acters ( and ), { and } are reserved words and must occur where a reserved word is permitted to be recognized. Since they do not cause a word break, they must be separated from list by whitespace. > > This issue seems to be have been present in the code ever since > > named-rrchecker was added by commit 49c1e0d18d. > -- > Mark Andrews, ISC > 1 Seymour St., Dundas Valley, NSW 2117, Australia > PHONE: +61 2 9871 4742 INTERNET: marka@isc.org -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org