summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/prctl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/prctl.cc')
-rw-r--r--test/syscalls/linux/prctl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/syscalls/linux/prctl.cc b/test/syscalls/linux/prctl.cc
index 25b0e63d4..286b3d168 100644
--- a/test/syscalls/linux/prctl.cc
+++ b/test/syscalls/linux/prctl.cc
@@ -214,6 +214,12 @@ TEST(PrctlTest, RootDumpability) {
SyscallFailsWithErrno(EINVAL));
}
+TEST(PrctlTest, SetGetSubreaper) {
+ // Setting subreaper on PID 1 works vacuously because PID 1 is always a
+ // subreaper.
+ EXPECT_THAT(prctl(PR_SET_CHILD_SUBREAPER, 1), SyscallSucceeds());
+}
+
} // namespace
} // namespace testing