to only run them when com.google.android.tethering is
installed on device. This does not change any existing CTS run.
The logic only applies when the test triggered by mts-tradefed
to make sure it runs appropriate set of tests against the device.
For example, the test will be skipped when running MTS on Q because
tethering and wifi are not on Q devices.
Bug: 154845935
Test: m mts && mts-tradefed run mts-tethering
Change-Id: I9e6bd60982d4ef67538ad506e7008366bbf35363
am skip reason: Change-Id I5db3cb28829847e74412d270db7d17b81c5e26a2 with SHA-1 5dd02e3103 is in history
Change-Id: I84e51f20f2b1d4161e70d1479266a8890501e9cc
The CtsNetTestCasesLatestSdk needs to build against platform (for hidden
API access), The JNI library libnativedns_jni used by
CtsNetTestCasesLatestSdk needs to build against stable SDK (for running
on Q). To fulfill the combination, property jni_uses_sdk_apis must be
set.
Bug: 151122313
Bug: 150904735
Bug: 150918852
Test: atest CtsNetTestCasesLatestSdk on R and Q platforms
Merged-In: I5db3cb28829847e74412d270db7d17b81c5e26a2
Change-Id: I8e9af302b487199b144f4fd791bc39d57f002fe2
(cherry picked from commit 452ef123caa60eeebc1744b14137197c47704d6b)
am skip reason: Change-Id I083529616dbf80421ea6a322bb57d2bb0f2bca62 with SHA-1 dfa5480414 is in history
Change-Id: Ic3590e3e47ec829fd4aeab29a1d292cac155cfdf
This reverts commit dd9608b7d1147a4eaf36ea634b9fc2f0feca1145.
Reason for revert: This CL made whole test failed.
Bug: 153624005
Bug: 150952393
Bug: 151122313
Merged-In: I083529616dbf80421ea6a322bb57d2bb0f2bca62
Change-Id: I002c39d6535fb31b13bc463812517fe1882f1884
(cherry picked from commit 98015badd01863fa4a79c089f371d9a50f2ae98c)
This reverts commit fb735de0e8.
Reason for revert: This CL made whole test failed.
Bug: 153624005
Bug: 150952393
Bug: 151122313
Change-Id: I083529616dbf80421ea6a322bb57d2bb0f2bca62
The CtsNetTestCasesLatestSdk needs to build against platform (for hidden
API access), The JNI library libnativedns_jni used by
CtsNetTestCasesLatestSdk needs to build against stable SDK (for running
on Q). To fulfill the combination, property jni_uses_sdk_apis must be
set.
Bug: 151122313
Bug: 150904735
Bug: 150918852
Test: atest CtsNetTestCasesLatestSdk on R and Q platforms
Change-Id: I5db3cb28829847e74412d270db7d17b81c5e26a2
am skip reason: Change-Id Iaed6285677f74a5ee6cc6684534ddc0758b25974 with SHA-1 fb735de0e8 is in history
Change-Id: Ic845fd65a2f16c233985ea97adbd1fddf577788d
It's possible that private DNS setting is not in the state we expected
when we tried to enable strict mode during tests. The problem here is
that there are 2 setting Uris(mode and specifier) relating to strict
mode, each of them might trigger private DNS setting changing evnet in
ConnectivityService.
Previously, we tried to enable strict mode with first set private DNS
mode and then private DNS specifier. This may result in 2 consecutive
private DNS changes events with very short intervals, which caused
conflicts between DnsResolver / NetworkMonitor and lead to flaky tests.
So
1. Change the order (mode and specifier) for enabling strict mode.
2. Change private DNS mode only when needed.
(If original mode is "hostname", then we only need to set
specifier)
Bug: 153624005
Bug: 153624702
Test: atest DnsResolverTest --rerun-until-failure 100
Merged-In: Iaed6285677f74a5ee6cc6684534ddc0758b25974
Change-Id: I566bdfa98dc070247b52fe29ca1f31cbd1bb8cc2
(cherry picked from commit 877af1ee3ed2c3a9e9256e216709908d2beb3bfb)
am skip reason: Change-Id I6272d7b297bdf0e641612a09ffe12942cc2b42e1 with SHA-1 e5e8ae9e1b is in history
Change-Id: I2c792e8e3dbeeafc840cdc1e3100a7209d331d7e
If the device is put into airplane mode before the network tests run,
the tests fail. This ensures that airplane mode is off before the tests
run.
Bug: 150788500
Test: atest CtsHostsideNetworkTests
Change-Id: I7a84be751e5e9efb534d48c6d8ff457875ebe716
It's possible that private DNS setting is not in the state we expected
when we tried to enable strict mode during tests. The problem here is
that there are 2 setting Uris(mode and specifier) relating to strict
mode, each of them might trigger private DNS setting changing evnet in
ConnectivityService.
Previously, we tried to enable strict mode with first set private DNS
mode and then private DNS specifier. This may result in 2 consecutive
private DNS changes events with very short intervals, which caused
conflicts between DnsResolver / NetworkMonitor and lead to flaky tests.
So
1. Change the order (mode and specifier) for enabling strict mode.
2. Change private DNS mode only when needed.
(If original mode is "hostname", then we only need to set
specifier)
Bug: 153624005
Bug: 153624702
Test: atest DnsResolverTest --rerun-until-failure 100
Change-Id: Iaed6285677f74a5ee6cc6684534ddc0758b25974
am skip reason: Change-Id Id65b7189202108b232905535587f8a282e48007b with SHA-1 8ddd0227a9 is in history
Change-Id: I0175b15e737b35d5c0f8aa0d69423e3e0a76a205
am skip reason: Change-Id I7e357c75a68244432231d59646ddf67c8d969c6d with SHA-1 a495965c67 is in history
Change-Id: I4a818d443aa5b5b5cbceda8b6ccf7d4950cdff57
Test will be affected by logic modification from different
NetworkSpecifiers. Since this test tries to test the behavior
of NetworkRequest but not NetworkSpecifier, use local defined
NetworkSpecifier to test to prevent repeating noisy breaks.
Also update test for testing invariant.
Bug: 154451660
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkRequestTest
Merged-In: I7e357c75a68244432231d59646ddf67c8d969c6d
Change-Id: I7e357c75a68244432231d59646ddf67c8d969c6d
Test will be affected by logic modification from different
NetworkSpecifiers. Since this test tries to test the behavior
of NetworkRequest but not NetworkSpecifier, use local defined
NetworkSpecifier to test to prevent repeating noisy breaks.
Also update test for testing invariant.
Bug: 154451660
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkRequestTest
Change-Id: I7e357c75a68244432231d59646ddf67c8d969c6d
am skip reason: Change-Id I1aa0e107cf6797b06dee4a15896c63321d822156 with SHA-1 63203afe0e is in history
Change-Id: I8d2805d76fddb14c2b3f6d999ef08fb07be89241
In R, to avoid data overages due to apps not detecting a
meteredness change, when a wifi network changes from unmetered
to metered the network will go down and will be replaced with a
new network. It will make NetworkCallbackTest fail because the
original design is getting the active network in setUp(). So once
the wifi reconnects, the network which is got in setUp() will be
meaningless and make the test fail due to network mismatches.
The new changes are:
1. Moving some initial pre-configurations into setUp().
2. Override the onCapabilitiesChanged() to check if network has
changed to metered or not.
3. Add unregisterNetworkCallback() into iMyService.aidl so that
NetworkCallbackTest can call it to unregister the network
callback.
4. Enlarge the timeout of connecting network and receiving
callback to prevent network cannot reconnect in time or
callback cannot be received in a short time.
Bug: 153485744
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests
Change-Id: I1aa0e107cf6797b06dee4a15896c63321d822156
Merged-In: I1aa0e107cf6797b06dee4a15896c63321d822156
In R, to avoid data overages due to apps not detecting a
meteredness change, when a wifi network changes from unmetered
to metered the network will go down and will be replaced with a
new network. It will make NetworkCallbackTest fail because the
original design is getting the active network in setUp(). So once
the wifi reconnects, the network which is got in setUp() will be
meaningless and make the test fail due to network mismatches.
The new changes are:
1. Moving some initial pre-configurations into setUp().
2. Override the onCapabilitiesChanged() to check if network has
changed to metered or not.
3. Add unregisterNetworkCallback() into iMyService.aidl so that
NetworkCallbackTest can call it to unregister the network
callback.
4. Enlarge the timeout of connecting network and receiving
callback to prevent network cannot reconnect in time or
callback cannot be received in a short time.
Bug: 153485744
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests
Change-Id: I1aa0e107cf6797b06dee4a15896c63321d822156
am skip reason: Change-Id I79f841682049707d7cc26bf1ecc3e5affc86d196 with SHA-1 f941ae9c03 is in history
Change-Id: I1ea3350bc0b9aa5dc325e0d96bd61b26ccb2edfe