Commit graph android_packages_modules_Co.../Tethering/tests
Message SHA1
Merge changes Ie2ba9805,I8f5b23f9
* changes:
  Move onUpstreamCapabilitiesChanged out of reportUpstreamChange
  TetheringTest: improve onUpstreamCapabilitiesChanged test

Treehugger Robot   authored and   Gerrit Code Review   commited 2023-02-01 06:35:13 +00:00
7acd206160
Merge "TetheringTest: replace upstream change check by event callback"
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-02-01 05:59:53 +00:00
119e5adc14
BpfCoordinatorTest: add testUpdateUpstreamNetworkState
Bug: 258637850
Bug: 241106456
Test: atest ConnectivityServiceTest
Change-Id: I156398ef7ffaceb454dc187682238821da77c72b

Hungming Chen   commited 2023-01-31 16:35:09 +08:00
650cc9c0d3
TetheringTest: replace upstream change check by event callback
UpstreamNetworkMonitor#setCurrentUpstream is going to be removed
 because UpstreamNetworkMonitor#mTetheringUpstreamNetwork is unused.
 Use tethering event callback to check upstream change.

Bug: 243516306
Test: atest TetheringTest
Change-Id: I5773cfc80190b554a3b63b4f827c220b0e663427

Hungming Chen   commited 2023-01-18 15:13:49 +08:00
9e2c0f9df5
TetheringTest: improve onUpstreamCapabilitiesChanged test
This is a preparation for migrating the upstream change notification.

Changes:
1. Modify testUpstreamNetworkChanged
   - Add losing upstream test
   - Verify the capabilities on the explicit network
2. Modify testUpstreamCapabilitiesChanged
   - Verify the capabilities on the explicit network
3. Add testUpstreamCapabilitiesChanged_stopTethering
   - Test that TetherModeAliveState#exit sends the null upstream
     notification. Above tests only covers the notifications which
     are triggered by chooseUpstreamType or EVENT_ON_CAPABILITIES.

Bug: 243516306
Test: atest TetheringTest

Change-Id: I8f5b23f93c27b8c690b2fd275e3f636fbaeb4973

Hungming Chen   commited 2023-01-18 15:13:49 +08:00
9e9d74ca00
TetheringTest: correct the comment in chooseDunUpstreamTestCommon
Bug: 243516306
Test: atest TetheringTest
Change-Id: I642722498357dfb8f1582de50701f213c49f3077

Hungming Chen   commited 2023-01-13 17:53:59 +08:00
f2abe15fe7
Merge "TetheringTest: fix assert{*}Equals order in TestTetheringEventCallback"
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-01-13 08:43:07 +00:00
8043d5d7af
Merge changes from topic "deprecate_connectivity_action_in_tethering"
* changes:
  Tethering: deprecate CONNECTIVITY_ACTION on U+ device
  Test: add tests to testChooseDunUpstreamByAutomaticMode_*
  TetheringTest: separate setup func from chooseDunUpstreamTestCommon

Treehugger Robot   authored and   Gerrit Code Review   commited 2023-01-13 08:41:20 +00:00
401f1ff2db
Merge "Fix TetheringServiceTest#testTetheringManagerLeak flaky"
KH Shi   authored and   Gerrit Code Review   commited 2023-01-13 05:44:17 +00:00
c91fbabd45
TetheringTest: fix assert{*}Equals order in TestTetheringEventCallback
TestTetheringEventCallback may use assertEquals(actual, expected)
but assertEquals(expected, actual).

It is confused while test is failed.

For example:

Code:
callback.expectUpstreamChanged(new Network[] {null} /* expected */);

Before:
java.lang.AssertionError: expected:<100> but was:<null>

After:
java.lang.AssertionError: expected:<null> but was:<100>

Bug: 243516306
Test: atest TetheringTest
Change-Id: I6a987e4dd1cccc5e79da7dda55f194291e0c4a60

Hungming Chen   commited 2023-01-12 17:48:04 +08:00
b4859d1ea1
Fix TetheringServiceTest#testTetheringManagerLeak flaky
This test relies on forceGc to free and finalize the TetheringManager
before perform validation checks. In some test suites, if there were
already too many unused objects accumulated in the system before
running the test, it might take more than 5 seconds to free them.
Increase the maximum retry time to 30 seconds to fix the flakiness.

Bug: 263335396
Test: atest TetheringServiceTest#testTetheringManagerLeak
      run the flaky test suite on ABTD with CL
