commit | bd77932526d7e9cc82cdedbb67192871a48fc67c | [log] [tgz] |
---|---|---|
author | Allen Webb <allenwebb@google.com> | Fri Jul 26 07:24:03 2019 -0700 |
committer | chrome-bot <chrome-bot@chromium.org> | Fri Aug 02 17:10:56 2019 -0700 |
tree | 4ca8a610f07914641b89b3972327d125b8d33501 | |
parent | f8d04aa7b82c22e0b4603b8fd95043de219908cc [diff] |
libbrillo: Improve SafeFD unit tests. This refactors the test fixture to provide paths for a subdirectory and symoblic links in addition to the already provided test file. This makes the expected type of each path more explicit. The setup funtions were reworked to return a bool indicating success so ASSERT_TRUE can break the test case if the setup fails. Also, several missing test cases were added: * MakeDir() with a single path component. * MakeFile() with a ./ prefix. * A test case to check if SafeFD::Write() truncates the file. BUG=chromium:977388 TEST=FEATURES=test emerge-${BOARD} libbrillo Change-Id: Id0a18f79928d6a9d45b40d04314d9de5e961e312 Reviewed-on: https://chromium-review.googlesource.com/1724737 Tested-by: Allen Webb <allenwebb@google.com> Commit-Ready: Allen Webb <allenwebb@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: 4b34d4891b223dcf1c7bbfe094502fd2aa0a9053
libbrillo is a shared library meant to hold common utility code that we deem useful for platform projects. It supplements the functionality provided by libbase/libchrome since that project, by design, only holds functionality that Chromium (the browser) needs. As a result, this tends to be more OS-centric code.
This project is also used by Update Engine which is maintained in AOSP. However, AOSP doesn't use this codebase directly, it maintains its own libbrillo fork.
To help keep the projects in sync, we have a gsubtree set up on our GoB: https://chromium.googlesource.com/chromiumos/platform2/libbrillo/
This allows AOSP to cherry pick or merge changes directly back into their fork.