* Use new cleanup in infamy to ensure the boot order gets restored
* Use new boot order in operational and use RPC to set boot order
to remove all SSH commands.
If a test need to clean up itself disregarding test status,
it can add an optional test-cleanup phase.
This is useful if the test in some circomstances leave the device in a
bad state. This can be used to restore the unit to its ordinary state.
Furl answers the question "is this URL serving the content I expect?"
Sometimes, we might be asking a server that in the middle of being
reconfigured, is crashing, is buggy, etc. - in which case it might RST
the connection. In that case the answer to the question is "False" and
not "BURN IT ALL DOWN!!"
If the callable threw an exception, then the process running inside
the netns would exit before sending back a value on the tx pipe, which
meant that `rx.recv()` would hang in the original process.
Make sure that we catch any exceptions, and send that instead of the
result over the pipe in those scenarios. Then in the original process,
re-raise the exception.
Before this change, setting `GIT_VERSION` in `make`'s environment was
intended to allow the user to specify a custom build id. As it turns
out, `test/test.mk` had duplicated the logic from
`board/common/post-build.sh` to unconditionally override any value set
in it. Because of the way `make` handles variables, where assignments
to variables inherited from the environment are exported back to
it[^1], this would mean that `test.mk` would always clobber any value
set by the user. Furthermore, there is also this file called
`buildroot/package/git/git.mk`, which also (reasonably) has opinions
about what the proper value of `GIT_VERSION` should be. In summary,
this was a bit of a mess.
Therefore: Make sure that there is one single place where we determine
the build id and version, and make sure that those variables are
scoped under the `INFIX_` prefix to avoid clashing with any other
component.
[^1]: https://www.gnu.org/software/make/manual/html_node/Environment.html
Fixes the following issue when deleting /infix-services:mdns/interfaces,
which works fine over RESTCONF:
Traceback (most recent call last):
File "/home/jocke/src/infix/test/./case/infix_services/mdns_allow_deny/test.py", line 142, in <module>
dut.delete_xpath("/infix-services:mdns/interfaces")
File "/home/jocke/src/infix/test/infamy/netconf.py", line 418, in delete_xpath
oldd = mod.parse_data_dict(old, no_state=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.infix/venv/lib/python3.11/site-packages/libyang/schema.py", line 215, in parse_data_dict
return dict_to_dnode(
^^^^^^^^^^^^^^
File "/root/.infix/venv/lib/python3.11/site-packages/libyang/data.py", line 1277, in dict_to_dnode
result.root().validate(
File "/root/.infix/venv/lib/python3.11/site-packages/libyang/data.py", line 430, in validate
self.validate_all(no_state, validate_present)
File "/root/.infix/venv/lib/python3.11/site-packages/libyang/data.py", line 449, in validate_all
raise self.context.error("validation failed")
libyang.util.LibyangError: validation failed:
Invalid leafref value "e3" - no target instance "/if:interfaces/if:interface/if:name" with the same value.
The patch skips validation of the diff in favor of checking the result
of libyang.xpath_del().
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Make sure that we keep a record of the versions and boot source used
by all devices under test when running the full suite - in case we
ever suspect that there is a mismatch between the intended test image
and the actual one.
Since this test now needs to communicate with the devices, make sure
that we run the wait test first.
Replace the existing remove-module-names-pass in the RESTCONF
transport -- which only worked for top-level containers -- with
libyang's standard `.print_dict()` used by the NETCONF transport
implementation.
As a bouns, the implementation of `.get_iface()` is now transport
agnostic.
As it turns out, the setup with a 802.1D bridge in combination with
VLAN uppers stacked on the bridge ports is not possible to support
on mv88e6xxx ports.
Enable VLAN filtering to ensure proper isolation of the locally
terminated VLANs.
This will fail on a system running a vanilla kernel, where the dut's
ports are backed by mv88e6xxx, because:
1. The ports are attached to the same bridge, and are thus in the same
PVT group.
2. Creation of the VLAN uppers causes the DSA layer to add both ports
to the same VTU entry.
As a result, hardware behaves as if both ports had been configured as
tagged members of VLAN 10, instead of just terminating incoming
traffic locally.
Add this test to catch hardware which behaves in this way.