27604018f783bf6354a13870b3e7785edca69b5f |
|
28-Sep-2016 |
Paul Duffin <paulduffin@google.com> |
Detect and fix resource leakages in tests Tests that test those classes that use CloseGuard to detect reosurce leakages are switched to use TestCaseWithRules and ResourceLeakageDetector.getRule() to detect any resource leakages and the leaks fixed. A number of tests could not be fixed due to bugs in the core classes so a new DisableResourceLeakageDetection annotation was added as part of this change. A method annotated with that does not perform resource leakage detection. The affected tests were annotated with a description and a reference to an associated bug. This uses try-with-resources to aid in closing resources. While that does provide some benefits it is all too easy to change the behavior of the test unless care is taken. To avoid that it is important not to merge it with an existing try block such as those which follow the following pattern: try {... fail()} catch(..) {} Merging them could result in the test catching and ignoring exceptions thrown during the creation of the resource which is almost certainly not what the test was intending. Test: Tested with vogar and CTS Bug: 31542223 Change-Id: Id32bb40fe04eb9719d7e6cd367abb53118b21832
|
5ccb2b3621f633708eb3ae1fd0f27f88bdb32a9d |
|
29-Jan-2015 |
Narayan Kamath <narayan@google.com> |
Fix deflater in / out counts for inputs > 4G. The underlying inflate & deflate can process any amount of data correctly, since the protocol is chunk based (the size of each chunk is limited to 32 bits, usually) and there is no limit to the number of chunks. On LP32, the stream counters are limited to 32 bit counts and the manual recommends that the caller maintain their own counters to support larger counts. <quote> Note however that the strm.total_in and strm_total_out counters may be limited to 4 GB. These counters are provided as a convenience and are not used internally by inflate() or deflate(). The application can easily set up its own counters updated after each call of inflate() or deflate() to count beyond 4 GB. </quote> Change-Id: I066e1141935154773360c1b9f94c56bd604f8474
|
b814b1850f5ed997ea1e7f574c8fc0df6a693c36 |
|
09-Sep-2010 |
Jesse Wilson <jessewilson@google.com> |
Address test failures in java.util.zip. Some deflater tests fail because they expect a specific byte sequence in the compressed form. Our compressed form is valid but has a different sequence. I've written new tests to cover the related APIs and suppressed the broken tests. The other deleted tests are duplicated exactly from Harmony. I'm removing our copy. Change-Id: If480d54948e634e4f6b1018da30951a1d4d07b49
|
4557728efb66c455a52b7669a8eefef7a9e54854 |
|
11-Aug-2010 |
Jesse Wilson <jessewilson@google.com> |
Moving tests to be under the libcore.* package. This is indended to make it easier to run on VMs that restrict the packages from which application classes can be loaded. For example, on the RI you need to use the bootclasspath to load these tests. Change-Id: I52193f35c5fcca18b5a3e1d280505b1e29b388af
|