History log of /system/core/base/file_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9bb7971ae794ecfc6dcaab28d13d3ade8ab18517 21-Mar-2017 Elliott Hughes <enh@google.com> Keep the ReadFileToString/ReadFdToString overhead down.

Bug: https://code.google.com/p/android/issues/detail?id=258500
Bug: http://b/36046324
Test: ran tests
Change-Id: I40e76a6dd164ea9a5e8e18159f543e1bb221dcba
/system/core/base/file_test.cpp
840b6019c035eb3abeadfb2dc8abac38692a829b 09-Sep-2016 Dimitry Ivanov <dimitry@google.com> Add android::base::Realpath.

Bug: http://b/31396973
Test: libbase_test on host and device
Change-Id: I1e5f15c76227ec1c2128baa38eb454d347987703
/system/core/base/file_test.cpp
bb3a515f46f35b9f429247900df8aa4b540059ee 24-Feb-2017 Colin Cross <ccross@android.com> Add GetExecutableDirectory to libbase

Tests will often want to get the executable directory in order to
find test data.

Test: out/host/linux-x86/nativetest64/libbase_tests/libbase_tests
Change-Id: Ica9d211bcd039fcf83a22fd494816abd01b97aa3
/system/core/base/file_test.cpp
58021d15c94eb6a81d2673634956b5374af6a1e5 24-Feb-2017 Colin Cross <ccross@android.com> Move adb_dirname and adb_basename to libbase

adb already provides an implementation of dirname and basename that
take and produce std::strings, move it into libbase so it can be
used in the implementation of GetExecutableDirectory.

Test: out/host/linux-x86/nativetest64/adb_test/adb_test
Test: out/host/linux-x86/nativetest64/libbase_test/libbase_test
Test: adb shell /data/nativetest64/libbase_test/libbase_test64
Change-Id: Ideb1627607b14562121316d4ed27fa6fb0930684
/system/core/base/file_test.cpp
a6c65704d6b2b4a092dd228d14b522904556b6cb 12-Jan-2017 Elliott Hughes <enh@google.com> Fix libbase file.Readlink test on marlin/sailfish.

Bug: http://b/33306057
Test: ran tests
Change-Id: Ie6797e71d3507572da66d6b6966f8ee9373124a4
/system/core/base/file_test.cpp
ffabc9651f1b81fb9dfa2388500d9aa72f2ccba0 15-Sep-2016 Josh Gao <jmgao@google.com> base: add parameter that controls O_NOFOLLOW in file functions.

Bug: http://b/31491920
Change-Id: I19cb06941d87c0180ccab8bb2d85e57338811624
Test: m
/system/core/base/file_test.cpp
82ff315bb0fecb9127970e01b399be53c92ca14f 01-Sep-2016 Elliott Hughes <enh@google.com> Add android::base::GetExecutablePath, switch adb and fastboot over.

We'd long had two copies of this stuff, so rather than rewrite both
Linux versions to use android::base::Readlink, let's kill the duplication
too...

Bug: http://b/30988271
Change-Id: I4de58a94a22a4b1faf969a6fc70ca1560a4d5121
/system/core/base/file_test.cpp
d3ff6e5231f53a95518532ff74a7256aabbf32e5 24-Aug-2016 Elliott Hughes <enh@google.com> Add android::base::Readlink.

Bug: http://b/30988271
Change-Id: Ib844d7c9e33465dabf7aee5e24dc3d1d8d799abd
/system/core/base/file_test.cpp
b6e314aa8664b766222d676a24f6390ff1f3f2c5 30-Jan-2016 Yabin Cui <yabinc@google.com> base: add API to remove file if it exists.

It is a function needed in different places like uncrypt, simpleperf.

Bug: 26883096
Change-Id: I26f4f30e8367867a88272625f00858569fc8e950
/system/core/base/file_test.cpp
4f71319df011d796a60a43fc1bc68e16fbf7d321 05-Dec-2015 Elliott Hughes <enh@google.com> Track rename of base/ to android-base/.

Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
/system/core/base/file_test.cpp
cbf26b76c7715969610b75048719f8cec676b656 04-Aug-2015 Spencer Low <CompareAndSwap@gmail.com> win32: adb_test/libbase_test fixes

- My recent change with -DUNICODE=1 required changing
GetProfilesDirectory() to GetProfilesDirectoryA() for the ANSI version
of the API.

- enh's edit to my previous change deleted a test that used
/proc/version, but I think another test was missed. Merge that test into
another.

Change-Id: Ic748549848e7be922bcbf218d5b0c3fca2a90704
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
/system/core/base/file_test.cpp
cf168a82e99e97e3ad95e37b7065f6b8e7f7390b 25-May-2015 Spencer Low <CompareAndSwap@gmail.com> adb_test/libbase_test: win32: get some tests working

adb_test:

* Fix adb_utils directory_exists test for Windows. The test actually
fails because directory_exists() is not aware of junctions or symlinks,
but I'm not really sure if that is a bad thing (since these are rare on
Windows to begin with).

* Fix crash during transport tests due to mutex not being initialized.

* io tests fail for various reasons (see adb_io_test.cpp for more info).

libbase_test:

* Get it building on Win32 by implementing mkstemp() and mkdtemp().

* Run StringPrintf %z test on Windows because it passes because we build
with __USE_MINGW_ANSI_STDIO which implements %z.

* I didn't fixup the logging tests: some logging tests fail because when
abort() is called on Windows, by default it pops up UI asking whether a
crash dump should be sent to Microsoft. To some degree this makes sense,
as I think LOG(FATAL) does crash dumping in Chromium. This should be
revisited in the future.

Change-Id: Iaa2433e5294ff162e0b2aa9fe6e4ec09a6893f7a
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
/system/core/base/file_test.cpp
47d67c96ec991ef1690b4c07188335cbc4bfa2aa 06-May-2015 Alex Vallée <avallee@chromium.org> Write mkdirs in more idiomatic C++ style.

~ Rewrote mkdirs to be in C++ style.
~ Replaced adb_dir{start,stop} with std::string params and (r)find.
+ Added test for mkdirs.

Also make base/test_utils.h public and support temporary directories
as well as files.

Change-Id: I6fcbdc5e0099f3359d3aac6b00c436f250ca1329
/system/core/base/file_test.cpp
56b37345d99f2cd85720f6b1aa1934fa3bfe29a6 01-May-2015 Colin Cross <ccross@android.com> Fix comparison between signed and unsigned error on darwin

mode_t is a uint16_t on darwin, which causes
sb.st_mode & ~S_IFMT
to produce an int when the uint16_t is promoted for the operator.
Cast to unsigned int before comparing against 0660U.

Change-Id: Ib1439c08d9e2b297eeeba701891508d269c19a3d
/system/core/base/file_test.cpp
0c4b3a319d2bc3dbc917e869af34e24788e6fc48 29-Apr-2015 Dan Albert <danalbert@google.com> Get libbase tests working on Windows.

Tests using files from /proc still fail on Windows (obviously), but
all tests are passing when run in Wine.

Change-Id: Ie4c3ba65b642202f8fcaec73332a53bee6115fba
/system/core/base/file_test.cpp
850188fc040e8b1f345359f795165c7925617506 30-Apr-2015 Dan Albert <danalbert@google.com> Print strerror instead of errno in tests.

Change-Id: Ibfab1b7cd439fdb5ae19855cc700613c00d4aff8
/system/core/base/file_test.cpp
56085edbf8c74a3a123f08e44be6e8f294deb465 25-Apr-2015 Elliott Hughes <enh@google.com> Add ReadFully and WriteFully to libbase.

Change-Id: I6b7aa2a93398e7acdd1d74c71d9abed08a72b3c4
/system/core/base/file_test.cpp
58310b49fc8a7a713b922319a849a419858db79e 14-Mar-2015 Dan Albert <danalbert@google.com> Add google3 style logging to libbase.

ART already had a flavor of this, but it was specialized for their use
case a bit.

Note that the logging.* tests are currently disabled for the device
because there is no good way to capture the output of liblog. We can
make something that will execute logcat and then then scan the output,
but that's messy. Since we know it at least works on the host, we can
add better device tests later.

Change-Id: I47acd87a3312c0a5285b03f9c8dadef0c669f06a
/system/core/base/file_test.cpp
c007bc3856a4cf86b8f610eb045f26a9dedc2894 16-Mar-2015 Dan Albert <danalbert@google.com> Revert "Revert "Create libbase.""

This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
/system/core/base/file_test.cpp
a7870d88167f619e758b5bcd15b410d16da7c16b 16-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Create libbase."

Breaks internal master.

This reverts commit 98ff77204cef9bb8f0f27420833233622060a09e.

Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
/system/core/base/file_test.cpp
98ff77204cef9bb8f0f27420833233622060a09e 14-Mar-2015 Dan Albert <danalbert@google.com> Create libbase.

Move StringPrintf and the string based file I/O from libutils to
libbase.

Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
/system/core/base/file_test.cpp