Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2221470/?format=api
{ "id": 2221470, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221470/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260409132649.8571-1-fw@strlen.de/", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/1.1/projects/26/?format=api", "name": "Netfilter Development", "link_name": "netfilter-devel", "list_id": "netfilter-devel.vger.kernel.org", "list_email": "netfilter-devel@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260409132649.8571-1-fw@strlen.de>", "date": "2026-04-09T11:58:47", "name": "[nft] tests: py: don't use a fixed filename", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "85fbfdb9ca04a64a1c4e5a94cde6803cee97df7c", "submitter": { "id": 1025, "url": "http://patchwork.ozlabs.org/api/1.1/people/1025/?format=api", "name": "Florian Westphal", "email": "fw@strlen.de" }, "delegate": { "id": 11902, "url": "http://patchwork.ozlabs.org/api/1.1/users/11902/?format=api", "username": "strlen", "first_name": "Florian", "last_name": "Westphal", "email": "fw@strlen.de" }, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260409132649.8571-1-fw@strlen.de/mbox/", "series": [ { "id": 499302, "url": "http://patchwork.ozlabs.org/api/1.1/series/499302/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499302", "date": "2026-04-09T11:58:47", "name": "[nft] tests: py: don't use a fixed filename", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499302/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221470/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221470/checks/", "tags": {}, "headers": { "Return-Path": "\n <netfilter-devel+bounces-11768-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "netfilter-devel@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11768-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.216.245.30", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fs1700qnsz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 23:31:40 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 8B6DD3050A23\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 9 Apr 2026 13:26:59 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CE77B2749DC;\n\tThu, 9 Apr 2026 13:26:58 +0000 (UTC)", "from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc\n [91.216.245.30])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 1362321771B\n\tfor <netfilter-devel@vger.kernel.org>; Thu, 9 Apr 2026 13:26:56 +0000 (UTC)", "by Chamillionaire.breakpoint.cc (Postfix, from userid 1003)\n\tid DB70B60636; Thu, 09 Apr 2026 15:26:54 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775741218; cv=none;\n b=g8/W7onNOqxpm8PT4ruS8pS6zBGo3aLutMKh0zvKcRxzipfHjCScgs+vks/1iAxc/JBrdMlh2/WKR4gBu4RAxvDRwmohyCirQPxG5/KZJDV1NJAoJO/HFCGQRH5fKISAQFrj63CTeQNLseiemDtEuSamqQeTV41AM+GeP4JmMpA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775741218; c=relaxed/simple;\n\tbh=I/kljcSCxDcjv4VxTrdEkqEAQo4Zr1vYKOimfwifzE0=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=nSWMZCtKW4VEKuw5WnU2WQEpmO2pkYjeYeUlUQcfbwRzyXoSt8ftUrUO19eHank8zD8mrDDXYdc/d46LODBWlxlewsVod2L+hp7LUAVI3BSOVZkVm7BED78C4YIFGsHWIUbmHCE8tsTpyp56CeC5jDkqQQJTlMa6znl5FvX/9gs=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc;\n arc=none smtp.client-ip=91.216.245.30", "From": "Florian Westphal <fw@strlen.de>", "To": "<netfilter-devel@vger.kernel.org>", "Cc": "Florian Westphal <fw@strlen.de>", "Subject": "[PATCH nft] tests: py: don't use a fixed filename", "Date": "Thu, 9 Apr 2026 13:58:47 +0200", "Message-ID": "<20260409132649.8571-1-fw@strlen.de>", "X-Mailer": "git-send-email 2.52.0", "Precedence": "bulk", "X-Mailing-List": "netfilter-devel@vger.kernel.org", "List-Id": "<netfilter-devel.vger.kernel.org>", "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "Using a predicatable filename in /tmp is not good practice.\n\nThis test runs with uid 0 and stray symlink could lead to unwanted\neffects. Use a temporary file and auto-delete it unless -k/--keep gets\npassed to us.\n\nSigned-off-by: Florian Westphal <fw@strlen.de>\n---\n tests/py/nft-test.py | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)", "diff": "diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py\nindex 53fd3f7ae6fe..c83a737a5f3b 100755\n--- a/tests/py/nft-test.py\n+++ b/tests/py/nft-test.py\n@@ -30,13 +30,13 @@ os.environ['TZ'] = 'UTC-2'\n from nftables import Nftables\n \n TESTS_DIRECTORY = [\"any\", \"arp\", \"bridge\", \"inet\", \"ip\", \"ip6\", \"netdev\"]\n-LOGFILE = \"/tmp/nftables-test.log\"\n log_file = None\n table_list = []\n chain_list = []\n all_set = dict()\n obj_list = []\n signal_received = 0\n+auto_delete = True\n \n \n class Colors:\n@@ -1523,6 +1523,9 @@ def main():\n parser.add_argument('-l', '--library', default=None,\n help='path to libntables.so.1, overrides --host')\n \n+ parser.add_argument('-k', '--keep', default=False,\n+ help='keep log file around after tests')\n+\n parser.add_argument('-N', '--no-netns', action='store_true',\n dest='no_netns',\n help='Do not run in own network namespace')\n@@ -1574,6 +1577,11 @@ def main():\n \"You need to build the project.\" % args.library)\n return 99\n \n+ global auto_delete\n+\n+ if args.keep:\n+ auto_delete = False\n+\n if args.enable_schema and not args.enable_json:\n print_error(\"Option --schema requires option --json\")\n return 99\n@@ -1585,10 +1593,13 @@ def main():\n tests = passed = warnings = errors = 0\n global log_file\n try:\n- log_file = open(LOGFILE, 'w')\n- print_info(\"Log will be available at %s\" % LOGFILE)\n+ log_file = tempfile.NamedTemporaryFile(prefix=\"nftables-test-py-\", suffix=\".log\", mode='w', delete=auto_delete)\n+ if auto_delete:\n+ print_info(\"Log file %s will not be retained. Pass -k to keep it.\")\n+ else:\n+ print_info(\"Log will be available at %s\" % log_file.name)\n except IOError:\n- print_error(\"Cannot open log file %s\" % LOGFILE)\n+ print_error(\"Cannot create a temporary log file\")\n return 99\n \n file_list = []\n", "prefixes": [ "nft" ] }