From nobody Mon Jul 11 19:58:09 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 F299912ADED7; Mon, 11 Jul 2022 19:58:09 +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 4LhZSK6XRnz3ggh; Mon, 11 Jul 2022 19:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657569489; 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=j9N5Pmvrt+h94hHUN6TZH/gqFV5kaEiiIwq0o8LhyAU=; b=lM+hsPuHGlG0FdVaC4O5pBc2L7du3qbqY1VrgUEfXko7cEslbyGCl3q6DVWS6B+wxuc7LG PlzB6JTzq53AtDlg8XWVq1Na1qZ4e950RC8TLkp0f0SguHZRF5o8yMVZo9D6tijckMUJvP kNG+8x4qvuyKAmouWrOT2yApsWhSmHdwQURAFAWrGDAjF4aYR08i+f1wpiHDQVIbUgVi/3 DWYFqkeSmzpnwfJOGtsmi5knR45pF0zpYReuxpw+fJd8ekRyUednu64bCX6mNusiIh7G7Q uNkyz2kzygo/DCzPJXq1U1nJkjfk0VdOAkMPvje9R0iBpP19bV5EJxBFeKC91w== 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 4LhZSK5TPyzGJG; Mon, 11 Jul 2022 19:58:09 +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 26BJw9io002940; Mon, 11 Jul 2022 19:58:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BJw9nS002939; Mon, 11 Jul 2022 19:58:09 GMT (envelope-from git) Date: Mon, 11 Jul 2022 19:58:09 GMT Message-Id: <202207111958.26BJw9nS002939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6d1471fda81a - main - pf tests: support packet size range in pft_ether.py 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d1471fda81adcab5c7098f262c9e07b2d6a9fbb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657569489; 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=j9N5Pmvrt+h94hHUN6TZH/gqFV5kaEiiIwq0o8LhyAU=; b=Th8QVQpS97uSAT3RGsCXOENuMJYF7SQGrycjdAJMlvB3xdfvItEdMJPCsaWZDHyMJPhcht z+kl1IFVohH6mY2eCUMl8NAJQl7qIAmGcT932dxuE3cXv5faESRPwhg6Sd6fSkapU3xOoq F85cBrTEjIYaXwKayIAoYPEAid2wZSrH36jgM7kF9zuL7EVUi4WT9a+cpCKJQtn8tugjd0 kI7YBirlct5lvTc26fSD13lytZ9Q7vvS0H9TSgOyTHvFYYSt/iVUN20kZJ8Bjri+H/FUv+ c10OuBf2AqjD9sd8VnUrP+uuu/6gBPS1K+sYwEBjbzIX4JeCm+ZzE4VuKAPxVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657569489; a=rsa-sha256; cv=none; b=hIrIo2MimXyHxtC8+SppB4aSOPh/Q5N0uKZ3tSNtKbebdrHeyfR8vvAY+Mpt7ZUZYWZUOC Re18VC5FMJ0pEcAd6Jrat12xJBExhXLC+UcgzrCyWKXX9j0CpxkM23iUpS1O/4HgeIAXaE neiqkqPRmnjhpjJQ87RaOLzFLqjgl+fo3uwqbFwqsZ9XIPrW72QZf/xd9aVqqn3EvD3lfp 5hRnmlGF9cGBQavqFFxWKXOScP5+CsV855jndt/gNXW7+Tbu4lh4i2qkp1mI0oIvMqAqB7 CzvOdIIM7ByKo9thRweZ69gHPTn9a9zjVT7D041hEMa1TyMX35FTloAleEuPAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d1471fda81adcab5c7098f262c9e07b2d6a9fbb commit 6d1471fda81adcab5c7098f262c9e07b2d6a9fbb Author: Kristof Provost AuthorDate: 2022-07-11 10:17:56 +0000 Commit: Kristof Provost CommitDate: 2022-07-11 17:55:26 +0000 pf tests: support packet size range in pft_ether.py Teach pft_ether.py to send a range of packet sizes. Use this to move the size sweep into Python, removing the repeated Python startup overhead and greatly speeding up the pf.ether.short_pkt test. This should fix test timeouts seen on ci.freebsd.org. While here also extend the range of packet sizes tested, because it adds very little runtime now. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/ether.sh | 11 ++++------- tests/sys/netpfil/pf/pft_ether.py | 7 ++++++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh index 7fd55a5d78b5..0fe5069cf74c 100644 --- a/tests/sys/netpfil/pf/ether.sh +++ b/tests/sys/netpfil/pf/ether.sh @@ -668,13 +668,10 @@ short_pkt_body() # Try sending ever shorter ping requests # BPF won't let us send anything shorter than an Ethernet header, but # that's good enough for this test - for i in `seq 46 14` - do - $(atf_get_srcdir)/pft_ether.py \ - --sendif ${epair}a \ - --to 192.0.2.2 \ - --len ${i} - done + $(atf_get_srcdir)/pft_ether.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --len 14-64 } short_pkt_cleanup() diff --git a/tests/sys/netpfil/pf/pft_ether.py b/tests/sys/netpfil/pf/pft_ether.py index 1892e0a8f95e..4efb974f7897 100644 --- a/tests/sys/netpfil/pf/pft_ether.py +++ b/tests/sys/netpfil/pf/pft_ether.py @@ -61,7 +61,12 @@ def main(): args = parser.parse_args() - ping(args.sendif[0], args.to[0], int(args.len[0])) + if '-' in args.len[0]: + s=args.len[0].split('-') + for i in range(int(s[0]), int(s[1]) + 1): + ping(args.sendif[0], args.to[0], i) + else: + ping(args.sendif[0], args.to[0], int(args.len[0])) if __name__ == '__main__': main()