From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 2/4] hwsim: add Rule.remove_all()
Date: Wed, 18 Aug 2021 10:26:01 -0700 [thread overview]
Message-ID: <20210818172603.266294-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20210818172603.266294-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
There are really no cases where a test wants to remove a single
rule. Most loop through and remove rules individually so this
is being added as a convenience.
---
autotests/util/hwsim.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py
index 320e9dfa..4e3b8ec2 100755
--- a/autotests/util/hwsim.py
+++ b/autotests/util/hwsim.py
@@ -202,6 +202,10 @@ class RuleSet(collections.Mapping):
self._dict[path] = obj
return obj
+ def remove_all(self):
+ for rule in self._dict.values():
+ rule.remove()
+
class Radio(HwsimDBusAbstract):
_iface_name = HWSIM_RADIO_INTERFACE
--
2.31.1
next prev parent reply other threads:[~2021-08-18 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 17:26 [PATCH 1/4] network: handle NULL/hotspot networks when removing secrets James Prestwood
2021-08-18 17:26 ` James Prestwood [this message]
2021-08-18 17:26 ` [PATCH 3/4] auto-t: fix error handling in testHotspot James Prestwood
2021-08-18 17:26 ` [PATCH 4/4] test-runner: fix subtest option James Prestwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210818172603.266294-2-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox