Open matttbe opened 10 months ago
Another idea from Willem:
Another option to avoid flooding the logs might be to choose a pseudo random number in the script and pass the explicit value mptcp_connect.
I haven't looked closely, but for transport layer tests it is likely that the payload is entirely ignored. Bar perhaps checksum coverage. If it does not increase code coverage, randomization can also just be turned off.
From the .c file, we can indeed check if an env var is set (e.g. MPTCP_RND_SEED
) and use it. If not, we generate a random one. The .sh script should generate a random one (if the env var is not already set) and print it.
Note from a previous weekly meeting: It might not be even useful to print it:
mptcp_join.sh
So this is probably not needed?
As reported by Willem on netdev, some inputs are randomised (
mptcp_connect.c
andmptcp_inq.c
).It was certainly used to increase the coverage but we don't print anything about that and there is no way to force re-using the same seed.
The minimal thing to do is to log the random seed. We cannot simply print it when we initialise it because
mptcp_connect
is used a lot of time by the .sh scripts: printing such thing info each time will "flood" the logs. Maybe we should only print that at the end, in case of errors: e.g. inxerror()
anddie_perror()
for example, but I seeexit(1)
is directly used in other places so some refactoring is needed first...Note that it will be needed to log this to
stderr
:mptcp_connect
prints what has been received from the other peer tostdout
.