Author: jilles
Date: Sun Sep 29 15:17:58 2019
New Revision: 352869
URL: https://svnweb.freebsd.org/changeset/base/352869

Log:
  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

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
  head/tests/sys/posixshm/posixshm_test.c
  head/tests/sys/vm/page_fault_signal.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c     Sun Sep 29 10:45:13 
2019        (r352868)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_mmap.c     Sun Sep 29 15:17:58 
2019        (r352869)
@@ -480,10 +480,6 @@ ATF_TC_BODY(mmap_truncate_signal, tc)
        int fd, sta;
        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);
 
        if (fd < 0)

Modified: head/tests/sys/posixshm/posixshm_test.c
==============================================================================
--- head/tests/sys/posixshm/posixshm_test.c     Sun Sep 29 10:45:13 2019        
(r352868)
+++ head/tests/sys/posixshm/posixshm_test.c     Sun Sep 29 15:17:58 2019        
(r352869)
@@ -697,7 +697,7 @@ ATF_TC_BODY(object_resize, tc)
                /*
                 * The previous ftruncate(2) shrunk the backing object
                 * 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];
                fprintf(stderr, "child: page 1: '%c'\n", c);
@@ -707,7 +707,7 @@ ATF_TC_BODY(object_resize, tc)
        if (wait(&status) < 0)
                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);
 
        /* Grow the object back to 2 pages. */

Modified: head/tests/sys/vm/page_fault_signal.c
==============================================================================
--- head/tests/sys/vm/page_fault_signal.c       Sun Sep 29 10:45:13 2019        
(r352868)
+++ head/tests/sys/vm/page_fault_signal.c       Sun Sep 29 15:17:58 2019        
(r352869)
@@ -129,7 +129,6 @@ ATF_TC_BODY(page_fault_signal__bus_objerr_1, tc)
        int fd;
        int sz;
 
-       atf_tc_expect_fail("bug 211924");
        sz = getpagesize();
        fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
        ATF_REQUIRE(fd != -1);
@@ -153,7 +152,6 @@ ATF_TC_BODY(page_fault_signal__bus_objerr_2, tc)
        int r;
        int sz;
 
-       atf_tc_expect_fail("bug 211924");
        sz = getpagesize();
        fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
        ATF_REQUIRE(fd != -1);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to