From owner-svn-src-user@FreeBSD.ORG Sun Sep 22 13:54:08 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7AACD6D; Sun, 22 Sep 2013 13:54:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 967A02069; Sun, 22 Sep 2013 13:54:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8MDs85v044605; Sun, 22 Sep 2013 13:54:08 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MDs8Rr044604; Sun, 22 Sep 2013 13:54:08 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309221354.r8MDs8Rr044604@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 13:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255787 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 13:54:08 -0000 Author: des Date: Sun Sep 22 13:54:08 2013 New Revision: 255787 URL: http://svnweb.freebsd.org/changeset/base/255787 Log: Include the config name in the process title. Modified: user/des/tinderbox/tbmaster.pl Modified: user/des/tinderbox/tbmaster.pl ============================================================================== --- user/des/tinderbox/tbmaster.pl Sun Sep 22 13:36:52 2013 (r255786) +++ user/des/tinderbox/tbmaster.pl Sun Sep 22 13:54:08 2013 (r255787) @@ -274,7 +274,7 @@ sub tinderbox($$$) { my $config = expand('CONFIG'); my $start = time(); - $0 = "tbmaster: building $branch for $arch/$machine"; + $0 = "tbmaster [$config]: building $branch for $arch/$machine"; $CONFIG{'BRANCH'} = $branch; $CONFIG{'ARCH'} = $arch; @@ -553,7 +553,7 @@ sub tbmaster($) { } } - $0 = "tbmaster: supervisor"; + $0 = "tbmaster [$config]: supervisor"; my %children; my $done = 0; while (@jobs || keys(%children)) { @@ -576,7 +576,7 @@ sub tbmaster($) { } warn("forked child $child for $branch $arch/$machine\n"); } - $0 = "tbmaster: supervisor (" . + $0 = "tbmaster [$config]: supervisor (" . keys(%children) . " running, " . @jobs . " pending, " . $done . " completed)"; From owner-svn-src-user@FreeBSD.ORG Sun Sep 22 14:21:41 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2119838C; Sun, 22 Sep 2013 14:21:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE2B245F; Sun, 22 Sep 2013 14:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8MELeaI060021; Sun, 22 Sep 2013 14:21:40 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MELeJM060020; Sun, 22 Sep 2013 14:21:40 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309221421.r8MELeJM060020@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 14:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255789 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 14:21:41 -0000 Author: des Date: Sun Sep 22 14:21:40 2013 New Revision: 255789 URL: http://svnweb.freebsd.org/changeset/base/255789 Log: Allow lower-case letters in environment variable names. Modified: user/des/tinderbox/tinderbox.pl Modified: user/des/tinderbox/tinderbox.pl ============================================================================== --- user/des/tinderbox/tinderbox.pl Sun Sep 22 14:09:07 2013 (r255788) +++ user/des/tinderbox/tinderbox.pl Sun Sep 22 14:21:40 2013 (r255789) @@ -33,8 +33,8 @@ use Fcntl qw(:DEFAULT :flock); use POSIX; use Getopt::Long; -my $VERSION = "2.11"; -my $COPYRIGHT = "Copyright (c) 2003-2012 Dag-Erling Smørgrav. " . +my $VERSION = "2.12"; +my $COPYRIGHT = "Copyright (c) 2003-2013 Dag-Erling Smørgrav. " . "All rights reserved."; my $arch; # Target architecture @@ -501,7 +501,7 @@ MAIN:{ # Find out what we're expected to do foreach my $cmd (@ARGV) { - if ($cmd =~ m/^([0-9A-Z_]+)=(.*)\s*$/) { + if ($cmd =~ m/^(\w+)=(.*)\s*$/) { $userenv{$1} = $2; next; } From owner-svn-src-user@FreeBSD.ORG Sun Sep 22 14:22:29 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 872165B0; Sun, 22 Sep 2013 14:22:29 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76870247C; Sun, 22 Sep 2013 14:22:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8MEMTPl060374; Sun, 22 Sep 2013 14:22:29 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MEMT1g060372; Sun, 22 Sep 2013 14:22:29 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309221422.r8MEMT1g060372@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 14:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255790 - user/des/tinderbox X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 14:22:29 -0000 Author: des Date: Sun Sep 22 14:22:28 2013 New Revision: 255790 URL: http://svnweb.freebsd.org/changeset/base/255790 Log: Add support for include statements. Modified: user/des/tinderbox/tbmaster.1 user/des/tinderbox/tbmaster.pl Modified: user/des/tinderbox/tbmaster.1 ============================================================================== --- user/des/tinderbox/tbmaster.1 Sun Sep 22 14:21:40 2013 (r255789) +++ user/des/tinderbox/tbmaster.1 Sun Sep 22 14:22:28 2013 (r255790) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 22, 2013 +.Dd September 23, 2013 .Dt TBMASTER 1 .Os .Sh NAME @@ -110,7 +110,14 @@ Whitespace around the equal sign and aro multiple values is optional. .Pp Blank lines are ignored, as is anything following a hash sign -.Pq Dq # . +.Pq Sq # . +.Pp +Additionally, the +.Cm include +statement can be used to include one configuration in another: +.Bl -tag +.It Cm include Ar otherconfig +.El .Pp The following configuration variables are defined: .Bl -tag -width 12n @@ -166,7 +173,7 @@ A list of environment variables to pass script. Each value is the name and value of an environment variable, separated by an equal sign -.Pq Dq = . +.Pq Sq = . No default value. .It HOME .Pq Vt single @@ -224,7 +231,7 @@ No default value. Which architectures and machines to build for. Each value is the name of an architecture, optionally followed by a forward slash -.Pq Dq / +.Pq Sq / and a machine name. If the machine name is not specified, it is assumed to be identical to the architecture name. Modified: user/des/tinderbox/tbmaster.pl ============================================================================== --- user/des/tinderbox/tbmaster.pl Sun Sep 22 14:21:40 2013 (r255789) +++ user/des/tinderbox/tbmaster.pl Sun Sep 22 14:22:28 2013 (r255790) @@ -154,6 +154,7 @@ sub clearconf() { # # Read in a configuration file # +sub readconf($); sub readconf($) { my $fn = shift; @@ -167,34 +168,39 @@ sub readconf($) { s/\s*(\#.*)?$//; $line .= $_; if (length($line) && $line !~ s/\\$/ /) { - die("$fn: syntax error on line $n\n") - unless ($line =~ m/^(\w+)\s*([+]?=)\s*(.*)$/); - my ($key, $op, $val) = (uc($1), $2, $3); - $val = '' - unless defined($val); - die("$fn: unknown keyword on line $n\n") - unless (exists($CONFIG{$key})); - if (ref($CONFIG{$key})) { - my @a = split(/\s*,\s*/, $val); - foreach (@a) { - s/^\'([^\']*)\'$/$1/; - } - if ($op eq '=') { - $CONFIG{$key} = \@a; - } elsif ($op eq '+=') { - push(@{$CONFIG{$key}}, @a); + if ($line =~ m/^include\s+([\w-]+)$/) { + readconf("$1.rc") + or die("$fn: include $1: $!\n"); + } elsif ($line =~ m/^(\w+)\s*([+]?=)\s*(.*)$/) { + my ($key, $op, $val) = (uc($1), $2, $3); + $val = '' + unless defined($val); + die("$fn: $key is not a known keyword on line $n\n") + unless (exists($CONFIG{$key})); + if (ref($CONFIG{$key})) { + my @a = split(/\s*,\s*/, $val); + foreach (@a) { + s/^\'([^\']*)\'$/$1/; + } + if ($op eq '=') { + $CONFIG{$key} = \@a; + } elsif ($op eq '+=') { + push(@{$CONFIG{$key}}, @a); + } else { + die("can't happen\n"); + } } else { - die("can't happen\n"); + $val =~ s/^\'([^\']*)\'$/$1/; + if ($op eq '=') { + $CONFIG{$key} = $val; + } elsif ($op eq '+=') { + die("$fn: $key is not an array on line $n\n"); + } else { + die("can't happen\n"); + } } } else { - $val =~ s/^\'([^\']*)\'$/$1/; - if ($op eq '=') { - $CONFIG{$key} = $val; - } elsif ($op eq '+=') { - die("$fn: invalid operator on line $n\n"); - } else { - die("can't happen\n"); - } + die("$fn: syntax error on line $n\n") } $line = ""; } From owner-svn-src-user@FreeBSD.ORG Sun Sep 22 14:23:23 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5B9A6BC; Sun, 22 Sep 2013 14:23:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A48C22486; Sun, 22 Sep 2013 14:23:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8MENNHI060644; Sun, 22 Sep 2013 14:23:23 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8MENNVM060636; Sun, 22 Sep 2013 14:23:23 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309221423.r8MENNVM060636@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 22 Sep 2013 14:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255791 - user/des/tinderbox/etc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 14:23:23 -0000 Author: des Date: Sun Sep 22 14:23:22 2013 New Revision: 255791 URL: http://svnweb.freebsd.org/changeset/base/255791 Log: Add variant configurations for building head without clang and bmake. Added: user/des/tinderbox/etc/head-nobmake-build.rc (contents, props changed) user/des/tinderbox/etc/head-noclang-build.rc (contents, props changed) Modified: user/des/tinderbox/etc/Makefile Modified: user/des/tinderbox/etc/Makefile ============================================================================== --- user/des/tinderbox/etc/Makefile Sun Sep 22 14:22:28 2013 (r255790) +++ user/des/tinderbox/etc/Makefile Sun Sep 22 14:23:22 2013 (r255791) @@ -6,6 +6,7 @@ ETCFILES += freebsd7-update.rc freebsd7- ETCFILES += freebsd8-update.rc freebsd8-build.rc ETCFILES += freebsd9-update.rc freebsd9-build.rc ETCFILES += head-update.rc head-build.rc +ETCFILES += head-noclang-build.rc head-nobmake-build.rc ETCDIR ?= ${HOME}/etc ETCOWN ?= ${USER} ETCGRP ?= ${USER} Added: user/des/tinderbox/etc/head-nobmake-build.rc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/tinderbox/etc/head-nobmake-build.rc Sun Sep 22 14:23:22 2013 (r255791) @@ -0,0 +1,8 @@ +# +# HEAD tinderbox setup, shared source - build without bmake +# +# $FreeBSD$ +# + +include head-build +env += WITHOUT_BMAKE=YES Added: user/des/tinderbox/etc/head-noclang-build.rc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/des/tinderbox/etc/head-noclang-build.rc Sun Sep 22 14:23:22 2013 (r255791) @@ -0,0 +1,8 @@ +# +# HEAD tinderbox setup, shared source - build without clang +# +# $FreeBSD$ +# + +include head-build +env += WITHOUT_CLANG=YES, WITH_GCC=YES From owner-svn-src-user@FreeBSD.ORG Mon Sep 23 00:16:20 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95C654C1; Mon, 23 Sep 2013 00:16:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 839AF218B; Mon, 23 Sep 2013 00:16:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8N0GKxJ078181; Mon, 23 Sep 2013 00:16:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8N0GKKf078180; Mon, 23 Sep 2013 00:16:20 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309230016.r8N0GKKf078180@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 23 Sep 2013 00:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255808 - user/des/tinderbox/etc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 00:16:20 -0000 Author: des Date: Mon Sep 23 00:16:19 2013 New Revision: 255808 URL: http://svnweb.freebsd.org/changeset/base/255808 Log: WITHOUT_CLANG also requires WITH_GNUCXX. Modified: user/des/tinderbox/etc/head-noclang-build.rc Modified: user/des/tinderbox/etc/head-noclang-build.rc ============================================================================== --- user/des/tinderbox/etc/head-noclang-build.rc Mon Sep 23 00:04:36 2013 (r255807) +++ user/des/tinderbox/etc/head-noclang-build.rc Mon Sep 23 00:16:19 2013 (r255808) @@ -5,4 +5,4 @@ # include head-build -env += WITHOUT_CLANG=YES, WITH_GCC=YES +env += WITHOUT_CLANG=YES, WITH_GCC=YES, WITH_GNUCXX=YES From owner-svn-src-user@FreeBSD.ORG Tue Sep 24 06:48:29 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 334FBD6D; Tue, 24 Sep 2013 06:48:29 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20C502546; Tue, 24 Sep 2013 06:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8O6mSrK080928; Tue, 24 Sep 2013 06:48:28 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8O6mSnd080927; Tue, 24 Sep 2013 06:48:28 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201309240648.r8O6mSnd080927@svn.freebsd.org> From: Peter Holm Date: Tue, 24 Sep 2013 06:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255834 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 06:48:29 -0000 Author: pho Date: Tue Sep 24 06:48:28 2013 New Revision: 255834 URL: http://svnweb.freebsd.org/changeset/base/255834 Log: Added kevent(2) regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/kevent6.sh (contents, props changed) Added: user/pho/stress2/misc/kevent6.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/kevent6.sh Tue Sep 24 06:48:28 2013 (r255834) @@ -0,0 +1,156 @@ +#!/bin/sh + +# +# Copyright (c) 2013 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# "Sleeping thread (tid 101094, pid 13104) owns a non-sleepable lock" seen. +# Fixed in r255798. + +. ../default.cfg + +odir=`pwd` + +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > kevent6.c +cc -o kevent6 -Wall -Wextra -O2 -g kevent6.c -lpthread || exit 1 +rm -f kevent6.c +cd $odir + +mount | grep "on $mntpoint " | grep -q md$mdstart && umount -f $mntpoint +mdconfig -l | grep -q $mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 2g -u ${mdstart} +bsdlabel -w md$mdstart auto +newfs -U md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint +chmod 777 $mntpoint + +su $testuser -c "(cd $mntpoint; /tmp/kevent6)" + +while mount | grep -q $mntpoint; do + umount $mntpoint || sleep 1 +done +mdconfig -d -u $mdstart +rm -f /tmp/kevent6 + +exit +EOF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PARALLEL 8 + +static char path[80]; + +int fd; + +void * +spin(void *arg __unused) +{ + int i; + + for (i= 0;; i++) { + snprintf(path, sizeof(path), "file.%06d.%d", getpid(), i); + if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) + err(1, "creat()"); + close(fd); + usleep(10000); + fd = 0; + unlink(path); + } + return (NULL); +} + +void * +test(void *arg __unused) +{ + int kq; + int i, n; + struct kevent ev; + struct timespec ts; + + for (i = 0; i < 500000; i++) { + if ((kq = kqueue()) < 0) + err(1, "kqueue()"); + + n = 0; + memset(&ev, 0, sizeof(ev)); + EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, + NOTE_DELETE|NOTE_RENAME|NOTE_EXTEND, 0, 0); + n++; + + if (kevent(kq, &ev, n, NULL, 0, NULL) < 0) { + close(kq); + continue; + } + + memset(&ev, 0, sizeof(ev)); + ts.tv_sec = 0; + ts.tv_nsec = 1000000; + if ((n = kevent(kq, NULL, 0, &ev, 1, &ts)) == -1) + err(1, "kevent()"); + + close(kq); + } + return (NULL); +} + +int +main(void) +{ + int i; + pthread_t cp[PARALLEL], sp; + + if (pthread_create(&sp, NULL, spin, NULL) != 0) + perror("pthread_create"); + + for (i = 0; i < PARALLEL; i++) { + if (pthread_create(&cp[i], NULL, test, NULL) != 0) + perror("pthread_create"); + } + + + for (i = 0; i < PARALLEL; i++) + pthread_join(cp[i], NULL); + + close(fd); + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Thu Sep 26 08:28:32 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0D8FD7E6; Thu, 26 Sep 2013 08:28:32 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EFC1B27A3; Thu, 26 Sep 2013 08:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8Q8SVWd038135; Thu, 26 Sep 2013 08:28:31 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8Q8SVHF038134; Thu, 26 Sep 2013 08:28:31 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201309260828.r8Q8SVHF038134@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 26 Sep 2013 08:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255875 - user/uqs/git_conv X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 08:28:32 -0000 Author: uqs Date: Thu Sep 26 08:28:31 2013 New Revision: 255875 URL: http://svnweb.freebsd.org/changeset/base/255875 Log: Update the git exporter rules with new file matches to ignore Modified: user/uqs/git_conv/freebsd-base.rules Modified: user/uqs/git_conv/freebsd-base.rules ============================================================================== --- user/uqs/git_conv/freebsd-base.rules Thu Sep 26 07:53:18 2013 (r255874) +++ user/uqs/git_conv/freebsd-base.rules Thu Sep 26 08:28:31 2013 (r255875) @@ -86,12 +86,12 @@ end match match /user/peter/foo.txt end match # Not a branch, ignore -match /user/peterj/.* +match /user/(nwhitehorn|peterj)/.* end match # Cannot put .git directories into git, makes it unhappy match /user/uqs/git_conv end match -match /vendor/(atf|v4l)/README.* +match /vendor/(atf|ldns-host|v4l)/README.* end match match /vendor/(apr|apr-util|atf|bzip2|flex|serf|subversion)/FREEBSD-(Xlist|upgrade) end match From owner-svn-src-user@FreeBSD.ORG Thu Sep 26 13:13:12 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C2433303; Thu, 26 Sep 2013 13:13:12 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF97428F7; Thu, 26 Sep 2013 13:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8QDDCEU036680; Thu, 26 Sep 2013 13:13:12 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QDDCxh036679; Thu, 26 Sep 2013 13:13:12 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201309261313.r8QDDCxh036679@svn.freebsd.org> From: Peter Holm Date: Thu, 26 Sep 2013 13:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255879 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 13:13:12 -0000 Author: pho Date: Thu Sep 26 13:13:12 2013 New Revision: 255879 URL: http://svnweb.freebsd.org/changeset/base/255879 Log: Added test scenario that exposed a callout arithmetic overflow problem. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/kevent7.sh (contents, props changed) Added: user/pho/stress2/misc/kevent7.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/kevent7.sh Thu Sep 26 13:13:12 2013 (r255879) @@ -0,0 +1,264 @@ +#!/bin/sh + +# +# Copyright (c) 2013 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Threaded syscall(2) fuzz test inspired by the iknowthis test suite +# by Tavis Ormandy + +# kevent(2) with random arguments. +# Spinning threads seen. +# Fixed in r255877. + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +ulimit -t 200 +odir=`pwd` +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > kevent7.c +rm -f /tmp/kevent7 +cc -o kevent7 -Wall -Wextra -O2 -g kevent7.c -lpthread || exit 1 +rm -f kevent7.c + +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 2g -u $mdstart || exit 1 +bsdlabel -w md$mdstart auto +newfs -U md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint +chmod 777 $mntpoint + +for i in `jot 5`; do + (cd $mntpoint; /tmp/kevent7 $* < /dev/null) & + sleep 60 + killall -9 kevent7 +done + +for i in `jot 5`; do + mount | grep -q md${mdstart}$part && \ + umount $mntpoint && mdconfig -d -u $mdstart && break + sleep 10 +done +if mount | grep -q md${mdstart}$part; then + fstat $mntpoint + echo "umount $mntpoint failed" + exit 1 +fi +rm -f /tmp/kevent7 +exit +EOF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int fd[900], fds[2], socketpr[2]; +#define N (128 * 1024 / (int)sizeof(u_int32_t)) +u_int32_t r[N]; +int syscallno; + +static void +hand(int i __unused) { /* handler */ + _exit(1); +} + +unsigned long +makearg(void) +{ + unsigned int i; + unsigned long val; + + val = arc4random(); + i = arc4random() % 100; + if (i < 20) + val = val & 0xff; + if (i >= 20 && i < 40) + val = val & 0xffff; + if (i >= 40 && i < 60) + val = (unsigned long)(r) | (val & 0xffff); +#if defined(__LP64__) + if (i >= 60) { + val = (val << 32) | arc4random(); + if (i > 80) + val = val & 0x00007fffffffffffUL; + } +#endif + + return(val); +} + +void * +test(void *arg __unused) +{ + + FTS *fts; + FTSENT *p; + int ftsoptions; + char *args[5]; + int i; + + ftsoptions = FTS_PHYSICAL; + args[0] = "/dev"; + args[1] = "/proc"; + args[2] = "/usr/compat/linux/proc"; + args[3] = "."; + args[4] = 0; + + for (;;) { + for (i = 0; i < N; i++) + r[i] = arc4random(); + if ((fts = fts_open(args, ftsoptions, NULL)) == NULL) + err(1, "fts_open"); + + i = 0; + while ((p = fts_read(fts)) != NULL) { + if (fd[i] > 0) + close(fd[i]); + if ((fd[i] = open(p->fts_path, O_RDWR)) == -1) + if ((fd[i] = open(p->fts_path, O_WRONLY)) == -1) + if ((fd[i] = open(p->fts_path, O_RDONLY)) == -1) + continue; + i++; + i = i % 900; + } + + if (fts_close(fts) == -1) + err(1, "fts_close()"); + if (pipe(fds) == -1) + err(1, "pipe()"); + if (socketpair(PF_UNIX, SOCK_SEQPACKET, 0, socketpr) == -1) + err(1, "socketpair()"); + sleep(1); + close(socketpr[0]); + close(socketpr[1]); + close(fds[0]); + close(fds[1]); + } + return(0); +} + +void * +calls(void *arg __unused) +{ + int i, kq, num; + unsigned long arg1, arg2, arg3, arg4, arg5, arg6, arg7; + + if ((kq = kqueue()) < 0) + err(1, "kqueue()"); + for (i = 0;; i++) { + if (i == 0) + usleep(1000); + num = syscallno; + arg1 = makearg(); + arg2 = makearg(); + arg3 = makearg(); + arg4 = makearg(); + arg5 = makearg(); + arg6 = makearg(); + arg7 = makearg(); + +#if 0 + fprintf(stderr, "%2d : syscall(%3d, %lx, %lx, %lx, %lx, %lx, %lx, %lx)\n", + i, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7); +#endif + alarm(1); + syscall(num, arg1, arg2, arg3, arg4, arg5, arg6, arg7); + num = 0; + } + close(kq); + + return (0); +} + +int +main(void) +{ + struct passwd *pw; + time_t start; + pthread_t rp, cp[50]; + int j; + + if ((pw = getpwnam("nobody")) == NULL) + err(1, "no such user: nobody"); + + if (setgroups(1, &pw->pw_gid) || + setegid(pw->pw_gid) || setgid(pw->pw_gid) || + seteuid(pw->pw_uid) || setuid(pw->pw_uid)) + err(1, "Can't drop privileges to \"nobody\""); + endpwent(); + + signal(SIGALRM, hand); + signal(SIGILL, hand); + signal(SIGFPE, hand); + signal(SIGSEGV, hand); + signal(SIGBUS, hand); + signal(SIGURG, hand); + signal(SIGSYS, hand); + signal(SIGTRAP, hand); + + syscallno = SYS_kevent; + + start = time(NULL); + while (time(NULL) - start < 120) { + if (fork() == 0) { + arc4random_stir(); + if (pthread_create(&rp, NULL, test, NULL) != 0) + perror("pthread_create"); + usleep(1000); + for (j = 0; j < 50; j++) + if (pthread_create(&cp[j], NULL, calls, NULL) != 0) + perror("pthread_create"); + + for (j = 0; j < 50; j++) + pthread_join(cp[j], NULL); + _exit(0); + } + wait(NULL); + } + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Thu Sep 26 13:15:34 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0D53E62E; Thu, 26 Sep 2013 13:15:34 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF7692926; Thu, 26 Sep 2013 13:15:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8QDFX7n037898; Thu, 26 Sep 2013 13:15:33 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8QDFXAT037897; Thu, 26 Sep 2013 13:15:33 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201309261315.r8QDFXAT037897@svn.freebsd.org> From: Peter Holm Date: Thu, 26 Sep 2013 13:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r255881 - user/pho/stress2 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 13:15:34 -0000 Author: pho Date: Thu Sep 26 13:15:33 2013 New Revision: 255881 URL: http://svnweb.freebsd.org/changeset/base/255881 Log: Rename Makefile.gnu to GNUmakefile. Submitted by: Garrett Cooper Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/GNUmakefile - copied unchanged from r255867, user/pho/stress2/Makefile.gnu Deleted: user/pho/stress2/Makefile.gnu Copied: user/pho/stress2/GNUmakefile (from r255867, user/pho/stress2/Makefile.gnu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/GNUmakefile Thu Sep 26 13:15:33 2013 (r255881, copy of r255867, user/pho/stress2/Makefile.gnu) @@ -0,0 +1,28 @@ +#MAKE=gmake + +# Gnu Makefile by "Brad Knotwell" + +LIBOBJS=$(subst .c,.o,$(wildcard lib/*.c)) +TESTDIRS=run swap mkdir creat thr1 syscall rw sysctl tcp udp +EXES=$(foreach dir,$(TESTDIRS),testcases/$(dir)/$(dir).test) +OBJS=$(subst .test,.o,$(EXES)) +SRCS=$(subst .o,.c,$(OBJS)) +LIBS=./lib/libstress.a +CFLAGS=-g -Wall -I./include + +all: $(EXES) + +lib/libstress.a: lib/libstress.a($(LIBOBJS)) + ranlib lib/libstress.a + +lib/libstress.a(*.o): $(LIBOBJS) + +$(OBJS): %.o: %.c + +$(EXES): %.test: %.o lib/libstress.a + +%.test: %.o + $(CC) $(CFLAGS) $(LIBS) $< -o $@ + +clean: + rm -fr $(LIBOBJS) lib/libstress.a $(EXES) $(OBJS)