diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-08-26 15:15:34 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-26 15:15:34 -0700 |
commit | a69f8c8d598bc75dc3c3adb2059eda263d5437c1 (patch) | |
tree | 68faf96894b7e7f1310c2b07cb01c627bb1eba87 | |
parent | ec46befd1099d2050fcccd60c4fe779a04d1ea45 (diff) | |
parent | 73ba5943cfdc49ac2cb4638e00b14223ec7ee2b4 (diff) |
Merge pull request #6509 from gystemd:fix_test_pty_5357
PiperOrigin-RevId: 393217676
-rw-r--r-- | test/syscalls/linux/pty.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/syscalls/linux/pty.cc b/test/syscalls/linux/pty.cc index c008c89e7..c6592b4a7 100644 --- a/test/syscalls/linux/pty.cc +++ b/test/syscalls/linux/pty.cc @@ -1594,9 +1594,9 @@ TEST_F(JobControlTest, GetForegroundProcessGroupNonControlling) { // - creates a child process in a new process group // - sets that child as the foreground process group // - kills its child and sets itself as the foreground process group. -// TODO(gvisor.dev/issue/5357): Fix and enable. -TEST_F(JobControlTest, DISABLED_SetForegroundProcessGroup) { +TEST_F(JobControlTest, SetForegroundProcessGroup) { auto res = RunInChild([=]() { + TEST_PCHECK(setsid() >= 0); TEST_PCHECK(!ioctl(replica_.get(), TIOCSCTTY, 0)); // Ignore SIGTTOU so that we don't stop ourself when calling tcsetpgrp. @@ -1634,7 +1634,7 @@ TEST_F(JobControlTest, DISABLED_SetForegroundProcessGroup) { // Set ourself as the foreground process. pid_t pgid; - TEST_PCHECK(pgid = getpgid(0) == 0); + TEST_PCHECK((pgid = getpgid(0)) >= 0); TEST_PCHECK(!tcsetpgrp(replica_.get(), pgid)); }); ASSERT_NO_ERRNO(res); @@ -1735,9 +1735,9 @@ TEST_F(JobControlTest, SetForegroundProcessGroupNegPgid) { ASSERT_NO_ERRNO(ret); } -// TODO(gvisor.dev/issue/5357): Fix and enable. -TEST_F(JobControlTest, DISABLED_SetForegroundProcessGroupEmptyProcessGroup) { +TEST_F(JobControlTest, SetForegroundProcessGroupEmptyProcessGroup) { auto res = RunInChild([=]() { + TEST_PCHECK(setsid() >= 0); TEST_PCHECK(!ioctl(replica_.get(), TIOCSCTTY, 0)); // Create a new process, put it in a new process group, make that group the |