android_packages_modules_Co.../Tethering/tests/privileged
Repository files (latest commit first)
Filename Latest commit message Latest commit date
KH Shi 09eb7631fa Fix ConntrackSocketTest#testIpv4ConntrackSocket flaky
If we run an iterations test, TCP connections opened by previous tests
won't be closed immediately. They will stay in the TIME_WAIT state for
120 seconds before closed. Netfilter socket listens to both
NF_NETLINK_CONNTRACK_NEW and NF_NETLINK_CONNTRACK_DESTROY groups.

There is a tiny time gap between socket creation and sending dump
request to kernel. If an old TCP connection happened to be closed in
this time gap, listening socket would see a DESTROY message before
seeing the NEW messages triggered by dump request.

The current test only parsing the first contrack message in the read
buffer, so it will only find the DESTROY message and ignore all of the
following NEW messages. It does a netfilter socket dump, but does not
check whether the dump produces reasonable output. Now that we have
the ability to parse conntrack messages, do more in-depth checking.

Bug: 254608655
Test: atest ConntrackSocketTest --iteration 500
Change-Id: Icf95adb9d9390d598e9c6bdb4e245c5fce764e3e
2022-12-05 22:26:52 +08:00
..
src Fix ConntrackSocketTest#testIpv4ConntrackSocket flaky 2022-12-05 22:26:52 +08:00
Android.bp Add defaults to enable/disable connectivity/tethering next 2021-11-24 12:20:23 +08:00
AndroidManifest.xml Add tethering privileged test 2020-07-16 04:12:01 +00:00