Change-Id: I38bee3d43fbeb278993d113ccbe0645aedc5d75d

KH Shi   commited 2023-01-12 08:25:34 +00:00
0ed11f5a46
BpfCoordinator: publish upstream interface mtu to v4 offload rule
Respect the upstream interface mtu instead of always setting
mtu 1500.

Using upstream interface mtu is probably not the best solution
for tether offload pmtu but it at least respects the upstream
interface mtu which may be less than 1500.

Test: manual test
1. Connect to carrier Taiwan Star.
2. Enable tethering and check the mtu 1434 in dumpsys.
IPv4 Upstream: proto [inDstMac] iif(iface) src -> nat ->
dst [outDstMac] pmtu age
  udp [02:10:45:32:ef:35] 54(54) 192.168.72.125:39034
  -> 15(rmnet1) 100.83.189.11:39034
  -> 142.251.43.14:443 [00:00:00:00:00:00] 1434 69657ms
IPv4 Downstream: proto [inDstMac] iif(iface) src -> nat
  -> dst [outDstMac] pmtu age
  udp [00:00:00:00:00:00] 15(rmnet1) 142.251.43.14:443
  -> 54(54) 100.83.189.11:39034
  -> 192.168.72.125:39034 [9a:8a:4d:ec:a4:7c] 1434 69633ms

Bug: 262860312
Test: atest BpfCoordinatorTest
Change-Id: Ic6dcb95ed76d5306053e4645b6baebc67ff082cf

Hungming Chen   commited 2023-01-03 23:36:30 +08:00
5c985e2cdd
Merge "BpfCoordinatorTest: renumber the test interface indices"
Maciej Å»enczykowski   authored and   Gerrit Code Review   commited 2022-12-30 20:46:16 +00:00
53e8697d39
BpfCoordinatorTest: renumber the test interface indices
This is a preparation to add new interface index.

Test: atest BpfCoordinatorTest
Change-Id: I758c2e7142099d74099fb8203f41ffec9b1182ee

Hungming Chen   commited 2022-12-28 21:47:11 +08:00
46767ff62e
Test: add tests to testChooseDunUpstreamByAutomaticMode_*
Add dun network test cases as follows.

Overall test coverage:
- testChooseDunUpstreamByAutomaticMode (original):
  common, test#1, test#2
- testChooseDunUpstreamByAutomaticMode_defaultNetworkWifi (new):
  test#3, test#4
- testChooseDunUpstreamByAutomaticMode_loseDefaultNetworkWifi (new):
  test#5
- testChooseDunUpstreamByAutomaticMode_defaultNetworkCell (new):
  test#5, test#7
- testChooseDunUpstreamByAutomaticMode_loseAndRegainDun (new):
  test#8
- testChooseDunUpstreamByAutomaticMode_switchDefaultFromWifiToCell
  (new):
  test#9, test#10

Overall test cases:
+-------+-------+-------+-------+-------+
| Test  | WiFi  | Cellu |  Dun  | Expec |
| Case  |       | alr   |       | ted   |
|   #   |       |       |       | Upstr |
|       |       |       |       | eam   |
+-------+-------+-------+-------+-------+
|   -   |       |       |       |   -   | --+
+-------+-------+-------+-------+-------+   |
|   -   |       |   V   |       |   -   |   |
+-------+-------+-------+-------+-------+   |   Implemented
|   -   |       |   V   |   O   |  Dun  |   +-- in chooseDun
+-------+-------+-------+-------+-------+   |   UpstreamTest
|   -   |   V   |   O   |   O   |  WiFi |   |   Common()
+-------+-------+-------+-------+-------+   |
|   -   |   V   |   O   |       |  WiFi | --+
+-------+-------+-------+-------+-------+
|       |   O   |   V   |       |   -   |
|   1   +-------+-------+-------+-------+
|       |   O   |   V   |   O   |  Dun  |
+-------+-------+-------+-------+-------+
|       |   O   |   V   |       |   -   |
|   2   +-------+-------+-------+-------+
|       |   O   |   V   |   O   |  Dun  |
+-------+-------+-------+-------+-------+
|   3   |   V   |   O   |       |  WiFi | (new)
+-------+-------+-------+-------+-------+
|   4   |   V   |       |       |  WiFi | (new)
+-------+-------+-------+-------+-------+
|   5   |       |       |   O   |  Dun  | (new)
+-------+-------+-------+-------+-------+
|   6   |       |   V   |   O   |  Dun  | (new)
+-------+-------+-------+-------+-------+
|   7   |       |       |   O   |  Dun  | (new)
+-------+-------+-------+-------+-------+
|       |       |       |       |   -   | (new)
|   8   +-------+-------+-------+-------+
|       |       |       |   O   |  Dun  |
+-------+-------+-------+-------+-------+
|       |   V   |       |   O   |  WiFi | (new)
|   9   +-------+-------+-------+-------+
|       |   V   |       |       |  WiFi |
+-------+-------+-------+-------+-------+
|       |   O   |   V   |       |   -   | (new)
|   10  +-------+-------+-------+-------+
|       |   O   |   V   |   O   |  Dun  |
+-------+-------+-------+-------+-------+

