Make sure to wait first and then check the expected state rather than
check the expected state first and then waiting.
Bug 6293413
Change-Id: Ibcb1127b935708c51fafdc8624cb3a7eefc01bda
com.android.cts.stub is growing very large. Split apart some of
the popular components into separate static libraries. This
should allow packages to depend on the components they need
rather than all of cts.stub.
Current code at the moment doesn't have to be changed, because
I have CtsTestStubs depending on these new shared libraries.
However, change the net package to depend on the ctstestserver
static library as a proof of concept rather than including
its source directly.
Change-Id: I32c54eab3ddfb1d4391d6ffc347fbc9cb2fe97f9
Explicitly include CtsTestServer in Android.mk to eliminate the
dependency to cts.stub. This allows net.cts to instrument itself,
and it also allows network-specific JNI code to be added in the
same package.
Change-Id: I624f87e0112619c5b97f2c3589933f666665fa8e
These annotations are not being parsed by any program.
Also they are distracting to readers and are painful to
maintain. Furthermore, they prevent us from adding the
LOCAL_SDK_CURRENT clause to Makefiles which is useful
to detect and stop us from using private APIs.
Change-Id: Id93b3a80c73df808c342e489f1434261f288204c
buildCts.py was the central script that generated all the
test package XMLs each time CTS was built. This had a
couple problems:
1. All the XML files for ~40 packages needed to be made
every time CTS was made. Even if those packages were
not touched at all.
2. Couldn't shard the XML generation process across the
available cores on a machine. A pool was added to the
python script, but it was set to a fixed number.
This change moves the test XML generation into a
smaller Java program called "cts-java-scanner" and
the doclet it relies upon to scan the Java files
into "cts-java-scanner-doclet.jar". The output of
the scanner like "cts-native-scanner" for native EXEs
is piped to the existing cts-xml-generator to
produce the test XMLs.
New CTS specific rules replace the standard
BUILD_PACKAGE and BUILD_HOST_JAVA_LIBRARY. They just
add extra rules for the package XML. The BUILD_CTS_PACKAGE
rule also adds a rule for copying the "package.apk"
to something more like "CtsFooTestCases.apk" to the
test case out directory. All the apks, exes, and xmls
are now thrown into a "cts-testcases" directory, before
they are copied to the final CTS distribution.
This change should prevent rebuilding the XMLs
unnecessarily and make rebuilding CTS quicker while
writing tests.
There are still the libcore tests that are always rebuilt,
but they can be adapted to fit into this model someday...
Change-Id: I52a916aa37fd679057e2709bb0ccec694c9fca01
Move the ListeningPortsTest from android.net.cts to android.security.cts,
to better indicate that this is a security related test.
Start triggering test failures when a process is bound to the loopback
interface. In those cases, it's always better to use a UNIX domain
socket instead of a locally bound IP socket. UNIX domain sockets
can be protected with unix filesystem permissions, or
getsockopt(SO_PEERCRED) can be used to indicate who is on the
other end of the socket.
Drastically fix the documentation to explain why this test is present.
Modify the IP addresses and port numbers to be more human readable.
Change-Id: Id83aadd1455279a1a2d3fb4fb1915af558355aca
In /proc/net/udp6 and /proc/net/tcp6, the addresses stored
in that file are in network byte order. As a result, the IPv6
loopback address, ::1, is stored as
00000000000000000000000001000000 NOT
00000000000000000000000000000001
Bug: 5473686
Change-Id: I73098d52c981c48d82423c8ce99b6b20d11a5568
* commit 'e54f4889f65df9955e22a8adbbb8c1527220103e':
Data call establish time is related to network condition which can’t be controlled by the device. Extend the time limitation to 30 seconds to cover most of the cases.
* commit 'bb1ababef8fd8f0ba3e671b426ccc0d26f115ff7':
Data call establish time is related to network condition which can’t be controlled by the device. Extend the time limitation to 30 seconds to cover most of the cases.
- Add UID of listener to error message.
- Convert hex port number to decimal for easier reading by humans.
Change-Id: I0b8edcf14ebd0c039b936055a265f4706558f9fe
Bug 5178134
Some network types can throw SecurityExceptions and depend on the
build configuration. Don't fail the test if those throw exceptions.
Change-Id: I5365f85280a348ef1777d05ce50b2dff17a1312f
Bug 4554251
This test launches multiple downloads at once to check that the
device can open up multiple sockets without OOMing. One test
tries to use wifi if available and the other tries to use
mobile by disconnecting wifi.
The CtsTestServer was modified to handle responses in separate
threads to test concurrent downloads.
Change-Id: Ifa1a11f409c69c1ae3ce621bf0542e0be56b50e0
Update the test to support a new enum value.
Once the SignatureTest is fixed to check enums there
shouldn't be any need for these enum checking tests.
Change-Id: I85d75e86453c37a35f8be9e15d99dd47c690f6ea
Bug 4322307
Fixed some other assertions that didn't check for
either CONNECTING or CONNECTED. Cleaned up some
code and removed some extraneous checks.
Original description:
"Fix cts tests for Wi-Fi only devices.
For Wi-Fi only device,
startUsingNetworkFeature() returns Phone.APN_TYPE_NOT_AVAILABLE
stopUsingNetworkFeature() return 1;
In NetworkInfoTest:
cm.getAllNetworkInfo() returns an array of NetworkInfo.
But the index is not based on network type."
Change-Id: I0b5e3d0cfe5fac18bca0a5ca2ce4cc73bc4dfa16
Do not listen to supplicant state change for wifi disable action,
instead depend on wifi state changed action
Bug: 4242273
Change-Id: Ie53ff42d5e51bbc9f28d93a435fa3315611d342e
For Wi-Fi only device,
startUsingNetworkFeature() returns Phone.APN_TYPE_NOT_AVAILABLE
stopUsingNetworkFeature() return 1;
In NetworkInfoTest:
cm.getAllNetworkInfo() returns an array of NetworkInfo.
But the index is not based on network type.
bug#: 3513630
Change-Id: Ied0684a9fe2152dae242d779efe3dffd6c9c0609
The test may be flaky because it depends on a live server.
Switch to a different server that may be more reliable.
Bug: 3188260
Change-Id: Ibba872489650914db8ddd9a117529556787f66ec
Device can still have a valid networkId even after disconnection
if it was associated with AP, getWifiState is a better check to
get valid state.
Change-Id: I31a8ca38f304fbf639e1f3111be4b5ed406e3b3c
Bug 3189208
Removing this test due to potential problems with GB. This will need to
be brought back and investigated.
Change-Id: Ifeafdf44464c652b063edfb51c5f7931624b6973