From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wE0UC6KUeWFUhAAAgWs5BA (envelope-from ) for ; Wed, 27 Oct 2021 20:04:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2N40BaKUeWFjAQAAbx9fmQ (envelope-from ) for ; Wed, 27 Oct 2021 18:04:18 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CC1711ADC6 for ; Wed, 27 Oct 2021 20:04:17 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C27071F59E; Wed, 27 Oct 2021 14:04:13 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 8E81F1F59D for ; Wed, 27 Oct 2021 14:04:11 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 424E01B002D7; Wed, 27 Oct 2021 21:04:08 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1635357848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9um4OJ366UDaxfBX79eHspLLaPFr8FTpxYuxRUn14Ns=; b=JPRPeBDNvfu0iRUdaaG5lSuHSVaXoULRl/ZGxkwE1Zn1qhqE6PYEPpn5gzFKT6ZrRLqRQ4 ZOmUIHeHsHh2CZrHzJZaHRURluXmly6/Y+2VUfPRNL/NtGytNQbYqCaTkoX6NqHgiiH0hW 00csUFAhqoiQg7FGc7bRUUz3nbvu9eDXDCAMuICtYbxY0e7n2t/1M8z/04or+tqtfozton ydeJ7+CLIHx73KwBw0jQ6p455OMb16hvqb2SxI6ysDvozULwUNuRwtOx8/uzFDinn/nlPr J7zhx7IKHdMI4DDr1vdu+Gp2H89cGQf3dWs9UAMFjsS05+Q3rJk+n/oYJP59xw== From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] test/libconfig: use 'export' when restoring NOTMUCH_CONFIG In-Reply-To: <20211027132040.3652962-1-david@tethera.net> References: <20211027132040.3652962-1-david@tethera.net> User-Agent: Notmuch/0.33+54~gcaf4513 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1635357848; a=rsa-sha256; cv=none; b=F027V14Lavxx8kKnFIIcBwvE84ZIZaE5VCcMKB2tr1RNod3Fy4v9PP1Hsx0MVT9mWMjc7U y8o93psI3UojjFD2J9Rud/3E4cyyTZrRVVvyhBmaj5paLldM/gGpdV6ol26XVC/S3dye+q jHWlNgGUuSz7MOXJ5rIQJ21RKNyzuFNglzHPw9jy/llXaDt5U87joDVBUIHUmWIlz76PmR uzbUs1RPFJ0l4OrID7Z+eVbVdXL3IbLHB/5K5/YICzrdhhOilvX9iKnxeXog+rmwQJ1uxK YmzrNge65TSdy41VDPXFxsRgNk0iLpGsM08MtEzwYjnYD7dzhc0uJfuCvyZkIQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1635357848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9um4OJ366UDaxfBX79eHspLLaPFr8FTpxYuxRUn14Ns=; b=GcD5v3RmiXNL4WQ2rJWXXlBoHRSZZO/OEQbez09EFuLklvRBXMh+FtVinEFFsW/IMyqv7m vK4/wcWAjHLzANo0gdQ9kkTeoJoGDgEA18SzMQlJaVWulGJ/nOqV7Zx+QXk9ftRJxJz1gC WrWh/pA5OdcsFC0m1y1kveksURXwjnPoKM/F08+Cz5QibZw8dX6snxEckox82RoYIUKqL1 t8vvBXCjkk2Inwp/KlVyYsd5Y0vsKNFxtK/wL67lx+jfIDs+dI6VnLO0u8aYHuYA0cdVAf 6LUUdp5JFfcZoHCVs98OxO4RSK53OLxmv7B1sMXebGbkBPWNAbtpnKZrcjXSuw== Message-ID-Hash: V3L35QX6NL6V65ZRFUBTCZSJHEHS6G5G X-Message-ID-Hash: V3L35QX6NL6V65ZRFUBTCZSJHEHS6G5G X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635357857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=hOBko+TBmunLO/EivbW3epBNyIX7LrOWQ9wZ+/zsXFk=; b=MmR2sY0K3ce9+cAbg4EFe3ODv+f5AassXi9z9bcSv7slQnwR9J5Y22scwT+jZZq4ZrhN2J pvuprKGSTtJoWzNvPTRKzAxDLJN6mkSinzygDsUAzORsRuQuFJ+8OexThSGxpifh8H/gkB Ogo3s0a4mu4ia4xFMUrsoqgwv3nuQFzq2zo+c8pxelVP0tIKOZWSCHhfyddWJPryFQuIVp ab7Fw5tqzeh/NGK72cAeBmQf4wiKQvUT7ftoQasdz7xV9B2XbRlEQZW0CVgbWNM93nsw0Z 3e/P5mG9vnCZSH1Wug5NnT7bVJj8gdFIJjySMsvM/pyiHuJkYGdgBhkgpFhVMw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1635357857; a=rsa-sha256; cv=fail; b=Uba78knvwoerX+qPj6n+xqgn03iCed7HXACJyygqQRBKFCrsme+6h7vbOCTVlYDYmRJEcZ YFRqVX/J+tadCYyKolhQ5PrwExYVWs3sUdIb2/Ep234EhC1N6ORNj3XoJB+Z5PHTirq7Q/ v2xpH6OBc7E1XAmDrLtw1j8jhHjNDsboUMwairIeUQwQjT7ZjkeVNKGsjqAZMhD2e0eg+X jzGh9pg0rWg+HJxlSVPRvVjo0+bSNS4NXS4jnjF3jR27vnbnmYH+qPxXdty9MVQtmq11k2 oh0lavdzHCN3pT2mF3FmCsm+8gokJFovFopTL2NVeTGaErPtQyzP/4ECZkzbUQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=JPRPeBDN; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 1.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=JPRPeBDN; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: CC1711ADC6 X-Spam-Score: 1.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: s/uYZmLNwos6 On Wed, Oct 27 2021, David Bremner wrote: > This is required when NOTMUCH_CONFIG has been unset, and is harmless > otherwise. LGTM. Tested w/ the following than the commit message is correct: (works the same way w/ dash, bash and zsh) --8<----8<----8<----8<-- export FOO FOO=1 sh -c 'echo $FOO' FOO=2 sh -c 'echo $FOO' --8<----8<----8<----8<-- > --- > test/T590-libconfig.sh | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh > index 59b82a6f..a9566c13 100755 > --- a/test/T590-libconfig.sh > +++ b/test/T590-libconfig.sh > @@ -461,7 +461,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL% > } > EOF > rm -f ${ovconfig} > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > cat <<'EOF' >EXPECTED > == stdout == > test.key1 = overridden-home > @@ -488,7 +488,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL% > } > EOF > rm -f ${ovconfig} > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > cat <<'EOF' >EXPECTED > == stdout == > test.key1 = overridden-xdg > @@ -515,7 +515,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% work > } > EOF > rm -f ${ovconfig} > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > cat <<'EOF' >EXPECTED > == stdout == > test.key1 = overridden-xdg-profile > @@ -541,7 +541,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% work > } > EOF > #rm -f ${ovconfig} > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > cat <<'EOF' >EXPECTED > == stdout == > test.key1 = overridden-profile > @@ -559,7 +559,7 @@ cat c_head - c_tail <<'EOF' | test_C %NULL% '' %NULL% > printf("NOT RUN"); > } > EOF > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > cat <<'EOF' >EXPECTED > == stdout == > == stderr == > @@ -604,7 +604,7 @@ cat c_head - c_tail <<'EOF' | test_C %NULL% '' %NULL% > printf("test.key2 = %s\n", val); > } > EOF > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > unset NOTMUCH_DATABASE > cat <<'EOF' >EXPECTED > == stdout == > @@ -783,7 +783,7 @@ cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL% > } > EOF > rm -f ${ovconfig} > -NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > +export NOTMUCH_CONFIG=${old_NOTMUCH_CONFIG} > cat <<'EOF' >EXPECTED > == stdout == > test.key1 = overridden-home > -- > 2.33.0 > > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org