-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not clean up when initialization failed on FreeBSD. #246
Comments
@ihoro : fyi |
kyua doesn't create epair interfaces. Tests do. They're responsible for cleaning up; if they don't, it's a test bug. |
@Rin0913, thanks for reporting. More details are needed to proceed with the analysis. According to the previous comments it may turn out to be a defect in the test itself. |
It's impossible to say without knowing which test you're talking about. Please let us know how to reproduce the problem you're seeing. |
The test failed because the jail already exists. $ ifconfig
...
epair60b: flags=1008842<BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:aa:e9:13:fb:0b
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
maclabel biba/equal(equal-equal)
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
$ sudo kyua test test_routing_l3.py:TestIfOps::test_change_prefix_route[inet6]
test_routing_l3.py:TestIfOps::test_change_prefix_route[inet6] -> failed: /usr/tests/atf_python/sys/net/vnet.py:293: ValueError [0.238s]
$ ifconfig
...
epair62b: flags=1008842<BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:7d:d2:49:0d:0b
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
maclabel biba/equal(equal-equal)
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> After removing the existing jail: $ sudo kyua test test_routing_l3.py:TestIfOps::test_change_prefix_route[inet6]
test_routing_l3.py:TestIfOps::test_change_prefix_route[inet6] -> passed [0.279s]
Results file id is usr_tests_sys_net_routing.20241218-211919-533112
Results saved to /root/.kyua/store/results.usr_tests_sys_net_routing.20241218-211919-533112.db
1/1 passed (0 broken, 0 failed, 0 skipped)
$ ifconfig
...
epair62b: flags=1008842<BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:7d:d2:49:0d:0b
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
maclabel biba/equal(equal-equal)
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> I was running the tests under /usr/tests/sys/net/routing, with a srcdir=`dirname $0`
. ${srcdir}/../../common/vnet.subr
vnet_cleanup |
Sorry, let me be clear: when setting up part fails, the cleaning up part seems not being executed. |
I've tried to reproduce it in my env, no luck so far. All epair interfaces are cleared as expected with the following result for
Actually, I had to do I guess you are working on that AssertionError (thanks for that!), and presumably the test has changes on your side -- it could be one of the reasons for the issue you are experiencing. I would recommend to take step back to the original version of the test (and revert to a clean environment if possible) to make sure that it was working as expected before your patching. It may help to understand the reproduction steps. |
@ihoro It seems that the test executed the setup part successfully so that you could see the "assertion failed". |
I wonder if this is an issue with how kyua works.. The XUnit paradigm is:
Also: are jail names generated in a deterministic manner? If so, that's potentially problematic: jail names should really be done in the format:
Using a format like this would better avoid collisions between tests. |
@ngie-eign @Rin0913 |
I am running Kyua on my FreeBSD VM.
One testing program would launch a jail and operate the jail network, and before so, it would create epair interfaces.
I found that it did clean up when the test fails or successes. However, when the test fails in initialization stage, the epair interfaces would not be destroyed.
I guess this is a bug on Kyua.
The text was updated successfully, but these errors were encountered: