The hostside VPN tests were failing because finalizers were
closing the ParcelFileDescriptors that we use to get socekt fds.
The close operations were causing the fds to be marked as invalid
(i.e., -1), causing the tests' system calls on them to fail with
EBADF.
Fix this by dup(2)ing the fds and closing the original objects.
Also, add some asserts to debug this sort of failure.
Fix: 35927643
Test: HostsideVpnTests passed 20/20 times on bullhead
Change-Id: If88530b5bd32622bd4726cd6f0907f731209bb43
The APIs are updated to not return a boolean status based on
the API Councils comment. So update the callsite accordingly.
Bug: 35858311
Test: make -j32
Change-Id: Ie9106ecddb2b15178ad37ec6f014d5cc7ce77c43
Merged-In: Ie9106ecddb2b15178ad37ec6f014d5cc7ce77c43
Updated/add CTS tests to validate createNetworkSpecifierXxx
API for open and passphrase modules. As these are (still)
single-ended CTS tests - they validate failure.
Bug: 26564544
Test: CTS passing
Change-Id: I07b76bee5a9b73780d341ac8511a2738ded751ca
Test Aware data-path creation API flow - failure.
Note: testing limited to failure since single device
testing doesn't have a peer
Bug: 30556108
Test: CTS tests pass
Change-Id: Ie15ad57d7331b21fbb6706091691bd5f87e1264e
Test that sending a message with invalid peer handle (null)
fails as expected.
Note: limited testing
- Single device testing doesn't have a peer
- Cannot create an invalid peer handle since opaque object
Bug: 30556108
Test: CTS tests pass
Change-Id: I72f4b67ea3c3dfc00aa48f6601d064b406dabde7
Validate the SUCCESS case of publish and subscribe
discovery sessions.
Bug: 30556108
Test: CTS tests pass
Change-Id: Ib88606cdf662560258890e2f274c85c3a8818206
Add CTS to verify initial session attach:
- Basic attach
- Attach with identity callback: use to verify MAC
address change on subsequent attach.
Bug: 30556108
Test: CTS tests pass/fail per expectations
Change-Id: I8c2d29be81bef600a2c9eac99868326473d72b6e
Initial CTS tests for Wi-Fi Aware:
- Add CTS test class for Wi-Fi Aware
- Setup/initialize
- Test the availablity API + broadcast
Bug: 30556108
Test: builds, CTS runs (test fails as expected)
Change-Id: Ibbc58c3ed7a9ad7312864d038fd34c7202222e82
Added a test for PPS MO (PerProviderSubscription Management Object)
tree parsing API and a test for Release 1 installation file
parsing API.
Bug: 35756298
Test: run the newly added PpsMoParserTest and ConfigParserTest
Change-Id: I6da40bef9609830afb80d8562e5bfb051920b541
Certain tests interacting with device idle
must set correctly both the normal and wear
device idle setting space.
Bug: 32183373
Test: Run on wear device and Nexus6P
run cts --skip-device-info -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDozeModeMetered_enabledButWhitelistedOnNotificationAction
run cts --skip-device-info -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
Change-Id: I6a53d29021a7d4a257b102a4d3bd5d2cc845c16f
Add tests to excercise new WifiEnterpriseConfig methods, including
setClientKeyEntryWithCertificateChain, and the new getters related
to it.
Bug: 34688653
Test: This is a test
Change-Id: I183166f5864c5ec77eb8590e2e0f521bbc7a39e7
Change the CTS test to reflect the change in behaviour of the
|disableOthers| flag in WifiManager.enableNetwork(). This will now just
be used as an indication to trigger connection to the specified network
instead of disabling all other configured networks.
Bug: 34765254
Test: Compiles
Change-Id: I97a5a84bb861e289d966552cea7f36d7dd4fd090
We have an upcoming change to Bionic that no longer allows us to treat
strlen("foo") as a constant expression, which causes this bit of code to
no longer compile. So, we need to either use __builtin_strlen("foo") or
sizeof("foo") - 1 instead. (Note that the *optimizer* can still turn it
into a constant, but optimization happens after we figure out if
something is actually a constant expression or not.)
sizeof("foo") is used elsewhere in this file, so I just went with that.
Bug: 32073964
Test: Now builds.
Change-Id: I2797ee75fd114e237de8e97c50549763c88f73f4
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.
Bug: 30188076
Test: make checkbuild
Merged-In: I0f34fe97154240e8f8eef6816df1c794da60351e
Change-Id: I7e3b028321c42b7427d79365eb3f51ddf896f930
Added CTS tests verifying, that adding a WifiConfiguration containing an
httpProxy will:
-Succeed if caller is DeviceOwner
-Fail if caller is not DeviceOwner
Test: Added two CTS tests
Bug: 14669153
Change-Id: I2c81492dba5052117a03a2aa7b3cc8ffb5d52d5f
Merged-In: I2c81492dba5052117a03a2aa7b3cc8ffb5d52d5f
Adding a test to catch future regressions with this code
path.
Bug: 34095140
Test: vogar --mode app_process tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I648ed87d4b9e7fa25787c150f08351c6faf55496
The isConnected() / isBound() behavior is new, the behavior
when bind() / connect() is called is not. See related
frameworks/base changes.
Test: Tests run under vogar.
Bug: https://code.google.com/p/android/issues/detail?id=35942
Change-Id: I8577212270f3b3e76ea015914eebddc0fe4a6afa
WiFi is not a CDD requirement so these tests should not fail when the
device under test does not have WiFi. The behavior is changed so that if
there is WiFi then both metered and unmetered tests will run. If there
is no WiFi and the current connection is metered then only metered tests
will run. If there is no WiFi and the current connection is not metered
then only unmetered tests will run.
Test: Successfully ran CTS test on both emulator and shamu.
BUG: 31648368
Change-Id: Ic643d2490e0a7e69b57a44599f1a4c57c67da873
Ensure that password is not output in toString() for an enterprise
credential.
Bug: 25624963
Test: Run this CTS test: run cts --module CtsNetTestCases --test android.net.wifi.cts.WifiEnterpriseConfigTest#testEnterpriseConfigDoesNotPrintPassword
Change-Id: I84a62ae5d37aa7d397203f41362dadb8ceba1e62
Symptom: It should be more reasonable to control battery saver function from setting DB instead of plugging/unplugging charger for “CtsHostsideNetworkTests” test case.
Root Cause: The test function “setBatterySaverMode” of “CtsHostsideNetworkTests” use command to set setting DB when trying to turn on battery saver. But while trying to turn off battery saver, it only use charger plug-in event. It should be more reasonable to turn off battery saver through similar DB setting as this function did at turning on.
Solution: To control battery saver function from setting DB.
Project:
Note:
Test done by RD:
Futher testing need Q team's support:
Bug: 31897608
Change-Id: Id70ba458e85f98393d7652bb4e79bd182172c60f
Put an app in standby, make it show a toast and ensure
that it doesn't come out of standby. This is to test
for a bug fix for the same behavior.
Bug: 31544592
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdle_toast
Change-Id: I796ecde8e346c308a27969d873e3ce384414fee3
I did this manually first, but came up with a much better way that
produced a slightly better result (verified the diffs against the next
branch). Sequence of commands:
# Checkout the last good commit (right before the first bad merge)
git checkout aa76e8b6fc8515bfc65d4b75456b74c26ee32f1e^
# Reset the HEAD pointer to the last bad merge, but not the worktree
git reset 3c197891b50d9ac5e5016f55551b6dff82f62f33
# Update the index
git add -A
# Apply all the changes that mattered between the above to commits
git cherry-pick -n 29cb19b774b6e0cb73851feb6877da5e42bba78e
git cherry-pick -n 0e9d107fcfbd3421b7988a4252a9965896019aba
git cherry-pick -n f19496887beb974c3bc9df9a57f6214a696417b1
git cherry-pick -n 939e2b253b798386ce53954626fd8044ecb18db6
git cherry-pick -n 02f07b5d5994b8345ebc86546e5f66524ac04dac
# Commit the changes
git commit
# Rebase the diffs on top of the latest nyc-dev-plus-aosp, since some
# changes have been manually applied, there will be a few merge
# conflicts
git rebase goog/nyc-dev-plus-aosp
All the SHA-1s above were discovered using a combination of this command
to find the changes actually submitted into nyc-dev-plus-aosp itself:
git log --oneline --first-parent goog/nyc-dev-plus-aosp
and then to find the original commits (that weren't marked as DO NOT
MERGE ANYWHERE):
git log --oneline --no-merges --stat aa76e8b..goog/nyc-dev-plus-aosp
Change-Id: Iec12619678cb8d011d2c6df26a34ce26e042b854