Annotation:
1. "V" means that the given network is connected and
   it is default network.
2. "O" means that the given network is connected and
   it is not default network.

Bug: 257408654
Test: atest ConnectivityCoverageTests
Change-Id: Ie7beda1a8fcfd2a3f2600ca601f58d869144d275

Hungming Chen   authored and   Nucca Chen   commited 2022-12-28 02:28:00 +00:00
4c8c35748f
TetheringTest: separate setup func from chooseDunUpstreamTestCommon
Prepare to share setup function to more dun network tests.
No operation is changed.

Bug: 257408654
Test: TetheringTest
Change-Id: I29f08d8bc3cf83aa9d03f5d2819a1c67466b7bcc

Hungming Chen   commited 2022-12-26 19:25:16 +08:00
ecfe710805
Merge "TestOnly: disable some UpstreamNetworkMonitor tests after T"
Mark Chien   authored and   Gerrit Code Review   commited 2022-12-21 06:27:02 +00:00
09cb20d8a8
TestOnly: disable some UpstreamNetworkMonitor tests after T
The legacy upstream selection flow is never called after T. Stop the
related test cases after T also.

Bug: 257408654
Test: atest TetheringTests
Change-Id: I62692bb9a49dde432d31bece41b4cff442a327d1

Mark   authored and   Mark Chien   commited 2022-12-21 06:26:37 +00:00
2657da3cbf
Replace NetlinkSocket with NetlinkUtils
Those static method and constants are better to fit in
NetlinkUitls. Replace the usage.

Test: m
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I81e27b8264e39764a44a4ba87344e9ac940d920a

chiachangwang   commited 2022-12-19 06:39:31 +00:00
e97aed4847
Merge "Add ConfigInfrastructure stubs lib to Android.bp"
Hassan Ali   authored and   Gerrit Code Review   commited 2022-12-12 15:11:30 +00:00
c3ebeb81a1
bpf_tethering.h -> offload.h
match header file with bpf program

Locations to change found via:
  https://source.corp.google.com/search?q=p:aosp-master%20(%5E%7C%5B%5E_%5D)bpf_tethering.h

Core reasoning for this will be to match the .h naming
that we'll have for netd.c and clatd.c once we get rid of bpf_shared.h

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4154659c7fb23a37f5316a5c804fb2606d842e9c

Maciej Å»enczykowski   commited 2022-12-08 13:04:45 +00:00
4e3321ed3b
Add ConfigInfrastructure stubs lib to Android.bp
This change is part of aosp/2305844 to update
framework-configinfrastructure dependency.

As part of moving DeviceConfig.java to
packages/modules/ConfigInfrastructure, We need to add
ConfigInfrastructure lib dependency to Android.bp as DeviceConfig APIs
will not be part of the non-updatable part and will not be part of the
base module_current SDK so we have to add an explicit dependency.

Test: m
bug: 253019048
Change-Id: Iba194c664c1c701e396e7a2a036bd03772644db8
Merged-In: Ic5323c10b7c899fbf9af41444915359f23db17b5

Hassan Ali   commited 2022-12-08 12:58:20 +00:00
bc4e514ea1
Test: rename EthernetTetheringTest to CtsEthernetTetheringTest
Bug: 250552545
Bug: 258637850
Test: atest CtsEthernetTetheringTest
Change-Id: I76e687fc46f89fcfce9049ac6736bb078df06ecc

Hungming Chen   commited 2022-12-06 15:46:23 +08:00
b58191dee8
Merge "Fix ConntrackSocketTest#testIpv4ConntrackSocket flaky"
KH Shi   authored and   Gerrit Code Review   commited 2022-12-06 05:46:54 +00:00
cc8db2ac6e
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

