basic: set errno in raw_clone() on sparc
sparc sets the carry bit when a syscall fails. Use this information to set errno and return -1 as appropriate. The added test case calls raw_clone() with flags known to be invalid according to the clone(2) manpage.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
e0bd32c5cd
commit
96f64eb574
@@ -214,6 +214,10 @@ static void test_raw_clone(void) {
|
||||
waitpid(pid, &status, __WCLONE);
|
||||
assert_se(WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
assert_se(raw_clone(CLONE_FS|CLONE_NEWNS) == -1);
|
||||
assert_se(errno == EINVAL);
|
||||
}
|
||||
|
||||
static void test_physical_memory(void) {
|
||||
|
||||
Reference in New Issue
Block a user