Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2017 06:32:44 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r319771 - user/pho/stress2/misc
Message-ID:  <201706100632.v5A6WibN018780@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Sat Jun 10 06:32:44 2017
New Revision: 319771
URL: https://svnweb.freebsd.org/changeset/base/319771

Log:
  Added a timeout. Style fixes.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/pcatch.sh

Modified: user/pho/stress2/misc/pcatch.sh
==============================================================================
--- user/pho/stress2/misc/pcatch.sh	Sat Jun 10 06:28:41 2017	(r319770)
+++ user/pho/stress2/misc/pcatch.sh	Sat Jun 10 06:32:44 2017	(r319771)
@@ -33,10 +33,13 @@
 # when fs is suspended, and process is signaled.
 
 # Test scenario mostly by kib.
-
 # Fixed in r275744.
 
+# Deadlock seen:
+# https://people.freebsd.org/~pho/stress/log/pcatch.txt
+
 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+[ -z "$DEBUG" ] && exit 0 # Waiting for fix
 
 . ../default.cfg
 
@@ -50,12 +53,15 @@ cd $here
 mount | grep -q "$mntpoint" && umount $mntpoint
 mdconfig -l | grep -q $mdstart &&  mdconfig -d -u $mdstart
 mdconfig -a -t swap -s 1g -u $mdstart
-bsdlabel -w md${mdstart} auto
+bsdlabel -w md$mdstart auto
 newfs $newfs_flags md${mdstart}$part > /dev/null
 
 mount /dev/md${mdstart}$part $mntpoint
 
-/tmp/pcatch $mntpoint
+start=`date '+%s'`
+while [ $((`date '+%s'` - start)) -lt 120 ]; do
+	/tmp/pcatch $mntpoint
+done
 
 while mount | grep -q "on $mntpoint "; do
 	umount $mntpoint || sleep 1
@@ -80,12 +86,12 @@ EOF
 #include <string.h>
 #include <unistd.h>
 
-void
+static void
 hand_sigaction(int signo __unused, siginfo_t *si __unused, void *c __unused)
 {
 }
 
-void
+static void
 suspend(char *path)
 {
         struct statfs s;
@@ -104,7 +110,7 @@ suspend(char *path)
 	}
 }
 
-void
+static void
 test(char *mp)
 {
 	pid_t pid;



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