Commit graph

6 commits

Author SHA1 Message Date
Elliott Hughes
bcaa454d32 bionic tests: use GTEST_SKIP.
Also be a bit more to the point in our messages, focusing on "why" not
"what".

Test: ran tests
Change-Id: I297806c7a102bd52602dcd2fcf7a2cd34aba3a11
2019-03-12 10:26:39 -07:00
Chih-Hung Hsieh
770032ddfa Fix/suppress bionic google-explicit-constructor warnings
* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Id1ad0327c1b8c6f094bcbb3ae599bc1f716b3f2f
2019-01-02 11:04:05 -08:00
Mark Salyzyn
68a3bcc249 bionic tests: switch to using android-base/file.h for TemporaryFile
A matching definition of TemporaryFile exists in libbase now.

Test: compile
Bug: 119313545
Change-Id: I6f84dbf3af9a9c4b270a2532a36c9cb4c0f6bb8f
2018-11-13 10:57:28 -08:00
Tom Cherry
c2b9fec50b Require vendor users and groups to start with vendor_
Require that users and groups found in /vendor/etc/{passwd,group}
start with vendor_.  This is needed to compliance with Treble as
without this prefix, it is possible for a new system image to create a
user/group name that a vendor has already used, causing a collision.

Bug: 79528966
Test: new unit test
Change-Id: I07500641e165f41526a8101592d83fa174e7a711
2018-05-15 14:10:21 -07:00
Tom Cherry
5fe73268f3 Do not munmap in MmapFile::~MmapFile
Having any destructor with a global variable in bionic is causing
some issues. Since we don't actually need to munmap in this case, we
remove the destructor to work around that issue.

A small class is used to still munmap during tests.

Bug: 73485611
Test: bionic unit tests
Change-Id: Ibcd45e9b1ab22d187ecfc2738bb87244250d81ea
2018-02-20 16:02:13 -08:00
Tom Cherry
6034ef85d8 Add ability to read /etc/passwd and /etc/group
Add the capability to read /etc/passwd and /etc/group for getpw* and
getgr* functions.

Bug: 27999086
Test: pwd, grp, grp_pwd_file unit tests
Test: Read in custom users/groups from /etc/{passwd,group}
Change-Id: Idc1f054af8a7ca34743a90493495f0ccc775a0d8
2018-02-08 12:38:57 -08:00