From nobody Thu Nov 03 14:39:53 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N35y164CZz4h8nh; Thu, 3 Nov 2022 14:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N35y15MF6z3g9C; Thu, 3 Nov 2022 14:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667486393; 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; bh=gUqzoyMj/XI6Ri35g7HAzRwmxq1TTKuFjJrgZDu1sNY=; b=RUKbIi7fkYqtcp+MlYwzrBx7TcCw77/w7BZbMQHkAZ1458LUnAH2sJdwdirTsoZTEzHhlm +vgVUVlhYeuLZtQbGdhKY5vAPwzibv4j9oRD3g9/Czvons04MFQk2sVUpFIfcYnjnepaag SKfbZ3S+/hwfkgA76KMhmg0WiAnYyTL5RYn1+GCTYb4n3l9sdbqq11YO/npfSHNvEAIsJB tvIyBoD4XdTWCrxkbg+rswouL+fUucFJ7nJ7SNP01you4GiNTBQ/BCxBIFc1sd3Dq0R7Hs jiahMXkRthmUJ2KsndjKKjQN97KI5QLmZhG7IC0ublR5InrZqRgnjsWkDQlDEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N35y14QxtzfYy; Thu, 3 Nov 2022 14:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2A3Edr50089557; Thu, 3 Nov 2022 14:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A3EdrT8089556; Thu, 3 Nov 2022 14:39:53 GMT (envelope-from git) Date: Thu, 3 Nov 2022 14:39:53 GMT Message-Id: <202211031439.2A3EdrT8089556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d481443acb1c - main - ping_test: Fix tests ping_46 and ping6_46 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d481443acb1c77610ac50a226f402e4629a608fb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667486393; 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; bh=gUqzoyMj/XI6Ri35g7HAzRwmxq1TTKuFjJrgZDu1sNY=; b=WxJffrAxjQgrv2PmqxE3FDNItgKJtEGMv8he7cbj5ritc+EXOUkkNveVbfXDxJSUPnw5RL B9DcDsnK4NOJxSoYZXaCUPqZPpBn6IEWVXCSfy6+r+AKUmabG465RNZV/PN3SSaIVYEsCx xHiI7oaxqAFDHLzn94E5/RU0/HLJZxoVQyKq4Q4y09x4YJ8wNx2Qm7elxRzTHiux8H317a CnsNwIC/6412Oat4CrUmIqThMcDGApjptmmj6Dg2Q+nIIkuI7qA+k5NaPjF6yzmi5YJSiw sqc4vqYV0ERPG4zEZZHwZcZC6ujwj8g9QKKg1HGM+zo7Jm7RixeBm6a5prFjnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667486393; a=rsa-sha256; cv=none; b=iSQ0pJefiDiPBlvTaCR6+jXCoTPDtLg/21Pmi54GFHH01V6XS23YMceNVmvoUksjwzDhHJ wIXbvH6B3yMcYyPVgyxixTEOthsu0z4vnyltMHFf7Pci1NuxctzgHnDmhhifPgfEcF4Zv6 uL3k1alZPQbT9zrXGbnzTNNjskcu0EJye1zb+rBWKNNlwJQANpozoK2vKnyT9yQyFRl+Mu IAcK4VnWZ9iDy8b5KjrV8ND7aNSUP7+cUPcIpERgAAXbUGYVn+OlRJAqAWag8D0NR6CMIu m2KGIPiNQW2XwNOoog+n5Q7UZn3AScoC2Q31AbxmcUyCHNmsTEmMtMEqp9UYsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d481443acb1c77610ac50a226f402e4629a608fb commit d481443acb1c77610ac50a226f402e4629a608fb Author: Jose Luis Duran AuthorDate: 2022-11-02 11:43:40 +0000 Commit: Mark Johnston CommitDate: 2022-11-03 14:39:32 +0000 ping_test: Fix tests ping_46 and ping6_46 If no IPv4-host, IPv4-mcast-group or IPv6-host is passed, it will display the usage. The tests are passing because they are just checking that the exit code is 1. Fix the tests by checking the appropriate output message. While here, change the description to match the output and add the missing requirements. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37250 --- sbin/ping/tests/ping_test.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/ping_test.sh b/sbin/ping/tests/ping_test.sh index 55456a5c86ba..c79a792d0eb0 100644 --- a/sbin/ping/tests/ping_test.sh +++ b/sbin/ping/tests/ping_test.sh @@ -129,20 +129,28 @@ ping6_c1t4_body() ping_46_head() { - atf_set "descr" "-4 and -6 may not be used together" + atf_set "descr" "-4 and -6 cannot be used simultaneously" } ping_46_body() { - atf_check -s exit:1 -e ignore ping -4 -6 + require_ipv4 + require_ipv6 + atf_check -s exit:1 \ + -e match:"-4 and -6 cannot be used simultaneously" \ + ping -4 -6 localhost } ping6_46_head() { - atf_set "descr" "-4 and -6 may not be used together" + atf_set "descr" "-4 and -6 cannot be used simultaneously" } ping6_46_body() { - atf_check -s exit:1 -e ignore ping6 -4 -6 + require_ipv4 + require_ipv6 + atf_check -s exit:1 \ + -e match:"-4 and -6 cannot be used simultaneously" \ + ping6 -4 -6 localhost } atf_init_test_cases()