summaryrefslogtreecommitdiffstats
path: root/luni
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add more debugging to the DigestTest" into marshmallow-cts-devDaniel Xie2015-12-031-12/+21
|\
| * Add more debugging to the DigestTestKenny Root2015-10-271-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | This test sometimes fails, but we don't know what the coefficient of variation is on the test results. Add this to the debug output so we can see if there is just some wild swing during testing. Also add a few rounds of warm-up as well. Bug: 24011092 Change-Id: Ic58f106f68eb93976e3f030e2f23e0156fe84be8 (cherry picked from commit 5fe1cd001f38fba460ac0ce5c15b85250e400f25)
* | Fix time calculation in test_SSLSession_getLastAccessedTimezhulin09102015-10-301-1/+1
|/ | | | | | | | | | | | | | | [root cause] Time precision in NativeCrypto SSL_SESSION_get_time is second, ignore millisecond. Then, assertTrue( Math.abs(s.server.getLastAccessedTime() - s.client.getLastAccessedTime()) < 1 * 1000); is not rigorous. [changes] modify diff time of s.server.getLastAccessedTime() and s.client.getLastAccessedTime() <= 1*1000 Bug: https://code.google.com/p/android/issues/detail?id=183898 (cherry picked from commit 3f49882b1d3316e37d8312d707c29261d14ece65) Change-Id: Ib0d5eb512f717f1fd88818eac5bf8ef0e5cbac6b
* am 45b87713: am 3e8abdd9: am 57601a42: am d387c0ad: Merge "Fixes and ↵Neil Fuller2015-08-241-37/+67
|\ | | | | | | | | | | | | improvements for SerializationTest" into lollipop-cts-dev automerge: 660504a * commit '45b87713e7b0a50ffa369a6e0674580281e37d38': Fixes and improvements for SerializationTest
| * am 3e8abdd9: am 57601a42: am d387c0ad: Merge "Fixes and improvements for ↵Neil Fuller2015-08-241-37/+67
| |\ | | | | | | | | | | | | | | | | | | SerializationTest" into lollipop-cts-dev automerge: 660504a * commit '3e8abdd9bdca823a635aac3adacf71ef227b18e1': Fixes and improvements for SerializationTest
| | * Merge "Fixes and improvements for SerializationTest" into lollipop-cts-devNeil Fuller2015-08-241-37/+67
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | automerge: 660504a * commit '660504acb29860588107fdf175768e9b036fd3ff': Fixes and improvements for SerializationTest
| | | * Fixes and improvements for SerializationTestNeil Fuller2015-08-201-37/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests were order-dependent and flawed: test support classes were used in multiple tests but each relied on it being possible to detect static initialization of those classes. There was an incorrect assertion. This change splits out unique test support classes for those that need them, adds more assertions and fixes the broken assertion. Also tidies up some warnings. Bug: 23031484 Change-Id: Ia3bb32dd1dbd02a74931604cae424d7e9312c76d (cherry picked from commit 729d4ecafff8e6af5a71e4fecb2007917cbc2e2a)
* | | | am 236dcb77: am cd07c28b: am 8fd977f6: am bebe6fa7: Merge "Revert "Revert ↵Neil Fuller2015-08-071-18/+8
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | "Changes associated with an OkHttp bad proxy response fix""" into lollipop-mr1-cts-dev * commit '236dcb7781bbacb52f9a0834198ca99379c87a84': Revert "Revert "Changes associated with an OkHttp bad proxy response fix""
| * | | am cd07c28b: am 8fd977f6: am bebe6fa7: Merge "Revert "Revert "Changes ↵Neil Fuller2015-08-061-18/+8
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | associated with an OkHttp bad proxy response fix""" into lollipop-mr1-cts-dev * commit 'cd07c28b3c4178600bf38a55e9f4535d9034c6f9': Revert "Revert "Changes associated with an OkHttp bad proxy response fix""
| | * | Revert "Revert "Changes associated with an OkHttp bad proxy response fix""Neil Fuller2015-08-051-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 11c3934f61c6c873fd9caae16947285bc0068965. commit 11c3934f61c6c873fd9caae16947285bc0068965 was incorrectly merged from lollipop-cts-dev into lollipop-mr1-cts-dev. Change-Id: I66fa65f08397fb34d6af1cb73d2c0fa7f57ef1b6
* | | | am a84fc26d: am c1c9f15e: am 3a6966a3: am 8426987b: Merge "Revert "Changes ↵Neil Fuller2015-08-051-8/+18
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | associated with an OkHttp bad proxy response fix"" into lollipop-cts-dev automerge: 34d183b * commit 'a84fc26d15aed853ec69632ceb5999ae9431be28': Revert "Changes associated with an OkHttp bad proxy response fix"
| * | | am c1c9f15e: am 3a6966a3: am 8426987b: Merge "Revert "Changes associated ↵Neil Fuller2015-08-051-8/+18
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | with an OkHttp bad proxy response fix"" into lollipop-cts-dev automerge: 34d183b * commit 'c1c9f15edfbc1f86b679c90f963e9eb852ad9c53': Revert "Changes associated with an OkHttp bad proxy response fix"
| | * | Merge "Revert "Changes associated with an OkHttp bad proxy response fix"" ↵Neil Fuller2015-08-041-8/+18
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | into lollipop-cts-dev automerge: 34d183b * commit '34d183b404333627266d568e905a60e2be3a06f3': Revert "Changes associated with an OkHttp bad proxy response fix"
| | | * Merge "Revert "Changes associated with an OkHttp bad proxy response fix"" ↵Neil Fuller2015-08-041-8/+18
| | | |\ | | | | | | | | | | | | | | | into lollipop-cts-dev
| | | | * Revert "Changes associated with an OkHttp bad proxy response fix"Neil Fuller2015-07-171-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 467a6809cd31cbfa94c326415ff3c441d9b1e8be. commit 467a6809cd31cbfa94c326415ff3c441d9b1e8be is present in lollipop-cts-dev but not lollipop-release. This causes the tests to fail when run against a lollipop-release build. DO NOT MERGE ANYWHERE Bug: 22546532 Change-Id: I4582824e94679213f27352e18e7d9bb985954909
| | | * | Fixes associated with the tzdata 2015a updateNeil Fuller2015-08-031-8/+0
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chile has changed the rules for DST. The test duplicates testApia below it, so it can be removed. Bug: 19212588 (cherry-picked from commit ebfb8f8b0ee0c0a75d92d8fc56ccd0d87ee7e9ad) Change-Id: Ibe7c0dc510813826dca13993b6600d368e03740a (cherry picked from commit a88856485e84ad5cd45a6e16310490d871a679c4)
* | | | Fix broken Zip64 extended info size checks.Narayan Kamath2015-07-314-32/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We assumed that all fields listed in the extended info layout were always present. This is not the case. Only the size / uncompressed size are required fields (in the LFH) and the directory offset is required only if the corresponding field in the regular record is 0xFFFFFFFF. The same goes for disk number too, but we don't support spanned archives, so we can assume that it's never present. This change also fixes a spec violation where we were *not* writing 0xFFFFFFFF to the central directories LFH offset field when we were putting the actual information in the Zip64 Extended info field. This change also adds lower level unit tests to some of the Zip64 parsing functions since it's pretty hard (impossible ?) to find a Zip64 tool that outputs stuff in the format we want. bug: 22851464 (cherry picked from commit 837aeb356c331960073e5ddbf449779c6194f164) Change-Id: I031b3151b7deeda8a0a98acfba3f5a906c0c360c
* | | | Update code name / version number.Narayan Kamath2015-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | bug: 19890045 Change-Id: I058972a86021846429263c59869544627a073686
* | | | Late binding: add Cipher#init checksKenny Root2015-07-232-85/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cipher should check that the chosen CipherSpi actually supports initalization with the given parameters. If not, it should return the first exception that it ran into so that the developer can have an idea of why the initialization failed. This is most likely do to unsupported key or algorithm parameters. Collapse some functions into one so it's easier to keep track of the exception that should be thrown should all else fail. Also since we try to initialize during the CipherSpi selection, there is no need to initialize the returned CipherSpi again. Also remove an instanceof check to be in line with other implementations that just throw a ClassCastException since we now will try other providers before falling back to throwing the unchecked exception. This might actually provide better debug messages for a developer working on a CipherSpi provider. (cherry picked from commit f591462f7901011b2bce61c3cbbdc54840e5b4bc) Bug: 22573249 Change-Id: Ieec97a8f00e9c0c3889520a3ec9f8bc4e514b35a
* | | | Late binding: add more Cipher testsKenny Root2015-07-232-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any provider throwing an unchecked exception should not prevent the next possibly working provider from having a chance. (cherry picked from commit f7cae3971c030257c62ebc20e9e5dfd6d734b34c) Bug: 22573249 Change-Id: If3f508ed3e87de58b39ab380fb298a92fb1b593b
* | | | Late binding: add tests for init-time rejectionKenny Root2015-07-232-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cipher should try to to initialize the CipherSpi it selects before returning it as a successful match. These tests ensure that it is correct. (cherry picked from commit 85d1800ec694bb4c2f629073d79520c4a7ad0cc8) Bug: 22573249 Change-Id: I12ed5021cf85fccb5d04a0904a302f6cd3569c3d
* | | | am c8596a95: am 157dae46: am 88051ed3: Merge "Add testInterfaceProperties() ↵Neil Fuller2015-07-131-12/+33
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | . Move Ethernet verification out of testLoopback()." into kitkat-cts-dev automerge: 19679b0 automerge: 2cc1870 * commit 'c8596a95c03ce733ba8202c938f3c17a8f0b7827': Add testInterfaceProperties() . Move Ethernet verification out of testLoopback().
| * | | am 157dae46: am 88051ed3: Merge "Add testInterfaceProperties() . Move ↵Neil Fuller2015-07-131-12/+33
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | Ethernet verification out of testLoopback()." into kitkat-cts-dev automerge: 19679b0 automerge: 2cc1870 * commit '157dae465d0190edb0fb0bed8ad779cadd755faf': Add testInterfaceProperties() . Move Ethernet verification out of testLoopback().
| | * | Merge "Add testInterfaceProperties() . Move Ethernet verification out of ↵Neil Fuller2015-07-131-12/+33
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | testLoopback()." into kitkat-cts-dev automerge: 19679b0 automerge: 2cc1870 * commit '2cc187049ed0a5fc6168ffdb8f837b59462e5b53': Add testInterfaceProperties() . Move Ethernet verification out of testLoopback().
| | | * Merge "Add testInterfaceProperties() . Move Ethernet verification out of ↵Neil Fuller2015-07-131-12/+33
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testLoopback()." into kitkat-cts-dev automerge: 19679b0 * commit '19679b0fde4e1a7321101b558e2f4961daec923e': Add testInterfaceProperties() . Move Ethernet verification out of testLoopback().
| | | | * Add testInterfaceProperties() . Move Ethernet verification out of ↵Tochau Hoang2015-07-081-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testLoopback(). Add testInterfaceProperties(): verify if each interface can be retrieved using getByName(). Use type properties of these interfaces to determine if they are Ethernet. Perform address tests on all active Ethernet interfaces. Move Ethernet verification out of testLoopback into testInterfaceProperties. Change-Id: I1641f2995f4ceb858eda38d1ba6137382b2c7ba3 Signed-off-by: Tochau Hoang <tochau.hoang@panasonic.aero>
| * | | | am 45c2f8a3: am a17cd656: Merge "Explicitly set DateFormat.is24Hour value ↵Daniel Xie2015-07-021-0/+6
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | needed by tests" into lollipop-mr1-cts-dev * commit '45c2f8a384ab789ac0410a02debe32d56105ae96': Explicitly set DateFormat.is24Hour value needed by tests
| | * | | Explicitly set DateFormat.is24Hour value needed by testsNeil Fuller2015-06-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests fail under CTS if the device is set to use the 24 hour clock. The tests that depend on the value of the setting are now being explicit. Bug: 20899571 Bug: 20937589 Bug: 20939139 Bug: 20378566 Bug: 21585934 Bug: https://code.google.com/p/android/issues/detail?id=162384 (cherry-picked from commit 38a0b85afd4231f46fac59e59ee38729bd5154c4) Change-Id: I1a369baeeac929ef010e7906e92544b9f483f02c
| | * | | Merge "Add exceptions for test_connectLjava_net_SocketAddressI" into ↵Daniel Xie2015-06-081-0/+12
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lollipop-cts-dev automerge: 2016dc6 * commit '2016dc66a98087c57a15d097fcd04e1ed171e57c': Add exceptions for test_connectLjava_net_SocketAddressI
| | | * | Add exceptions for test_connectLjava_net_SocketAddressITiberiu Breana2015-06-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OldSocketTest's test_connectLjava_net_SocketAddressI would sometimes fail on certain networks. The connection attempt to the 'non-reachable' IP would be reset by a local router before the expected timeout occured, thus causing the test to fail. This change adds additional catch clauses for cases like this, looking for ECONNREFUSED messages. Bug: 18143878 Change-Id: I99a500d5c95cc25aa52ef231e6de43233f3e5316 Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> (cherry picked from commit d3ba3eb7a3fa67c1de2cb7a5ba999dcf91c13a91)
| * | | | am 3ad9b586: Merge "Fix problems with DexClassLoaderTest." into ↵Richard Uhler2015-06-021-285/+163
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | lollipop-cts-dev automerge: 7feb222 * commit '3ad9b58657e3abff45108d89406e2180adf2d77a': Fix problems with DexClassLoaderTest.
| | * | | Merge "Fix problems with DexClassLoaderTest." into lollipop-cts-devRichard Uhler2015-06-011-285/+163
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | automerge: 7feb222 * commit '7feb222f57a3f9ce9d03cb574486e05533f8ef9f': Fix problems with DexClassLoaderTest.
| | | * | Fix problems with DexClassLoaderTest.Richard Uhler2015-05-291-285/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a problem with the DexClassLoaderTest where oat files from previous tests were being cached and reused for later tests. Now each test uses its own directory for loading-test.dex and friends so they are treated as separate dex files from test to test. As part of this fix, the helper functions for the tests were reorganized. Bug: 21033982 (cherry picked from commit 5099b54aaed531ebbbeefacdca4c7ffaf458e3da) Change-Id: I175184277a585840eca50122cf6898f00823ef3e
| | * | | Work around issues for MR1 release associated with timezone issue.Neil Fuller2015-02-042-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the tests that were using Pacific/Apia and replace with America/Santiago instead. Pacific/Apia is missing translations in the version of CLDR shipped with MR1. America/Santiago fits the criterion of "has no short names". Bug: 19212588 Change-Id: If241736446fdbbc98464952edad9cbfefc289cb6
* | | | | Merge "javax.crypto.Cipher: try less specific Cipher/Mode/Padding ↵Sergio Giro2015-07-133-24/+80
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | combinations before throwing InvalidKeyException" into mnc-dev
| * | | | | javax.crypto.Cipher: try less specific Cipher/Mode/Padding combinations ↵Sergio Giro2015-07-133-24/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before throwing InvalidKeyException Also, return saved spi in getSpi instead of recomputing a new one Bug: 22208820 (cherry picked from commit 8157603ccf1ff124c5bebc8755404a9a825f47d3) Change-Id: I30a06ef7d9234769b5592a0c7d665c8afa2a8ff8
* | | | | | Fix KeyPairGeneratorTest.Narayan Kamath2015-07-101-17/+25
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly exclude AndroidKeyStore from testing given that it's tested elsewhere. Also use the same set of providers to test (generated at setup) for all tests. bug: 21211314 (cherry picked from commit a02da73e5741c02408fa82c189d6b0921d399b20) Change-Id: Idcddfd223033314be1788b21caf3cf89767bccf4
* | | | | Add getxattr/setxattr/removexattr syscalls.Jeff Sharkey2015-07-028-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 20275572 Change-Id: I958056f757f095ad6278624e293a5583d9cee822
* | | | | Merge "libcore: use default SecureRandom in KeyGen DSA tests" into mnc-devSergio Giro2015-06-262-6/+2
|\ \ \ \ \
| * | | | | libcore: use default SecureRandom in KeyGen DSA testsSergio Giro2015-06-262-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While generating key pairs, BouncyCastle checks that random numbers are strong enough. Tests were using a mock random generator that generates the constant 10. Bug: 19657861 (cherry picked from commit 098bc41d846f847a6551209d65dbb74bfea3bb00) Change-Id: Ifd1401f9b386e4039b8f51af65e5e7dc5fad15e2
* | | | | | Add ENONET to OsConstantsErik Kline2015-06-242-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 19537384 Change-Id: I155f3db741bdac96f1ecb1ccb15b31faab85e819 (cherry picked from commit 959a23e37abdfa26059e3770eacfe36dea8fc01c)
* | | | | | libcore: remove unnecessary assertion in testNewConstructors_SuccessSergio Giro2015-06-221-1/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | Change-Id: Ib97a6d9a01d30ea708e79fe10d273e1bb752dff9 (cherry picked from commit 14ba1a7bfb28a300ba9679cd9f402ee3cd48c249)
* | | | | Make sure the Services cache is refreshedKenny Root2015-06-222-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the class initialization, a special path is taken when all the built-in providers are initialized. This means that the "needsRefresh" flag is not set initially and the cache is not refreshed when the SecureRandom service is checked. Bug: 21970647 Change-Id: Idb796ec5e3ac04424e5fd3a90607666ae23817d5 (cherry picked from commit 10dced1155cb3689ca63383a3b0b794bc3735268)
* | | | | ProviderTest : make sure alias / algo. lookups are case insensitive.Narayan Kamath2015-06-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | bug: 21870226 Change-Id: I6c45ef97a9f24f74f0b3ad0098ccb9ef14ddd349
* | | | | ProviderTest: Add provider name to failure message.Narayan Kamath2015-06-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug: 21870226 Change-Id: I1d91661599276394343b36a6601026ad46fc6b30
* | | | | libcore: removed unnecessary code in SSLSocketTestSergio Giro2015-06-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was possibly causing a race condition (see b/21776011), for instance, in case readFirstReceivedChunkFuture was still executing IoUtils#closeQuietly while the thread was cancelled. Bug: 21776011 (cherry picked from commit c22dd77f727262ed8105b8b638aeb817997914fd) Change-Id: Ibb20a98102d5bdc9ac3eaa0b875801ab218356f1
* | | | | Merge "Do not blacklist serial numbers that are too short" into mnc-devKenny Root2015-06-151-15/+0
|\ \ \ \ \
| * | | | | Do not blacklist serial numbers that are too shortKenny Root2015-06-151-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baseline Requirements say the serial number must have 20-bits of entropy, but some certificates are issued not in compliance. This causes issues where they are falsely marked as blacklisted. Until there is issuer + serial number matching, we can just use the pubkey matching for the certificates that are blacklisted with non-compliant serial numbers. Bug: 21736046 Bug: 21816853 Change-Id: I44e6d490099fbe1da2f5afb5ef61196a4593e04f
* | | | | | Merge "Fix X509CertificateTest#test_Provider." into mnc-devAlex Klyubin2015-06-151-0/+7
|\ \ \ \ \ \
| * | | | | | Fix X509CertificateTest#test_Provider.Alex Klyubin2015-06-151-0/+7
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test got broken by AndroidKeyStore Provider exposing a Signature implementation which does not accept vanilla public keys -- it only accepts AndroidKeyStore Provider's public keys. The fix is to skip AndroidKeyStore Provider in this test. Bug: 21814211 Change-Id: If6a2241d6e3292ab9de94d14a24fd958eeb1cbf5