From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id E41D61F8C6 for ; Thu, 19 Aug 2021 20:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234882AbhHSURU (ORCPT ); Thu, 19 Aug 2021 16:17:20 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:60552 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbhHSURS (ORCPT ); Thu, 19 Aug 2021 16:17:18 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 736FE157EB2; Thu, 19 Aug 2021 16:16:41 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=IDGMAfTuBDGm 18MoYYv6w59dhkZjtK0mP0EMCQxWvkk=; b=un+ScOzJ1Sb26PnrwpvDHuTxBdWa vjDObOLUr/QmWbrmud5JtwpptzqA5jQUFOkqwXzBOTvDY0fNNDz84+3ROglvHCpu HqeGbc/sbhPw+6a4/PRcCiR8YCUBUiCekdq44O0ATJ/C67x+r1K/4yC0LuoWkUd4 Sw2M3qs7pL4s3cA= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 6BFB7157EB0; Thu, 19 Aug 2021 16:16:41 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.116.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id B109F157EAF; Thu, 19 Aug 2021 16:16:38 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: =?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZw==?= Danh Cc: git@vger.kernel.org, Johannes Schindelin Subject: Re: [PATCH v2 1/2] t6300: don't run cat-file on non-existent object References: Date: Thu, 19 Aug 2021 13:16:37 -0700 In-Reply-To: (=?utf-8?B?IsSQb8OgbiBUcuG6p24gQ8O0bmc=?= Danh"'s message of "Wed, 18 Aug 2021 12:19:26 +0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 5C1E7560-012A-11EC-A8E6-D5C30F5B5667-77302942!pb-smtp20.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org =C4=90o=C3=A0n Tr=E1=BA=A7n C=C3=B4ng Danh writes= : > In t6300, some tests are guarded behind some prerequisites. > Thus, objects created by those tests ain't available if those > prerequisites is unsatistified. Attempting to run "cat-file" is -> are. > on those objects will run into failure. > > In fact, running t6300 in an environment without gpg(1), > we'll see those warnings: > > fatal: Not a valid object name refs/tags/signed-empty > fatal: Not a valid object name refs/tags/signed-short > fatal: Not a valid object name refs/tags/signed-long > > Let's put those commands into the real tests, in order to: > > * skip their execution if prerequisites aren't satistified. > * check their exit status code > > The expected value for objects with type: commit needs to be > computed outside the test because we can't relies on "$3" there. relies -> rely