KH Shi   commited 2022-12-05 22:26:52 +08:00
09eb7631fa
Test: separate common methods to EthernetTetheringTestBase
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

Changes:
1. Separate common methods from EthernetTetheringTest
   to EthernetTetheringTestBase.
Before:
  EthernetTetheringTest

After:
  [base class]                   [derived class]

  EthernetTetheringTestBase +--+ EthernetTetheringTest

2. No test operation is changed.

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: I36d205bf6f2a8145d5ac63c620af7528765b22ab

Hungming Chen   authored and   Nucca Chen   commited 2022-12-02 09:23:03 +00:00
40c9fe1165
Merge changes I9bccc558,Ifd855571
* changes:
  Test: separate common variables to EthernetTetheringTestBase
  Test: decouple the tests which access class member variables directly

Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 09:15:42 +00:00
fbef749cda
Test: separate common variables to EthernetTetheringTestBase
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

Changes:
1. Separate common variables from EthernetTetheringTest
   to EthernetTetheringTestBase.
Before:
  EthernetTetheringTest

After:
  [base class]                   [derived class]

  EthernetTetheringTestBase +--+ EthernetTetheringTest

2. Separate EthernetTetheringTest from aosp/2319857

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: I9bccc558dc8b955055a2927a1a600afd399b264f

Hungming Chen   authored and   Nucca Chen   commited 2022-12-02 07:18:43 +00:00
21308b5b2d
Test: decouple the tests which access class member variables directly
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

EthernetTetheringTest is going to separate test base class and
derived class. In order to encapsulate base class better, decouple
the following tests which access member variables directly.
- testStaticIpv4
- testLocalOnlyTethering
- testPhysicalEthernet
- testVirtualEthernet
- testVirtualEthernetAlreadyExists

Above tests change to use local veriables instead of class member
variables: mDownstreamReader, mDownstreamIface,
mTetheringEventCallback, mTetheredInterfaceRequester.

This can help to decouple the tests with class member variables and
these class member variables can be private in the
base class EthernetTetheringTestBase since the following commit.

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: Ifd855571337b34c1dfee5cb2791369de754bc94d

Hungming Chen   commited 2022-12-01 18:54:23 +08:00
1dbc674e13
Merge "Add ConfigInfrastructure lib to Android.bp"
Hassan Ali   authored and   Gerrit Code Review   commited 2022-11-24 13:33:28 +00:00
bfb0cdfa51
Add ConfigInfrastructure lib to Android.bp
As part of moving DeviceConfig.java to
packages/modules/ConfigInfrastructure, We need to add
ConfigInfrastructure lib dependency to Android.bp as DeviceConfig APIs
will not be part of the non-updatable part and will not be part of the
base module_current SDK so we have to add an explicit dependency.

Test: m
bug: 253019048
Change-Id: I29f993342e1baf4e75b30c8d99de10bc087a582b

Hassan Ali   commited 2022-11-23 11:41:43 +00:00
c4f63fa973
EthernetTetheringTest: remove isEthernetTetheringSupported
isEthernetTetheringSupported() has been not used since
using TetheringManager#isTetheringSupported in aosp/2143272.

Bug: 258637850
Test: EthernetTetheringTest
Change-Id: Ifc560613301393eeadb6df11688944b2dc629c35

Hungming Chen   commited 2022-11-17 10:59:33 +08:00
e28d70804d
TetheringConfiguration: force to select upstream automatically on U+
Simply the upstream selection since U+ device for tethering refactor.

Changes:
1. Support automatic mode only on U+ device.

2. Add two tethering tests to make sure that the resource config can't
   control automatic mode anymore. Expect that always automatic mode
   on U+ device. Also limit some existing tethering tests for R, S,
   or T.
   Changes of TetheringTest:
   - testAutomaticUpstreamSelectionWithConfigDisabled (U+) [new]
   - testLegacyUpstreamSelection (T-)
   - testChooseDunUpstreamByLegacyMode (T-)
   - testChooseDunUpstreamByAutomaticModeWithConfigDisabled (U+) [new]

