Skip to content
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

tests: call gnrc_ipv6_nib_iface_up() after gnrc_ipv6_nib_init_iface() #18635

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

benpicco
Copy link
Contributor

Contribution description

We now have to call gnrc_ipv6_nib_iface_up() to configure addresses / start ARSM after calling gnrc_ipv6_nib_init_iface()

Testing procedure

Run the tests on a board. For some reason this is not failing on native without the patch, but does on e.g. samd20-xpro.

Issues/PRs references

#17893 (comment)

@benpicco benpicco requested a review from miri64 as a code owner September 23, 2022 13:21
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Sep 23, 2022
@benpicco benpicco requested a review from kaspar030 September 23, 2022 13:21
@benpicco benpicco added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Sep 23, 2022
gnrc_ipv6_nib_init_iface(_mock_netif);
gnrc_netif_release(_mock_netif);
gnrc_ipv6_nib_iface_up(_mock_netif);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnrc_ipv6_nib_init()/gnrc_ipv6_nib_iface_up() will both call gnrc_netif_acquire() - no need to do it here.

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 23, 2022
@benpicco benpicco requested a review from fabian18 September 23, 2022 13:25
@fabian18
Copy link
Contributor

For me, with BOARD=nucleo-f767zi each test fails with a python Traceback. On native, they succeed.

What is with tests/gnrc_sixlowpan_frag_sfr/main.c::_set_up() and tests/gnrc_sixlowpan_frag_minfwd/main.c::_set_up()?
They also call gnrc_ipv6_nib_init_iface().

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to find out the reason, why it is not failing on native (might be pointing to a bug), but for now, let's just get the tests working again.

@benpicco benpicco force-pushed the tests/gnrc_ipv6_nib_iface_up branch from 1a160c0 to d2e57ac Compare September 23, 2022 15:17
@fabian18
Copy link
Contributor

Does it work on some board for you, or do you also get some weird python output?

@benpicco
Copy link
Contributor Author

Huh what weird Python output are you getting and from what?

@fabian18
Copy link
Contributor

Huh what weird Python output are you getting and from what?

BOARD=nucleo-f767zi make flash test

this








Traceback (most recent call last):
  File "/home/fabian/forks/RIOT/tests/gnrc_ipv6_fwd_w_sub/tests/01-run.py", line 44, in <module>
    sys.exit(run(testfunc, timeout=5, echo=True))
  File "/home/fabian/forks/RIOT/dist/pythonlibs/testrunner/__init__.py", line 27, in run
    child = setup_child(timeout, env=os.environ,
  File "/home/fabian/forks/RIOT/dist/pythonlibs/testrunner/spawn.py", line 95, in setup_child
    sync_child(child, env)
  File "/home/fabian/forks/RIOT/dist/pythonlibs/testrunner/spawn.py", line 128, in sync_child
    utils.test_utils_interactive_sync_shell(child,
  File "/home/fabian/forks/RIOT/dist/pythonlibs/testrunner/utils.py", line 41, in test_utils_interactive_sync_shell
    _test_utils_interactive_sync(child, retries, delay, '\n', '>')
  File "/home/fabian/forks/RIOT/dist/pythonlibs/testrunner/utils.py", line 22, in _test_utils_interactive_sync
    child.expect_exact(ready_exp, timeout=0)
  File "/usr/lib/python3.10/site-packages/pexpect/spawnbase.py", line 421, in expect_exact
    return exp.expect_loop(timeout)
  File "/usr/lib/python3.10/site-packages/pexpect/expect.py", line 181, in expect_loop
    return self.timeout(e)
  File "/usr/lib/python3.10/site-packages/pexpect/expect.py", line 144, in timeout
    raise exc
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x7fac0b4a44c0>
command: /usr/bin/make
args: [b'/usr/bin/make', b'cleanterm']
buffer (last 100 chars): '\n'
before (last 100 chars): "aemon attribute instead\r\n  receiver_thread.setDaemon(1)\r\nWelcome to pyterm!\r\nType '/exit' to exit.\r\n"
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 75794
child_fd: 5
closed: False
timeout: 5
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_string:
    0: '>'
make: *** [/home/fabian/forks/RIOT/makefiles/tests/tests.inc.mk:22: test] Fehler 1

But if it does not happen for you, it is my python probably

@fabian18
Copy link
Contributor

But if it does not happen for you, it is my python probably

Removed the USB cable and put it back in, now it runs ...

@miri64
Copy link
Member

miri64 commented Sep 23, 2022

Seems more like some synchronization issues between the node and the host serial ;-).

@benpicco benpicco merged commit 857fe7d into RIOT-OS:master Sep 25, 2022
@benpicco benpicco deleted the tests/gnrc_ipv6_nib_iface_up branch September 25, 2022 12:19
@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants