diff options
| author | Elliott Hughes <enh@google.com> | 2017-04-11 13:38:36 -0700 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2017-04-11 17:05:01 -0700 |
| commit | a7afa0285b3786ecc55e4738ec9f23effb3699bc (patch) | |
| tree | dbe9b746ff0e84eea4ee43a386edd791e37826aa /libc/stdio/stdio_ext.cpp | |
| parent | 993b08366dbe01cea7269dfe481b6ac672681035 (diff) | |
Don't let missing Treble property context files affect errno.
User code on a non-treble device was starting with errno == ENOENT rather
than 0 because of this treble support:
openat(AT_FDCWD, "/property_contexts", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/system/etc/selinux/plat_property_contexts", R_OK) = -1 ENOENT (No such file or directory)
This caused us to fail some toybox tests by reporting bogus errno values
where errno should have been left unset:
PASS: date -d @0
FAIL: date -d @0x123
echo -ne '' | TZ=UTC date -d @0x123 2>&1
--- expected
+++ actual
@@ -1 +1 @@
-date: bad date '@0x123'
+date: bad date '@0x123': No such file or directory
PASS: date -d 06021234
PASS: date -d 060212341982
FAIL: date -d 123
echo -ne '' | TZ=UTC date -d 123 2>&1
--- expected
+++ actual
@@ -1 +1 @@
-date: bad date '123'
+date: bad date '123': No such file or directory
PASS: date -d 1110143115.30
PASS: date -d 111014312015.30
PASS: date Unix time missing @
Bug: http://b/37248982
Test: ran tests
(cherry picked from commit 7ade61cae297c112e7288f173fb529673010926a)
Change-Id: I4c680da14f3df16dc5a9884071e48f3221ad3b3b
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
0 files changed, 0 insertions, 0 deletions
