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

thoughts on regression testing for netlink #153

Open
mcr opened this issue Apr 14, 2021 · 3 comments
Open

thoughts on regression testing for netlink #153

mcr opened this issue Apr 14, 2021 · 3 comments

Comments

@mcr
Copy link

mcr commented Apr 14, 2021

I have thought a bunch about how to test netlink dependant things.
I looked at trying to put capture/replay code into libnl, but I gotta say that I found libnl not that helpful, and I had other things to do.
radvd doesn't use libnl, and the netlink.c code is pretty sweet.
It's not just netlink.c but also recv.c and send.c (really_send()) that need to have a seam inserted.
The easiest in my opinion is to move the actual socket creation/manipulation/sendto/recvfrom() code into new .c files, so that a radvd-testing executable can be created that has mock functions. (A "link seam"). I have code that replaces send/recv with calls to pcap(3) functions. netlink sockets can now be captured, I think, with tcpdump, so we'd have a pcap file of RS,NS, etc.. and a pcap file of netlink messages. (Better would be a single pcap-ng file that had both, mixed in the order we need). And a pcap{,-ng} file for output that would capture RAs, NA/ND, etc. [I don't recall if we ever send NAs]

@stappersg
Copy link
Member

to move the actual socket creation/manipulation/sendto/recvfrom() code into new .c files, so that a radvd-testing executable can be created that has mock functions. (A "link seam").

To me that is a reasonable path forward.

@mcr
Copy link
Author

mcr commented Apr 18, 2021

I can't promise that I'll get this organized before the end of April, so I suggest not blocking #127.

@Neustradamus
Copy link
Member

@mcr: What is the situation in 2024?
Have you tested the 2.20-rc1 (2023-11-17)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants