This was available with --no-interface but no such option existed
for the DBus API.
---
tools/hwsim.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/hwsim.c b/tools/hwsim.c
index de808074..8dcb75c4 100644
--- a/tools/hwsim.c
+++ b/tools/hwsim.c
@@ -1707,6 +1707,7 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus
*dbus,
bool p2p = false;
const char *disabled_iftypes = NULL;
const char *disabled_ciphers = NULL;
+ bool no_vif = false;
struct radio_info_rec *radio;
if (!l_dbus_message_get_arguments(message, "a{sv}", &dict))
@@ -1727,6 +1728,10 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus
*dbus,
else if (!strcmp(key, "CipherTypeDisable"))
ret = l_dbus_message_iter_get_variant(&variant, "s",
&disabled_ciphers);
+ else if (!strcmp(key, "NoVirtualInterface"))
+ ret = l_dbus_message_iter_get_variant(&variant, "b",
+ &no_vif);
+
if (!ret)
goto invalid;
}
@@ -1765,6 +1770,9 @@ static struct l_dbus_message *radio_manager_create(struct l_dbus
*dbus,
}
+ if (no_vif)
+ l_genl_msg_append_attr(new_msg, HWSIM_ATTR_NO_VIF, 0, NULL);
+
radio = l_new(struct radio_info_rec, 1);
radio->pending = l_dbus_message_ref(message);
radio->name = l_strdup(name);
--
2.34.1
Show replies by date
There is really no reason to have hwsim create interfaces automatically
for test-runner. test-runner already does this for wpa_supplicant and
hostapd, and IWD can create the interface itself.
---
autotests/util/hwsim.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py
index ce85f43d..80a847ad 100755
--- a/autotests/util/hwsim.py
+++ b/autotests/util/hwsim.py
@@ -314,6 +314,7 @@ class RadioList(collections.Mapping):
args = dbus.Dictionary({
'Name': name,
'P2P': p2p_device,
+ 'NoVirtualInterface': True,
}, signature='sv')
if iftype_disable:
--
2.34.1
---
tools/runner.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/runner.py b/tools/runner.py
index f244016f..fc1cab44 100644
--- a/tools/runner.py
+++ b/tools/runner.py
@@ -211,6 +211,8 @@ class Runner:
args.start = os.path.abspath('tools/run-tests')
else:
raise Exception("Cannot locate run-tests binary")
+ else:
+ args.start = os.path.abspath(args.start)
# If no runner is specified but we have a kernel image assume
# if the kernel is executable its UML, otherwise qemu
--
2.34.1
This enables CONFIG_BINFMT_SCRIPT which allows the init process to
interpret #! and execute the script rather than requiring a binary
for init.
---
tools/test_runner_kernel_config | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/test_runner_kernel_config b/tools/test_runner_kernel_config
index 7806fdb2..c7049edd 100755
--- a/tools/test_runner_kernel_config
+++ b/tools/test_runner_kernel_config
@@ -51,3 +51,4 @@ scripts/config --enable CONFIG_SECURITYFS
scripts/config --enable CONFIG_BINFMT_ELF
scripts/config --enable CONFIG_HOSTFS
scripts/config --enable CONFIG_UML_TIME_TRAVEL_SUPPORT
+scripts/config --enable CONFIG_BINFMT_SCRIPT
--
2.34.1
If --help or unknown options were supplied to test-runner python
would thrown a maximum recusion depth exception. This was due to
the way ArgumentParser was subclassed.
To fix this call ArgumentParser.__init__() rather than using the
super() method. And do this also for the RunnerCoreArgParse
subclass as well. In addition the namespace argument was removed
from parse_args since its not used, and instead supplied directly
to the parents parse_args method.
---
tools/runner.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/runner.py b/tools/runner.py
index fc1cab44..0068c74f 100644
--- a/tools/runner.py
+++ b/tools/runner.py
@@ -92,7 +92,7 @@ class RunnerNamespace(Namespace):
#
class RunnerCoreArgParse(ArgumentParser):
def __init__(self, *args, **kwargs):
- super().__init__(self, *args, **kwargs)
+ ArgumentParser.__init__(self, *args, **kwargs)
self.add_argument('--start', '-s',
help='Custom init process in virtual environment',
@@ -154,23 +154,23 @@ class RunnerCoreArgParse(ArgumentParser):
dest='valgrind')
# Overwrite to use a custom namespace class and parse from env
- def parse_args(self, *args, namespace=RunnerNamespace()):
+ def parse_args(self, *args):
if len(sys.argv) > 1:
- return super().parse_args(*args, namespace=namespace)
+ return super().parse_args(*args, namespace=RunnerNamespace())
options = []
for k, v in os.environ.items():
options.append('--' + k)
options.append(v)
- return self.parse_known_args(args=options, namespace=namespace)[0]
+ return self.parse_known_args(args=options, namespace=RunnerNamespace())[0]
#
# Arguments only needed outside the test environment
#
class RunnerArgParse(RunnerCoreArgParse):
def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
+ RunnerCoreArgParse.__init__(self, *args, **kwargs)
self.add_argument('--runner', '-r',
metavar='<runner type>',
--
2.34.1
Hi James,
On 4/5/22 13:30, James Prestwood wrote:
This was available with --no-interface but no such option existed
for the DBus API.
---
tools/hwsim.c | 8 ++++++++
1 file changed, 8 insertions(+)
All applied, thanks.
Regards,
-Denis