diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /security/sandbox/common/test/SandboxTestingChildTests.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/sandbox/common/test/SandboxTestingChildTests.h')
-rw-r--r-- | security/sandbox/common/test/SandboxTestingChildTests.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/security/sandbox/common/test/SandboxTestingChildTests.h b/security/sandbox/common/test/SandboxTestingChildTests.h index e31588c271..294840dee8 100644 --- a/security/sandbox/common/test/SandboxTestingChildTests.h +++ b/security/sandbox/common/test/SandboxTestingChildTests.h @@ -680,11 +680,11 @@ void RunTestsRDD(SandboxTestingChild* child) { RunTestsSched(child); - child->ErrnoTest("socket_inet"_ns, false, - [] { return socket(AF_INET, SOCK_STREAM, 0); }); + child->ErrnoValueTest("socket_inet"_ns, EACCES, + [] { return socket(AF_INET, SOCK_STREAM, 0); }); - child->ErrnoTest("socket_unix"_ns, false, - [] { return socket(AF_UNIX, SOCK_STREAM, 0); }); + child->ErrnoValueTest("socket_unix"_ns, EACCES, + [] { return socket(AF_UNIX, SOCK_STREAM, 0); }); child->ErrnoTest("uname"_ns, true, [] { struct utsname uts; @@ -721,6 +721,16 @@ void RunTestsRDD(SandboxTestingChild* child) { return statfs("/usr/share", &sf); }); + child->ErrnoValueTest("fork"_ns, EPERM, [] { + pid_t pid = fork(); + if (pid == 0) { + // Success: shouldn't happen, and parent will report a test + // failure. + _exit(0); + } + return pid; + }); + # elif XP_MACOSX RunMacTestLaunchProcess(child); RunMacTestWindowServer(child); |