Adjust tests after page fault changes in r352807
Commit r352807 fixed various signal numbers and codes from page faults; adjust the tests so they expect the fixes to be present. PR: 211924
This commit is contained in:
parent
12a43d0d5d
commit
4f77551258
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352869
@ -480,10 +480,6 @@ ATF_TC_BODY(mmap_truncate_signal, tc)
|
|||||||
int fd, sta;
|
int fd, sta;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
atf_tc_expect_fail("testcase fails with SIGSEGV on FreeBSD; bug # 211924");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fd = open(path, O_RDWR | O_CREAT, 0700);
|
fd = open(path, O_RDWR | O_CREAT, 0700);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
@ -697,7 +697,7 @@ ATF_TC_BODY(object_resize, tc)
|
|||||||
/*
|
/*
|
||||||
* The previous ftruncate(2) shrunk the backing object
|
* The previous ftruncate(2) shrunk the backing object
|
||||||
* so that this address is no longer valid, so reading
|
* so that this address is no longer valid, so reading
|
||||||
* from it should trigger a SIGSEGV.
|
* from it should trigger a SIGBUS.
|
||||||
*/
|
*/
|
||||||
c = page[pagesize];
|
c = page[pagesize];
|
||||||
fprintf(stderr, "child: page 1: '%c'\n", c);
|
fprintf(stderr, "child: page 1: '%c'\n", c);
|
||||||
@ -707,7 +707,7 @@ ATF_TC_BODY(object_resize, tc)
|
|||||||
if (wait(&status) < 0)
|
if (wait(&status) < 0)
|
||||||
atf_tc_fail("wait failed; errno=%d", errno);
|
atf_tc_fail("wait failed; errno=%d", errno);
|
||||||
|
|
||||||
if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGSEGV)
|
if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGBUS)
|
||||||
atf_tc_fail("child terminated with status %x", status);
|
atf_tc_fail("child terminated with status %x", status);
|
||||||
|
|
||||||
/* Grow the object back to 2 pages. */
|
/* Grow the object back to 2 pages. */
|
||||||
|
@ -129,7 +129,6 @@ ATF_TC_BODY(page_fault_signal__bus_objerr_1, tc)
|
|||||||
int fd;
|
int fd;
|
||||||
int sz;
|
int sz;
|
||||||
|
|
||||||
atf_tc_expect_fail("bug 211924");
|
|
||||||
sz = getpagesize();
|
sz = getpagesize();
|
||||||
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
|
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
|
||||||
ATF_REQUIRE(fd != -1);
|
ATF_REQUIRE(fd != -1);
|
||||||
@ -153,7 +152,6 @@ ATF_TC_BODY(page_fault_signal__bus_objerr_2, tc)
|
|||||||
int r;
|
int r;
|
||||||
int sz;
|
int sz;
|
||||||
|
|
||||||
atf_tc_expect_fail("bug 211924");
|
|
||||||
sz = getpagesize();
|
sz = getpagesize();
|
||||||
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
|
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
|
||||||
ATF_REQUIRE(fd != -1);
|
ATF_REQUIRE(fd != -1);
|
||||||
|
Loading…
Reference in New Issue
Block a user