3. Add two tethering configuration tests to make sure that automatic
   mode is always enabled no mater what the resource config or flag
   are on U+ device. Also limit some existing tethering tests for R,
   S, or T.
   Changes of TetheringConfiguration:
   - testChooseUpstreamAutomatically (T-)
   - testChooseUpstreamAutomaticallyAfterT (U+) [new]
   - testChooseUpstreamAutomatically_FlagOverride (R)
   - testChooseUpstreamAutomatically_FlagOverrideOnSAndT (S, T)
     (Renamed from testChooseUpstreamAutomatically_FlagOverrideAfterR)
   - testChooseUpstreamAutomatically_FlagOverrideAfterT (U+) [new]

Bug: 257941865
Bug: 257408654
Test: atest TetheringTest
Change-Id: I7ace317a1529177a84557741dc07d732b7f8cf89

Hungming Chen   commited 2022-11-15 22:14:21 +08:00
d15eb88619
Merge "Add isTetheringFeatureEnabled which use tethering namespace"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-11-15 08:58:23 +00:00
6660d2375f
Add isTetheringFeatureEnabled which use tethering namespace
This is no-op change. Tethering shouldn't use connectivity namespace
because it already be used for NetworkStack module. The new feature
should check isTetheringFeatureEnabled instead.

Bug: 238274852
Test: atest TetheringTests
Change-Id: I009f654d0bf8df7051b822e666e3206dd70a5523

Mark   authored and   Mark Chien   commited 2022-11-14 15:51:55 +00:00
25d3ac54fe
Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I7625fa386afe93823b97cb2ecb8fd09a5856c05b

Cole Faust   commited 2022-11-02 10:13:14 -07:00
22f05839f5
Merge changes I63467371,Id4405b70
* changes:
  BpfCoordinatorTest: add testDumpDoesNotCrash
  Move error count BPF map initialization into class Dependencies

Treehugger Robot   authored and   Gerrit Code Review   commited 2022-10-27 07:27:08 +00:00
319c97705f
Merge "IpServerTest: add test addRemoveTetherClient"
Nucca Chen   authored and   Gerrit Code Review   commited 2022-10-26 06:49:22 +00:00
db4ac8ea40
BpfCoordinatorTest: add testDumpDoesNotCrash
Simple dump test for improving tethering test coverage.

Bug: 255466740
Test: atest BpfCoordinatorTest
Test: dump the content of testDump

Output:
mIsBpfEnabled: true
Polling not started
Stats provider registered
Upstream quota: {}
Polling interval: 5000 ms
Bpf shim: mBpfDownstream6Map{OK}, mBpfUpstream6Map{OK}, mBpfDownstream4Map{OK}, mBpfUpstream4Map{OK}, mBpfStatsMap{OK}, mBpfLimitMap{OK}, mBpfDevMap{OK}
Forwarding stats:
 <empty>
BPF stats:
 ifindex: 1001: rxPackets: 0, rxBytes: 0, rxErrors: 0, txPackets: 0, txBytes: 0, txErrors: 0

Forwarding rules:
 IPv6 Forwarding rules by downstream interface:
  [null]: iif(iface) oif(iface) v6addr [srcmac] [dstmac]
   1001(rmnet0) 1003(1003) 2001:db8::1 [12:34:56:78:90:ab] [00:00:00:00:00:0a]
 IPv6 Upstream: iif(iface) [inDstMac] -> oif(iface) etherType [outSrcMac] [outDstMac]
  1003(1003) [12:34:56:78:90:ab] -> 1001(rmnet0) 86dd [00:00:00:00:00:00] [00:00:00:00:00:00]
 IPv6 Downstream: iif(iface) [inDstMac] neigh6 -> oif(iface) etherType [outSrcMac] [outDstMac]
  1001(rmnet0) [00:00:00:00:00:00] 2001:db8::1 -> 1003(1003) 86dd [12:34:56:78:90:ab] [00:00:00:00:00:0a]
 IPv4 Upstream: proto [inDstMac] iif(iface) src -> nat -> dst [outDstMac] age
  tcp [12:34:56:78:90:ab] 1003(1003) 192.168.80.12:-3087 -> 1001(rmnet0) 1.0.0.1:-3087 -> 140.112.8.116:443 [00:00:00:00:00:00] -
 IPv4 Downstream: proto [inDstMac] iif(iface) src -> nat -> dst [outDstMac] age
  tcp [00:00:00:00:00:00] 1001(rmnet0) 140.112.8.116:443 -> 1003(1003) 1.0.0.1:-3087 -> 192.168.80.12:-3087 [00:00:00:00:00:0a] -

