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

fib_sr: unittests for fib_sr fail sporadically #4513

Closed
miri64 opened this issue Dec 18, 2015 · 14 comments · Fixed by #4524
Closed

fib_sr: unittests for fib_sr fail sporadically #4513

miri64 opened this issue Dec 18, 2015 · 14 comments · Fixed by #4524
Assignees
Labels
Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@miri64
Copy link
Member

miri64 commented Dec 18, 2015

$ CFLAGS="-gdwarf-3 -g" make -C tests/unittests/ tests-fib_sr test
make: Entering directory `/home/martine/Repositories/RIOT-OS/RIOT/tests/unittests'
touch /home/martine/Repositories/RIOT-OS/RIOT/tests/unittests/main.c
Building application "unittests" for "native" with MCU "native".

"make" -C /home/martine/Repositories/RIOT-OS/RIOT/boards/native
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/boards/native/drivers
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/core
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/cpu/native
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/cpu/native/periph
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/drivers
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/sys
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/sys/embunit
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/sys/net/network_layer/fib
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/sys/universal_address
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/sys/xtimer
"make" -C /home/martine/Repositories/RIOT-OS/RIOT/tests/unittests/tests-fib_sr
   text    data     bss     dec     hex filename
  65437     416   52196  118049   1cd21 /home/martine/Repositories/RIOT-OS/RIOT/tests/unittests/bin/native/unittests.elf
RIOT native interrupts/signals initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2016.03-devel-25-gab9f0f-beutlin-ipv6_hdr/fix/2015.12/ipv6_addr_dep)
......
fib_sr_tests.test_fib_sr_06_create_sr_with_hops (tests/unittests/tests-fib_sr/tests-fib_sr.c 264) exp 0 was -2

fib_sr_tests.test_fib_sr_06_create_sr_with_hops (tests/unittests/tests-fib_sr/tests-fib_sr.c 290) exp 0 was -2
......
run 12 failures 2
XXX: lpm_set(): LPM_POWERDOWN not implemented

Note, that sometimes they'll pass regardless.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking labels Dec 18, 2015
@miri64 miri64 added this to the Release 2015.12 milestone Dec 18, 2015
@OlegHahm
Copy link
Member

Tried about 35 times on SAMR21-xpro. Could not reproduce.

@miri64
Copy link
Member Author

miri64 commented Dec 18, 2015

On what branch did you try (mine was on release branch (or as in the example above a branch forked from the release branch))

@miri64
Copy link
Member Author

miri64 commented Dec 18, 2015

Oh and it was on native. Never tested it for any other platform actually, yet.

@OlegHahm
Copy link
Member

IMO the check here: https://github.com/RIOT-OS/RIOT/blob/master/sys/net/network_layer/fib/fib.c#L911 doesn't make much sense and should be removed. @BytesGalore, @cgundogan?

This function (fib_sr_entry_add()) adds a new entry, right? Why should we check its lifetime here? And who should initialize its lifetime?

@OlegHahm
Copy link
Member

@BytesGalore, please check if #4519 seems valid to you.

@BytesGalore
Copy link
Member

@authmillenon @OlegHahm wow never bumped this problem I will have a look.
@OlegHahm fib_sr_entry_add() adds an entry behind a given one.
The function can be used at any time by the routing protocol, so it can also be called when the source route is expired.
The function enables to update existing source routes without the need to be recreate everything for small changes.
Usually, as a routing protocol, you would use fib_sr_entry_append() for putting a new source route to the FIB :).

@miri64
Copy link
Member Author

miri64 commented Dec 19, 2015

Well they are there and #4519 does not fix this.

@miri64
Copy link
Member Author

miri64 commented Dec 19, 2015

But it seems to be related to the fib_sr_check_lifetime() function (which in some cases returns -ENOENT).

@miri64
Copy link
Member Author

miri64 commented Dec 19, 2015

Its due to the sr_lifetime member of the given sr_fib being somewhere around 1000000. Does this ring a bell @BytesGalore? I can't really set a watchpoint on this, since it seems to be timing related (setting the watchpoint causes the tests always to succeed).

@OlegHahm
Copy link
Member

#4519 would fix it, but is apparently the wrong solution. ;)

@cgundogan
Copy link
Member

got automatically closed by merging #4524. However, as I understand it, this issue still persists. Reopened.

@kaspar030
Copy link
Contributor

Fixed by #4585.

@cgundogan cgundogan reopened this Jan 7, 2016
@miri64
Copy link
Member Author

miri64 commented Jan 7, 2016

Needs to be merged first.

@cgundogan
Copy link
Member

Can be closed as #4585 was merged into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants