diff options
author | Michael Pratt <mpratt@google.com> | 2019-09-16 11:56:59 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-16 11:58:27 -0700 |
commit | 56cb0042181cc4840d8c3995f0970c0c41d4212b (patch) | |
tree | 4c755f1fe2d2252a55798ef2c2ec4e908cf88c5c /test/syscalls/linux/prctl.cc | |
parent | 010b0932583711ab3f6a88b1136cf8d87c2a53d2 (diff) |
Migrate from gflags to absl flags
absl flags are more modern and we can easily depend on them directly.
The repo now successfully builds with --incompatible_load_cc_rules_from_bzl.
PiperOrigin-RevId: 269387081
Diffstat (limited to 'test/syscalls/linux/prctl.cc')
-rw-r--r-- | test/syscalls/linux/prctl.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/syscalls/linux/prctl.cc b/test/syscalls/linux/prctl.cc index bd1779557..d07571a5f 100644 --- a/test/syscalls/linux/prctl.cc +++ b/test/syscalls/linux/prctl.cc @@ -21,6 +21,7 @@ #include <string> #include "gtest/gtest.h" +#include "absl/flags/flag.h" #include "test/util/capability_util.h" #include "test/util/cleanup.h" #include "test/util/multiprocess_util.h" @@ -28,9 +29,9 @@ #include "test/util/test_util.h" #include "test/util/thread_util.h" -DEFINE_bool(prctl_no_new_privs_test_child, false, - "If true, exit with the return value of prctl(PR_GET_NO_NEW_PRIVS) " - "plus an offset (see test source)."); +ABSL_FLAG(bool, prctl_no_new_privs_test_child, false, + "If true, exit with the return value of prctl(PR_GET_NO_NEW_PRIVS) " + "plus an offset (see test source)."); namespace gvisor { namespace testing { @@ -220,7 +221,7 @@ TEST(PrctlTest, RootDumpability) { int main(int argc, char** argv) { gvisor::testing::TestInit(&argc, &argv); - if (FLAGS_prctl_no_new_privs_test_child) { + if (absl::GetFlag(FLAGS_prctl_no_new_privs_test_child)) { exit(gvisor::testing::kPrctlNoNewPrivsTestChildExitBase + prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0)); } |