5 #include <linux/types.h>
14 #include "../kselftest_harness.h"
15 #include "../pidfd/pidfd.h"
18 * Regression test for:
19 * 35f71bc0a09a ("fork: report pid reservation failure properly")
20 * b26ebfe12f34 ("pid: Fix error return value in some cases")
22 TEST(regression_enomem
)
27 EXPECT_EQ(0, unshare(CLONE_NEWUSER
));
29 EXPECT_EQ(0, unshare(CLONE_NEWPID
));
37 EXPECT_EQ(0, wait_for_pid(pid
));
41 ASSERT_EQ(errno
, ENOMEM
);