History log of /libcore/luni/src/test/java/libcore/libcore/io/OsTest.java
Revision Date Author Comments
382bdddf5333e6c5699e9192c88b08066a741d56 09-Apr-2018 Pete Gillin <peteg@google.com> Revert "Add getgroups()/setgroups() to libcore.Os"

These (@hide) methods are unused, and the team who initially requested
them no longer need them. Also, the tests for setgroups recently
started failing (b/77599196).

This reverts commit 44177e6982a62506127a857070a2452956c3f0f1.

Bug: 77599196
Test: Treehugger

(cherry picked from commit 1925ee9be8abc4898626a14e54dde70015e0ed53)

Change-Id: Ia22ae6ab91503b221dd9fc8232c6fe651b25689e
Merged-In: Ia22ae6ab91503b221dd9fc8232c6fe651b25689e
12ccd43edf173679fddc32c3304ebac5372ccd09 09-Apr-2018 Pete Gillin <peteg@google.com> Revert "Fix OsTest for different possible setgroups() return values."

This test is being deleted in a different change in this topic.

This reverts commit efbd4adaf39495f02de043866e3980d0e8cf08d2.

Bug: 77599196
Test: Treehugger

(cherry picked from commit 7334f6b154589400d5494b9b1c2d2e042de20280)

Change-Id: I7ef7ecf576db104ea5d0f84638d036842d7b5046
Merged-In: I7ef7ecf576db104ea5d0f84638d036842d7b5046
5310ea4af51082e4a775d31615daaa59754d003e 17-Jan-2018 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add splice(2) syscall support

Splice can be used to speed up file copy operations
by avoiding moving any memory between kernel/user space.

Test: vogar OsTest & BlockGuardOsTest
Bug: 72004777
Change-Id: Ied19a7522eaea75dbc67094e15d54b8cc8e99db4
ec48559bf5f1b62b7cdddfbe729cd7674b5ef2ad 10-Jan-2018 Enrico Granata <egranata@google.com> Add a test case for O_DIRECT

Change-Id: I705fd21ff9972469cf17cdc8fbf5dacf41301a5d
Fixes: 70943835
Test: vogar OsTest.java
e3a3a06a94a50d31b7033e496f23becb0f1329c7 01-Nov-2017 Tobias Thierer <tobiast@google.com> Replace libcore.util.Mutable{Int,Long} with Int{32,64}Ref.

Since the new classes Int{32,64}Ref live in the package
android.system, which is fine for libcore to depend on,
there is no longer a need to have libcore.util.Mutable*.

This CL migrates all usages to the new classes.

Test: CtsLibcoreTestCases
Bug: 67901714

Change-Id: Icb55f778e05f6083d6d93b4c50fa76211dfa16c7
dfee8628760698554f5fb81663c001813bc55537 25-Oct-2017 Tobias Thierer <tobiast@google.com> Remove deprecated android.system.Os.{ioctlInt,sendfile,waitpid}.

These three methods were recently deprecated because their signatures
depend on android.util.Mutable{Long,Int}. A follow-up CL is moving
those classes to framework, which means that they will no longer be
accessible to libcore at compile time.

Bug: 67901714
Test: Treehugger

(cherry picked from commit f39b8c036d159d740feffef77199def2618348c0)

Change-Id: Iec279d3adc4d8b2337037c277a7e1597e912e16d
Merged-In: Iec279d3adc4d8b2337037c277a7e1597e912e16d
f39b8c036d159d740feffef77199def2618348c0 25-Oct-2017 Tobias Thierer <tobiast@google.com> Remove deprecated android.system.Os.{ioctlInt,sendfile,waitpid}.

These three methods were recently deprecated because their signatures
depend on android.util.Mutable{Long,Int}. A follow-up CL is moving
those classes to framework, which means that they will no longer be
accessible to libcore at compile time.

Bug: 67901714
Test: Treehugger

Change-Id: Iec279d3adc4d8b2337037c277a7e1597e912e16d
efbd4adaf39495f02de043866e3980d0e8cf08d2 08-Nov-2017 Enrico Granata <egranata@google.com> Fix OsTest for different possible setgroups() return values.

setgroups() can return EINVAL if the number of
groups passed is > NGROUPS_MAX.

This means that the call in this test could fail
with EINVAL is NGROUPS_MAX is == 0.

Address this possibility by checking and choosing
an appropriate error code to test against.

Bug: 69023954
Test: vogar OsTest
Change-Id: Id03cdb73a9cc3df31f22b25dc28079aac609a35f
d430cc782689a7f6a256ef6b0ebfc7210b0c31d9 01-Nov-2017 Tobias Thierer <tobiast@google.com> Move libcore tests to non-libcore packages.

The integration of OpenJDK 9 javac into the Android build system
requires non-libcore code to live in non-libcore packages, as
long as that code isn't considered part of the same module as
libcore at javac time.

This CL moves libcore test related classes out of such
packages; since libcore tests could already only test
public (as opposed to package private APIs), no change
other than the package name and imports is necessary.

Because many libcore tests already live below a top-level
package "libcore" (eg., the tests for java.util are in
libcore.java.util), this CL likewise prepends "libcore."
to the package names of affected classes. For classes
relating to libcore.* packages, this results in a package
name of the form "libcore.libcore.*".

Alternative considered but not pursued:
To compile the test classes without moving the out of a libcore
package, javac would need to consider them to be in the same
module as libcore. This would likely be possible via
javac --patch-module, but this has not been explored in detail
because:

- Most luni tests are already in a toplevel package libcore.*,
so this CL makes the test structure more consistent.
- Use of --patch-module would likely cause problems when running
tests under a runtime that implements the OpenJDK 9 module
system; for example, --patch-module cannot add exported
packages to the module, so any new packages added in tests
(such as the libcore.* packages of most existing luni tests)
would not be visible at test runtime.
- Having tests in different packages from code under tests makes
it more obvious (including to IDEs in which the code might be
edited as a single project) that these tests cannot access
package-private identifiers in the code under test.

Test: Treehugger
Test: "make cts" with EXPERIMENTAL_USE_OPENJDK9=true
passes with additional changes present locally
that have not yet been exported as CLs.
Test: CtsLibcoreTestCases
Bug: 68224249
Bug: 68932217 (tracks potential follow-up work)

Change-Id: Ib6b8e6f3bc87093bc219d2108e601163c6e334cd