Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Oct 2019 20:36:26 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r353148 - in stable/12: contrib/netbsd-tests/lib/libc/sys tests/sys/posixshm tests/sys/vm
Message-ID:  <201910062036.x96KaQA1025818@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun Oct  6 20:36:25 2019
New Revision: 353148
URL: https://svnweb.freebsd.org/changeset/base/353148

Log:
  MFC r352495,r352869: Adjust tests for page fault changes in r353102
  
  PR:		211924

Added:
  stable/12/tests/sys/vm/page_fault_signal.c
     - copied, changed from r352495, head/tests/sys/vm/page_fault_signal.c
Modified:
  stable/12/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
  stable/12/tests/sys/posixshm/posixshm_test.c
  stable/12/tests/sys/vm/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
==============================================================================
--- stable/12/contrib/netbsd-tests/lib/libc/sys/t_mmap.c	Sun Oct  6 19:11:01 2019	(r353147)
+++ stable/12/contrib/netbsd-tests/lib/libc/sys/t_mmap.c	Sun Oct  6 20:36:25 2019	(r353148)
@@ -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: stable/12/tests/sys/posixshm/posixshm_test.c
==============================================================================
--- stable/12/tests/sys/posixshm/posixshm_test.c	Sun Oct  6 19:11:01 2019	(r353147)
+++ stable/12/tests/sys/posixshm/posixshm_test.c	Sun Oct  6 20:36:25 2019	(r353148)
@@ -445,7 +445,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);
@@ -455,7 +455,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: stable/12/tests/sys/vm/Makefile
==============================================================================
--- stable/12/tests/sys/vm/Makefile	Sun Oct  6 19:11:01 2019	(r353147)
+++ stable/12/tests/sys/vm/Makefile	Sun Oct  6 20:36:25 2019	(r353148)
@@ -5,6 +5,7 @@ PACKAGE=	tests
 TESTSDIR=	${TESTSBASE}/sys/vm
 
 ATF_TESTS_C+=	mlock_test \
-		mmap_test
+		mmap_test \
+		page_fault_signal
 
 .include <bsd.test.mk>

Copied and modified: stable/12/tests/sys/vm/page_fault_signal.c (from r352495, head/tests/sys/vm/page_fault_signal.c)
==============================================================================
--- head/tests/sys/vm/page_fault_signal.c	Wed Sep 18 21:00:32 2019	(r352495, copy source)
+++ stable/12/tests/sys/vm/page_fault_signal.c	Sun Oct  6 20:36:25 2019	(r353148)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910062036.x96KaQA1025818>