Device map:
 ifindex (iface) -> ifindex (iface)
  1001 (rmnet0) -> 1001 (rmnet0)
Client Information:
 <empty>
IPv4 Upstream Indices:
 <empty>

Forwarding counters:
 INVALID_IPV4_VERSION: 1000

Change-Id: I6346737157936cff7e164bbfe78d9a98dab3395a

Hungming Chen   authored and   Nucca Chen   commited 2022-10-26 05:48:03 +00:00
df57abfd4b
Move error count BPF map initialization into class Dependencies
The preparation for testing BpfCoordinator#dump().
Used to wrap error count BPF map access to avoid SYS_SECCOMP on some
test device. Ex: cuttlefish.
https://android-build.googleplex.com/builds/tests/view?invocationId=I01200010101524265&testResultId=TR03228338750686157

Bug: 255466740
Test: atest BpfCoordinatorTest

Change-Id: Id4405b70bc6d500b35943b4f81b88e7515fff3b0

Hungming Chen   commited 2022-10-26 13:47:19 +08:00
771bc597b6
Merge "Remove unused TetheringConfigurationParcel fileds"
Mark Chien   authored and   Gerrit Code Review   commited 2022-10-21 07:50:23 +00:00
381e339647
Merge "Add toString() to Ipv6ForwardingRule"
Nucca Chen   authored and   Gerrit Code Review   commited 2022-10-14 07:27:03 +00:00
df46aeb098
Add new fields - |upstream_events| and |duration_millis| in stats.proto
Revise annotations in previous fields and deprecate |upstream_type|.

Ignore-AOSP-First: Merge conflict if submits in AOSP first.
Bug: 153942334
Test: statsd_testdrive 303
Change-Id: Id4d594f9238e18266dce5bf2ba238c1f86f655db
(cherry picked from commit 71c8495cea)
Merged-In: Id4d594f9238e18266dce5bf2ba238c1f86f655db

Wayne Ma   commited 2022-10-12 05:32:12 +00:00
fe6ecc6333
IpServerTest: add test addRemoveTetherClient
Bug: 250552545
Test: atest IpServerTest
Change-Id: Id8e801ccbf9a958c6b82de6022165d921761a86f

Hungming Chen   commited 2022-10-04 23:14:55 +08:00
afdf104d68
Add toString() to Ipv6ForwardingRule
Needed because default Ipv6ForwardingRule#toString doesn't dump
actual data. It is hard to know why two rule comparison failed
in the test failure.

Bug: 250552545
Test: atest BpfCoordinatorTest
Change-Id: Iaf29c888238573c7c9a0a4e0bd65fbe468084e51

Hungming Chen   commited 2022-10-04 23:14:55 +08:00
de5fb7370b
BpfCoordinator: ignore stopping event monitoring if never started
Ignore stopping monitoring if the monitor has never started
for a given IpServer.

Also fix the related bug in
BpfCoordinator#testStartStopConntrackMonitoring.

Bug: 250552545
Test: atest BpfCoordinatorTest
Change-Id: I7ac71f0ed52bf52244aadaa3c90ca8df239873e4

Hungming Chen   authored and   Nucca Chen   commited 2022-10-03 11:56:38 +00:00
09d163dfa8
Merge "Revert^2 "[ST02.2] Use the getters of DnsHeader""
Junyu Lai   authored and   Gerrit Code Review   commited 2022-09-22 02:39:42 +00:00
3e7778805b
Fix errorprone 2.15.0 errors
Bug: 246761518
Test: RUN_ERROR_PRONE=true m javac-check lint-check dist
Change-Id: I4b81ef161fab5ee80a1713de87b89500a88e625e

Sorin Basca   commited 2022-09-21 13:29:19 +01:00
14343732c3
EthernetTetheringTest: test testTetherClatTcp on S+ device
Only test testTetherClatTcp on S+ device because R device test
is blocked on b/234727688.

Bug: 234727688
Test: atest EthernetTetheringTest
Change-Id: I65a4a8c4fe13b8320b036380b9038af094ac95a5

Hungming Chen   authored and   Nucca Chen   commited 2022-09-20 10:24:32 +00:00
c79efc8e8e
EthernetTetheringTest: add testTetherClatTcp
Bug: 237369591
Test: atest EthernetTetheringTest
Change-Id: Ic66c22040ca8aa29b8399fabed066107a736e842

Hungming Chen   commited 2022-09-19 19:43:34 +08:00
b4f8a08825