net-test: xfrm_algorithm_test - attempt to deflake

We don't need to use 'self.' before server_error if we mark it nonlocal
when we assign to it from inner functions.

Bump two of the delays as I've seen occasional failures on the timeouts
(this may well not help, but shouldn't hurt...)

Get rid of the shutdown(RDWR) before close(), it doesn't seem to help
(initially it helped, because it always threw an exception,
 and thus prevented the close() from even happening, thus we
 would always leak the socket, furthermore due to lack of self.
 and nonlocal, the server_error assignment was inner function
 local and thus didn't propagate correctly (ie. the exception
 was silently hidden), but now that that is all fixed,
 we still have lots of flakes/failures...).

Instead add a 0.1s delay before we close() the accepted socket.
I hope this will deflake things.  My guess is there is a real kernel bug
of some sort here that this works around, but I've yet to figure it out.

ACK 5.10-S works without the sleep/shutdown, ACK 5.10-T does not...
even though they're the same LTS version of the kernel (but there
are a few extra changes in tcp/xfrm)

Test: TreeHugger, manually on UML
Bug: 332955989
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I63007161bfad535b713e483a5a590a82c0ba04b2
1 file changed
tree: f3578617d557ea762cd42468afc50445a495ae7b
  1. net/
  2. test_mappings/
  3. METADATA
  4. OWNERS