From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-6.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 30A0F2070C for ; Wed, 6 Jul 2016 18:24:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbcGFSYB (ORCPT ); Wed, 6 Jul 2016 14:24:01 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:54418 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755676AbcGFSYA (ORCPT ); Wed, 6 Jul 2016 14:24:00 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id DFC682951D; Wed, 6 Jul 2016 14:23:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=6Tonl+I5H4sRcXCjzr7mVSiokJE=; b=KIygKs W435SJGVMZwBtWiQJmA0JZgIKb9i/WLaZp4rAVcYXHdvQpFQ7pAtXTgu0ZfeWFbK mCqmFo9qqZp6YAdYco3C9sJilkL81yPgHhiSCEn6evIDXlIuE0Jx+YKKVFDYyt+k eTOE/NklbcMNOQ6Ny770b0YwhDvOsI01ZKx9c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=G78VgAQJ1YW/LJ5HDXwn/5rOyF0XRziU wAu7UYLucd1hmqXxlJlogAfUSj5+PT+bDeglEvH/ozQ5aS5zIgHCifnuoY8ZLWkz DmjHexA+qrjpikJCLxaV+1Wk9wqPL/OQ7IAdjMDc0ZgbuJ06sangOyoLRB/bdhnK yocG9viT+dk= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id D7F412951C; Wed, 6 Jul 2016 14:23:53 -0400 (EDT) Received: from pobox.com (unknown [104.132.0.95]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 520542951B; Wed, 6 Jul 2016 14:23:53 -0400 (EDT) From: Junio C Hamano To: Armin Kunaschik Cc: Git List , Jeff King Subject: Re: [PATCH] t7610 test for mktemp existence References: <57780F9F.3050802@googlemail.com> Date: Wed, 06 Jul 2016 11:23:51 -0700 In-Reply-To: <57780F9F.3050802@googlemail.com> (Armin Kunaschik's message of "Sat, 2 Jul 2016 21:01:51 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: CB2913B2-43A6-11E6-9DD9-89D312518317-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Armin Kunaschik writes: > Subject: t7610: test for mktemp before test execution > > mktemp is not available on all platforms, so the test > 'temporary filenames are used with mergetool.writeToTemp' > fails there. > This patch does not replace mktemp but just disables > the test that otherwise would fail. > mergetool checks itself before executing mktemp and > reports an error. Thanks. > Signed-off-by: Armin Kunaschik > > --- > > diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh > index 76306cf..9279bf5 100755 > --- a/t/t7610-mergetool.sh > +++ b/t/t7610-mergetool.sh > @@ -589,7 +589,12 @@ test_expect_success 'filenames seen by tools start with ./' ' > git reset --hard master >/dev/null 2>&1 > ' > > -test_expect_success 'temporary filenames are used with mergetool.writeToTemp' ' > +test_lazy_prereq MKTEMP ' > + tempdir=$(mktemp -d -t foo.XXX) && > + test -d "$tempdir" > +' This makes me wonder what would happen to the leftover directory, though. Would it be a better idea to clean it up as well, i.e. tempdir=$(mktemp -d -t foo.XXXXXX) && test -d "$tempdir" && rmdir "$tempdir"