From owner-svn-src-user@FreeBSD.ORG Sun Jun 14 02:21:20 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2EAB11E; Sun, 14 Jun 2015 02:21:20 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1C159AE; Sun, 14 Jun 2015 02:21:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5E2LKv3062367; Sun, 14 Jun 2015 02:21:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5E2LKOp062366; Sun, 14 Jun 2015 02:21:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506140221.t5E2LKOp062366@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 14 Jun 2015 02:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284364 - user/ngie/more-tests/tests/sys/aio 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.20 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, 14 Jun 2015 02:21:20 -0000 Author: ngie Date: Sun Jun 14 02:21:19 2015 New Revision: 284364 URL: https://svnweb.freebsd.org/changeset/base/284364 Log: Fix Makefile Modified: user/ngie/more-tests/tests/sys/aio/Makefile Modified: user/ngie/more-tests/tests/sys/aio/Makefile ============================================================================== --- user/ngie/more-tests/tests/sys/aio/Makefile Sun Jun 14 00:31:22 2015 (r284363) +++ user/ngie/more-tests/tests/sys/aio/Makefile Sun Jun 14 02:21:19 2015 (r284364) @@ -2,8 +2,8 @@ TESTSDIR= ${TESTSBASE}/sys/aio -PLAIN_TESTS_C+= aio_kqueue -PLAIN_TESTS_C+= lio_kqueue +PLAIN_TESTS_C+= aio_kqueue_test +PLAIN_TESTS_C+= lio_kqueue_test ATF_TESTS_C+= aio_test DPADD.aio_test+= ${LIBUTIL} From owner-svn-src-user@FreeBSD.ORG Sun Jun 14 11:08:28 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99103554; Sun, 14 Jun 2015 11:08:28 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87BA0F9C; Sun, 14 Jun 2015 11:08:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5EB8S7G030757; Sun, 14 Jun 2015 11:08:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5EB8SwX030756; Sun, 14 Jun 2015 11:08:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506141108.t5EB8SwX030756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 14 Jun 2015 11:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284379 - user/ngie/more-tests/tests/sys/file 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.20 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, 14 Jun 2015 11:08:28 -0000 Author: ngie Date: Sun Jun 14 11:08:27 2015 New Revision: 284379 URL: https://svnweb.freebsd.org/changeset/base/284379 Log: Fix some -Wunused warnings Modified: user/ngie/more-tests/tests/sys/file/ftruncate_test.c Modified: user/ngie/more-tests/tests/sys/file/ftruncate_test.c ============================================================================== --- user/ngie/more-tests/tests/sys/file/ftruncate_test.c Sun Jun 14 08:33:14 2015 (r284378) +++ user/ngie/more-tests/tests/sys/file/ftruncate_test.c Sun Jun 14 11:08:27 2015 (r284379) @@ -57,7 +57,7 @@ static off_t lengths[] = {0, 1, 2, 3, 4, static int lengths_count = sizeof(lengths) / sizeof(off_t); int -main(int argc, char *argv[]) +main(void) { int error, fd, fds[2], i, read_only_fd; char path[PATH_MAX]; From owner-svn-src-user@FreeBSD.ORG Sun Jun 14 20:52:53 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C41E32DB; Sun, 14 Jun 2015 20:52:53 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A69B4964; Sun, 14 Jun 2015 20:52:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5EKqrXO025747; Sun, 14 Jun 2015 20:52:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5EKqqnp025741; Sun, 14 Jun 2015 20:52:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506142052.t5EKqqnp025741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 14 Jun 2015 20:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284388 - in user/ngie/more-tests: bin/ls bin/ls/tests etc/mtree 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.20 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, 14 Jun 2015 20:52:53 -0000 Author: ngie Date: Sun Jun 14 20:52:52 2015 New Revision: 284388 URL: https://svnweb.freebsd.org/changeset/base/284388 Log: Start adding tests for bin/ls Added: user/ngie/more-tests/bin/ls/tests/ user/ngie/more-tests/bin/ls/tests/Makefile (contents, props changed) user/ngie/more-tests/bin/ls/tests/ls_tests.sh (contents, props changed) Modified: user/ngie/more-tests/bin/ls/Makefile user/ngie/more-tests/etc/mtree/BSD.tests.dist Modified: user/ngie/more-tests/bin/ls/Makefile ============================================================================== --- user/ngie/more-tests/bin/ls/Makefile Sun Jun 14 20:23:41 2015 (r284387) +++ user/ngie/more-tests/bin/ls/Makefile Sun Jun 14 20:52:52 2015 (r284388) @@ -13,4 +13,8 @@ CFLAGS+= -DCOLORLS LIBADD+= termcapw xo .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: user/ngie/more-tests/bin/ls/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/more-tests/bin/ls/tests/Makefile Sun Jun 14 20:52:52 2015 (r284388) @@ -0,0 +1,8 @@ +TESTSDIR= ${TESTSBASE}/bin/ls + +ATF_TESTS_SH+= ls_tests +# This seems like overkill, but the idea in mind is that all of the testcases +# should be runnable as !root +TEST_METADATA.ls_tests+= required_user="unprivileged" + +.include Added: user/ngie/more-tests/bin/ls/tests/ls_tests.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/more-tests/bin/ls/tests/ls_tests.sh Sun Jun 14 20:52:52 2015 (r284388) @@ -0,0 +1,108 @@ +# +# Copyright 2015 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: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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 COPYRIGHT HOLDERS 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 COPYRIGHT +# OWNER 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$ +# + +create_test_inputs() +{ + ATF_TMPDIR=$(pwd) + + # XXX: need to nest this because of how kyua creates $TMPDIR; otherwise + # it will run into EPERM issues later + TEST_INPUTS_DIR="${ATF_TMPDIR}/test/inputs" + + atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_INPUTS_DIR + cd $TEST_INPUTS_DIR + atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b + atf_check -e empty -s exit:0 ln -s a/b c + atf_check -e empty -s exit:0 touch d + atf_check -e empty -s exit:0 ln d e + atf_check -e empty -s exit:0 touch .f + atf_check -e empty -s exit:0 mkdir .g + atf_check -e empty -s exit:0 mkfifo h +} + +atf_test_case A_flag +A_flag_head() +{ + atf_set "require.user" "unprivileged" +} + +A_flag_body() +{ + create_test_inputs + + WITH_A=$PWD/../with_A.out + WITHOUT_A=$PWD/../without_A.out + + atf_check -e empty -o save:$WITH_A -s exit:0 ls -A + atf_check -e empty -o save:$WITHOUT_A -s exit:0 ls + + echo "-A usage" + cat $WITH_A + echo "No -A usage" + cat $WITHOUT_A + + for dot_path in '\.f' '\.g'; do + atf_check -e empty -o not-empty -s exit:0 grep "${dot_path}" \ + $WITH_A + atf_check -e empty -o empty -s not-exit:0 grep "${dot_path}" \ + $WITHOUT_A + done +} + +atf_test_case A_flag_implied_when_root +A_flag_implied_when_root_head() +{ + atf_set "descr" "Verify that -A is implied for root" + atf_set "require.user" "root" +} + +A_flag_implied_when_root_body() +{ + create_test_inputs + + WITH_EXPLICIT=$PWD/../with_explicit_A.out + WITH_IMPLIED=$PWD/../with_implied_A.out + + atf_check -e empty -o save:$WITH_EXPLICIT -s exit:0 ls -A + atf_check -e empty -o save:$WITH_IMPLIED -s exit:0 ls + + echo "Explicit -A usage" + cat $WITH_EXPLICIT + echo "Implicit -A usage" + cat $WITH_IMPLIED + + atf_check_equal "$(cat $WITH_EXPLICIT)" "$(cat $WITH_IMPLIED)" +} + +atf_init_test_cases() +{ + + atf_add_test_case A_flag + atf_add_test_case A_flag_implied_when_root +} Modified: user/ngie/more-tests/etc/mtree/BSD.tests.dist ============================================================================== --- user/ngie/more-tests/etc/mtree/BSD.tests.dist Sun Jun 14 20:23:41 2015 (r284387) +++ user/ngie/more-tests/etc/mtree/BSD.tests.dist Sun Jun 14 20:52:52 2015 (r284388) @@ -14,6 +14,8 @@ .. expr .. + ls + .. mv .. pax From owner-svn-src-user@FreeBSD.ORG Sun Jun 14 20:55:49 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC563E3; Sun, 14 Jun 2015 20:55:49 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99779978; Sun, 14 Jun 2015 20:55:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5EKtnwM026240; Sun, 14 Jun 2015 20:55:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5EKtnVf026239; Sun, 14 Jun 2015 20:55:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506142055.t5EKtnVf026239@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 14 Jun 2015 20:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284389 - user/ngie/more-tests/share/mk 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.20 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, 14 Jun 2015 20:55:49 -0000 Author: ngie Date: Sun Jun 14 20:55:48 2015 New Revision: 284389 URL: https://svnweb.freebsd.org/changeset/base/284389 Log: Remove support for ALLOW_DEPRECATED_ATF_TOOLS atf-run has been deprecated upstream since 0.20, which was released over a year ago (02/2014) Modified: user/ngie/more-tests/share/mk/atf.test.mk Modified: user/ngie/more-tests/share/mk/atf.test.mk ============================================================================== --- user/ngie/more-tests/share/mk/atf.test.mk Sun Jun 14 20:52:52 2015 (r284388) +++ user/ngie/more-tests/share/mk/atf.test.mk Sun Jun 14 20:55:48 2015 (r284389) @@ -22,24 +22,6 @@ ATF_TESTS_C?= ATF_TESTS_CXX?= ATF_TESTS_SH?= -# Whether to allow using the deprecated ATF tools or not. -# -# If 'yes', this file will generate Atffiles when requested and will also -# support using the deprecated atf-run tool to execute the tests. -ALLOW_DEPRECATED_ATF_TOOLS?= no - -# Knob to control the handling of the Atffile for this Makefile. -# -# If 'yes', an Atffile exists in the source tree and is installed into -# TESTSDIR. -# -# If 'auto', an Atffile is automatically generated based on the list of test -# programs built by the Makefile and is installed into TESTSDIR. This is the -# default and is sufficient in the majority of the cases. -# -# If 'no', no Atffile is installed. -ATFFILE?= auto - # Path to the prefix of the installed ATF tools, if any. # # If atf-run and atf-report are installed from ports, we automatically define a @@ -121,67 +103,3 @@ ${_T}: ${ATF_TESTS_SH_SRC_${_T}} mv ${.TARGET}.tmp ${.TARGET} .endfor .endif - -.if ${ALLOW_DEPRECATED_ATF_TOOLS} != "no" - -.if ${ATFFILE:tl} != "no" -FILES+= Atffile -FILESDIR_Atffile= ${TESTSDIR} - -.if ${ATFFILE:tl} == "auto" -CLEANFILES+= Atffile Atffile.tmp - -Atffile: Makefile - @{ echo 'Content-Type: application/X-atf-atffile; version="1"'; \ - echo; \ - echo '# Automatically generated by atf-test.mk.'; \ - echo; \ - echo 'prop: test-suite = "'${TESTSUITE}'"'; \ - echo; \ - for tp in ${ATF_TESTS_C} ${ATF_TESTS_CXX} ${ATF_TESTS_SH} \ - ${TESTS_SUBDIRS}; \ - do \ - echo "tp: $${tp}"; \ - done; } >Atffile.tmp - @mv Atffile.tmp Atffile -.endif -.endif - -ATF_REPORT?= ${ATF_PREFIX}/bin/atf-report -ATF_RUN?= ${ATF_PREFIX}/bin/atf-run -.if exists(${ATF_RUN}) && exists(${ATF_REPORT}) -# Definition of the "make test" target and supporting variables. -# -# This target, by necessity, can only work for native builds (i.e. a freeBSD -# host building a release for the same system). The target runs ATF, which is -# not in the toolchain, and the tests execute code built for the target host. -# -# Due to the dependencies of the binaries built by the source tree and how they -# are used by tests, it is highly possible for a execution of "make test" to -# report bogus results unless the new binaries are put in place. -_TESTS_FIFO= ${.OBJDIR}/atf-run.fifo -_TESTS_LOG= ${.OBJDIR}/atf-run.log -CLEANFILES+= ${_TESTS_FIFO} ${_TESTS_LOG} -realregress: .PHONY - @set -e; \ - if [ -z "${TESTSDIR}" ]; then \ - echo "*** No TESTSDIR defined; nothing to do."; \ - exit 0; \ - fi; \ - cd ${DESTDIR}${TESTSDIR}; \ - rm -f ${_TESTS_FIFO}; \ - mkfifo ${_TESTS_FIFO}; \ - tee ${_TESTS_LOG} < ${_TESTS_FIFO} | ${TESTS_ENV} ${ATF_REPORT} & \ - set +e; \ - ${TESTS_ENV} ${ATF_RUN} >> ${_TESTS_FIFO}; \ - result=$${?}; \ - wait; \ - rm -f ${_TESTS_FIFO}; \ - echo; \ - echo "*** The verbatim output of atf-run has been saved to ${_TESTS_LOG}"; \ - echo "***"; \ - echo "*** WARNING: atf-run is deprecated; please install kyua instead"; \ - exit $${result} -.endif - -.endif From owner-svn-src-user@FreeBSD.ORG Sun Jun 14 20:56:42 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 498B34F4; Sun, 14 Jun 2015 20:56:42 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3873D97F; Sun, 14 Jun 2015 20:56:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5EKugXO026407; Sun, 14 Jun 2015 20:56:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5EKugeo026406; Sun, 14 Jun 2015 20:56:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506142056.t5EKugeo026406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 14 Jun 2015 20:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284390 - user/ngie/more-tests 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.20 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, 14 Jun 2015 20:56:42 -0000 Author: ngie Date: Sun Jun 14 20:56:41 2015 New Revision: 284390 URL: https://svnweb.freebsd.org/changeset/base/284390 Log: Note why the !.PARSEDIR case is important/exists Modified: user/ngie/more-tests/Makefile Modified: user/ngie/more-tests/Makefile ============================================================================== --- user/ngie/more-tests/Makefile Sun Jun 14 20:55:48 2015 (r284389) +++ user/ngie/more-tests/Makefile Sun Jun 14 20:56:41 2015 (r284390) @@ -99,9 +99,11 @@ # # For more information, see the build(7) manual page. # + .ifdef .PARSEDIR MK_META_MODE?= yes .else +# Allow bootstrapping with fmake from earlier versions of FreeBSD MK_META_MODE= no .endif .if ${MK_META_MODE} == "yes" From owner-svn-src-user@FreeBSD.ORG Sun Jun 14 21:14:48 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00C9BD9F; Sun, 14 Jun 2015 21:14:47 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E03D2E5F; Sun, 14 Jun 2015 21:14:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5ELElHg036490; Sun, 14 Jun 2015 21:14:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5ELElnD036489; Sun, 14 Jun 2015 21:14:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506142114.t5ELElnD036489@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 14 Jun 2015 21:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284391 - user/ngie/more-tests 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.20 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, 14 Jun 2015 21:14:48 -0000 Author: ngie Date: Sun Jun 14 21:14:47 2015 New Revision: 284391 URL: https://svnweb.freebsd.org/changeset/base/284391 Log: To be on the safe side, only enable MK_META_MODE if MAKEVERSION >= 20150606 Modified: user/ngie/more-tests/Makefile Modified: user/ngie/more-tests/Makefile ============================================================================== --- user/ngie/more-tests/Makefile Sun Jun 14 20:56:41 2015 (r284390) +++ user/ngie/more-tests/Makefile Sun Jun 14 21:14:47 2015 (r284391) @@ -100,10 +100,10 @@ # For more information, see the build(7) manual page. # -.ifdef .PARSEDIR +# Allow bootstrapping with fmake from earlier versions of FreeBSD +.if defined(.PARSEDIR) && ${MAKE_VERSION} >= 20150606 MK_META_MODE?= yes .else -# Allow bootstrapping with fmake from earlier versions of FreeBSD MK_META_MODE= no .endif .if ${MK_META_MODE} == "yes" From owner-svn-src-user@FreeBSD.ORG Tue Jun 16 21:07:54 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A33941F1; Tue, 16 Jun 2015 21:07:54 +0000 (UTC) (envelope-from delphij@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FA0A9BA; Tue, 16 Jun 2015 21:07:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5GL7sbd000565; Tue, 16 Jun 2015 21:07:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5GL7rw0000561; Tue, 16 Jun 2015 21:07:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506162107.t5GL7rw0000561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 16 Jun 2015 21:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284467 - in user/cperciva/freebsd-update-build/patches: 10.1-RELEASE 8.4-RELEASE 9.3-RELEASE 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.20 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, 16 Jun 2015 21:07:54 -0000 Author: delphij Date: Tue Jun 16 21:07:53 2015 New Revision: 284467 URL: https://svnweb.freebsd.org/changeset/base/284467 Log: Add recent patches. Added: user/cperciva/freebsd-update-build/patches/10.1-RELEASE/10-EN-15:04.freebsd-update user/cperciva/freebsd-update-build/patches/10.1-RELEASE/10-EN-15:05.ufs user/cperciva/freebsd-update-build/patches/10.1-RELEASE/11-EN-15:06.file user/cperciva/freebsd-update-build/patches/10.1-RELEASE/11-EN-15:07.zfs user/cperciva/freebsd-update-build/patches/10.1-RELEASE/12-SA-15:10.openssl user/cperciva/freebsd-update-build/patches/8.4-RELEASE/28-EN-15:04.freebsd-update user/cperciva/freebsd-update-build/patches/8.4-RELEASE/29-EN-15:06.file user/cperciva/freebsd-update-build/patches/8.4-RELEASE/30-SA-15:10.openssl user/cperciva/freebsd-update-build/patches/9.3-RELEASE/14-EN-15:04.freebsd-update user/cperciva/freebsd-update-build/patches/9.3-RELEASE/15-EN-15:06.file (contents, props changed) user/cperciva/freebsd-update-build/patches/9.3-RELEASE/16-SA-15:10.openssl Added: user/cperciva/freebsd-update-build/patches/10.1-RELEASE/10-EN-15:04.freebsd-update ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.1-RELEASE/10-EN-15:04.freebsd-update Tue Jun 16 21:07:53 2015 (r284467) @@ -0,0 +1,152 @@ +Index: usr.sbin/freebsd-update/freebsd-update.8 +=================================================================== +--- usr.sbin/freebsd-update/freebsd-update.8 (revision 282245) ++++ usr.sbin/freebsd-update/freebsd-update.8 (working copy) +@@ -25,7 +25,7 @@ + .\" + .\" $FreeBSD$ + .\" +-.Dd July 14, 2010 ++.Dd March 2, 2015 + .Dt FREEBSD-UPDATE 8 + .Os FreeBSD + .Sh NAME +@@ -36,10 +36,12 @@ + .Op Fl b Ar basedir + .Op Fl d Ar workdir + .Op Fl f Ar conffile ++.Op Fl F + .Op Fl k Ar KEY + .Op Fl r Ar newrelease + .Op Fl s Ar server + .Op Fl t Ar address ++.Op Fl -not-running-from-cron + .Cm command ... + .Sh DESCRIPTION + The +@@ -54,16 +56,16 @@ by the + .Fx + Release Engineering Team, e.g., + .Fx +-7.3-RELEASE and ++9.3-RELEASE and + .Fx +-8.0-RELEASE, but not ++10.1-RELEASE, but not + .Fx +-6.3-STABLE or ++9.3-STABLE or + .Fx +-9.0-CURRENT. ++11-CURRENT. + .Sh OPTIONS + The following options are supported: +-.Bl -tag -width "-f conffile" ++.Bl -tag -width "-r newrelease" + .It Fl b Ar basedir + Operate on a system mounted at + .Ar basedir . +@@ -81,6 +83,10 @@ Read configuration options from + .Ar conffile . + (default: + .Pa /etc/freebsd-update.conf ) ++.It Fl F ++Force ++.Nm Cm fetch ++to proceed where it normally would not, such as an unfinished upgrade + .It Fl k Ar KEY + Trust an RSA key with SHA256 of + .Ar KEY . +@@ -98,12 +104,21 @@ Mail output of + command, if any, to + .Ar address . + (default: root, or as given in the configuration file.) ++.It Fl -not-running-from-cron ++Force ++.Nm Cm fetch ++to proceed when there is no controlling tty. ++This is for use by automated scripts and orchestration tools. ++Please do not run ++.Nm Cm fetch ++from crontab or similar using this flag, see: ++.Nm Cm cron + .El + .Sh COMMANDS + The + .Cm command + can be any one of the following: +-.Bl -tag -width "-f conffile" ++.Bl -tag -width "rollback" + .It Cm fetch + Based on the currently installed world and the configuration + options set, fetch all available binary updates. +Index: usr.sbin/freebsd-update/freebsd-update.sh +=================================================================== +--- usr.sbin/freebsd-update/freebsd-update.sh (revision 282245) ++++ usr.sbin/freebsd-update/freebsd-update.sh (working copy) +@@ -43,12 +43,15 @@ Options: + (default: /var/db/freebsd-update/) + -f conffile -- Read configuration options from conffile + (default: /etc/freebsd-update.conf) ++ -F -- Force a fetch operation to proceed + -k KEY -- Trust an RSA key with SHA256 hash of KEY + -r release -- Target for upgrade (e.g., 6.2-RELEASE) + -s server -- Server from which to fetch updates + (default: update.FreeBSD.org) + -t address -- Mail output of cron command, if any, to address + (default: root) ++ --not-running-from-cron ++ -- Run without a tty, for use by automated tools + Commands: + fetch -- Fetch updates from server + cron -- Sleep rand(3600) seconds, fetch updates, and send an +@@ -399,6 +402,12 @@ init_params () { + + # No commands specified yet + COMMANDS="" ++ ++ # Force fetch to proceed ++ FORCEFETCH=0 ++ ++ # Run without a TTY ++ NOTTYOK=0 + } + + # Parse the command line +@@ -411,6 +420,12 @@ parse_cmdline () { + if [ ! -z "${CONFFILE}" ]; then usage; fi + shift; CONFFILE="$1" + ;; ++ -F) ++ FORCEFETCH=1 ++ ;; ++ --not-running-from-cron) ++ NOTTYOK=1 ++ ;; + + # Configuration file equivalents + -b) +@@ -665,6 +680,14 @@ fetch_check_params () { + echo "(Did you mean 'upgrade' instead?)" + exit 1 + fi ++ ++ # Check that we have updates ready to install ++ if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then ++ echo "You have a partially completed upgrade pending" ++ echo "Run '$0 install' first." ++ echo "Run '$0 fetch -F' to proceed anyway." ++ exit 1 ++ fi + } + + # Perform sanity checks etc. before fetching upgrades. +@@ -3202,7 +3225,7 @@ get_params () { + # Fetch command. Make sure that we're being called + # interactively, then run fetch_check_params and fetch_run + cmd_fetch () { +- if [ ! -t 0 ]; then ++ if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then + echo -n "`basename $0` fetch should not " + echo "be run non-interactively." + echo "Run `basename $0` cron instead." Added: user/cperciva/freebsd-update-build/patches/10.1-RELEASE/10-EN-15:05.ufs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.1-RELEASE/10-EN-15:05.ufs Tue Jun 16 21:07:53 2015 (r284467) @@ -0,0 +1,313 @@ +Index: sys/ufs/ffs/ffs_softdep.c +=================================================================== +--- sys/ufs/ffs/ffs_softdep.c (revision 282245) ++++ sys/ufs/ffs/ffs_softdep.c (working copy) +@@ -735,9 +735,10 @@ static struct malloc_type *memtype[] = { + static void check_clear_deps(struct mount *); + static void softdep_error(char *, int); + static int softdep_process_worklist(struct mount *, int); +-static int softdep_waitidle(struct mount *); ++static int softdep_waitidle(struct mount *, int); + static void drain_output(struct vnode *); + static struct buf *getdirtybuf(struct buf *, struct rwlock *, int); ++static int check_inodedep_free(struct inodedep *); + static void clear_remove(struct mount *); + static void clear_inodedeps(struct mount *); + static void unlinked_inodedep(struct mount *, struct inodedep *); +@@ -1377,6 +1378,10 @@ softdep_flush(addr) + mp = (struct mount *)addr; + ump = VFSTOUFS(mp); + atomic_add_int(&stat_flush_threads, 1); ++ ACQUIRE_LOCK(ump); ++ ump->softdep_flags &= ~FLUSH_STARTING; ++ wakeup(&ump->softdep_flushtd); ++ FREE_LOCK(ump); + if (print_threads) { + if (stat_flush_threads == 1) + printf("Running %s at pid %d\n", bufdaemonproc->p_comm, +@@ -1389,7 +1394,7 @@ softdep_flush(addr) + VFSTOUFS(mp)->softdep_jblocks->jb_suspended)) + kthread_suspend_check(); + ACQUIRE_LOCK(ump); +- if ((ump->softdep_flags & FLUSH_CLEANUP) == 0) ++ if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) + msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, + "sdflush", hz / 2); + ump->softdep_flags &= ~FLUSH_CLEANUP; +@@ -1419,11 +1424,9 @@ worklist_speedup(mp) + + ump = VFSTOUFS(mp); + LOCK_OWNED(ump); +- if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { ++ if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) + ump->softdep_flags |= FLUSH_CLEANUP; +- if (ump->softdep_flushtd->td_wchan == &ump->softdep_flushtd) +- wakeup(&ump->softdep_flushtd); +- } ++ wakeup(&ump->softdep_flushtd); + } + + static int +@@ -1468,14 +1471,10 @@ softdep_speedup(ump) + TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); + FREE_GBLLOCK(&lk); + if ((altump->softdep_flags & +- (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { ++ (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) + altump->softdep_flags |= FLUSH_CLEANUP; +- altump->um_softdep->sd_cleanups++; +- if (altump->softdep_flushtd->td_wchan == +- &altump->softdep_flushtd) { +- wakeup(&altump->softdep_flushtd); +- } +- } ++ altump->um_softdep->sd_cleanups++; ++ wakeup(&altump->softdep_flushtd); + FREE_LOCK(altump); + } + } +@@ -1887,8 +1886,8 @@ softdep_flushworklist(oldmnt, countp, td + struct thread *td; + { + struct vnode *devvp; +- int count, error = 0; + struct ufsmount *ump; ++ int count, error; + + /* + * Alternately flush the block device associated with the mount +@@ -1897,6 +1896,7 @@ softdep_flushworklist(oldmnt, countp, td + * are found. + */ + *countp = 0; ++ error = 0; + ump = VFSTOUFS(oldmnt); + devvp = ump->um_devvp; + while ((count = softdep_process_worklist(oldmnt, 1)) > 0) { +@@ -1904,36 +1904,47 @@ softdep_flushworklist(oldmnt, countp, td + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_FSYNC(devvp, MNT_WAIT, td); + VOP_UNLOCK(devvp, 0); +- if (error) ++ if (error != 0) + break; + } + return (error); + } + ++#define SU_WAITIDLE_RETRIES 20 + static int +-softdep_waitidle(struct mount *mp) ++softdep_waitidle(struct mount *mp, int flags __unused) + { + struct ufsmount *ump; +- int error; +- int i; ++ struct vnode *devvp; ++ struct thread *td; ++ int error, i; + + ump = VFSTOUFS(mp); ++ devvp = ump->um_devvp; ++ td = curthread; ++ error = 0; + ACQUIRE_LOCK(ump); +- for (i = 0; i < 10 && ump->softdep_deps; i++) { ++ for (i = 0; i < SU_WAITIDLE_RETRIES && ump->softdep_deps != 0; i++) { + ump->softdep_req = 1; +- if (ump->softdep_on_worklist) +- panic("softdep_waitidle: work added after flush."); +- msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1); ++ KASSERT((flags & FORCECLOSE) == 0 || ++ ump->softdep_on_worklist == 0, ++ ("softdep_waitidle: work added after flush")); ++ msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM | PDROP, ++ "softdeps", 10 * hz); ++ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); ++ error = VOP_FSYNC(devvp, MNT_WAIT, td); ++ VOP_UNLOCK(devvp, 0); ++ if (error != 0) ++ break; ++ ACQUIRE_LOCK(ump); + } + ump->softdep_req = 0; +- FREE_LOCK(ump); +- error = 0; +- if (i == 10) { ++ if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) { + error = EBUSY; + printf("softdep_waitidle: Failed to flush worklist for %p\n", + mp); + } +- ++ FREE_LOCK(ump); + return (error); + } + +@@ -1990,7 +2001,7 @@ retry_flush: + error = EBUSY; + } + if (!error) +- error = softdep_waitidle(oldmnt); ++ error = softdep_waitidle(oldmnt, flags); + if (!error) { + if (oldmnt->mnt_kern_flag & MNTK_UNMOUNT) { + retry = 0; +@@ -2490,9 +2501,18 @@ softdep_mount(devvp, mp, fs, cred) + /* + * Start our flushing thread in the bufdaemon process. + */ ++ ACQUIRE_LOCK(ump); ++ ump->softdep_flags |= FLUSH_STARTING; ++ FREE_LOCK(ump); + kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, + &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", + mp->mnt_stat.f_mntonname); ++ ACQUIRE_LOCK(ump); ++ while ((ump->softdep_flags & FLUSH_STARTING) != 0) { ++ msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdstart", ++ hz / 2); ++ } ++ FREE_LOCK(ump); + /* + * When doing soft updates, the counters in the + * superblock may have gotten out of sync. Recomputation +@@ -7629,17 +7649,13 @@ check_inode_unwritten(inodedep) + return (1); + } + +-/* +- * Try to free an inodedep structure. Return 1 if it could be freed. +- */ + static int +-free_inodedep(inodedep) ++check_inodedep_free(inodedep) + struct inodedep *inodedep; + { + + LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); +- if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || +- (inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || ++ if ((inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || + !LIST_EMPTY(&inodedep->id_dirremhd) || + !LIST_EMPTY(&inodedep->id_pendinghd) || + !LIST_EMPTY(&inodedep->id_bufwait) || +@@ -7654,6 +7670,21 @@ free_inodedep(inodedep) + inodedep->id_nlinkdelta != 0 || + inodedep->id_savedino1 != NULL) + return (0); ++ return (1); ++} ++ ++/* ++ * Try to free an inodedep structure. Return 1 if it could be freed. ++ */ ++static int ++free_inodedep(inodedep) ++ struct inodedep *inodedep; ++{ ++ ++ LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); ++ if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || ++ !check_inodedep_free(inodedep)) ++ return (0); + if (inodedep->id_state & ONDEPLIST) + LIST_REMOVE(inodedep, id_deps); + LIST_REMOVE(inodedep, id_hash); +@@ -13838,7 +13869,8 @@ softdep_check_suspend(struct mount *mp, + { + struct bufobj *bo; + struct ufsmount *ump; +- int error; ++ struct inodedep *inodedep; ++ int error, unlinked; + + bo = &devvp->v_bufobj; + ASSERT_BO_WLOCKED(bo); +@@ -13899,6 +13931,20 @@ softdep_check_suspend(struct mount *mp, + break; + } + ++ unlinked = 0; ++ if (MOUNTEDSUJ(mp)) { ++ for (inodedep = TAILQ_FIRST(&ump->softdep_unlinked); ++ inodedep != NULL; ++ inodedep = TAILQ_NEXT(inodedep, id_unlinked)) { ++ if ((inodedep->id_state & (UNLINKED | UNLINKLINKS | ++ UNLINKONLIST)) != (UNLINKED | UNLINKLINKS | ++ UNLINKONLIST) || ++ !check_inodedep_free(inodedep)) ++ continue; ++ unlinked++; ++ } ++ } ++ + /* + * Reasons for needing more work before suspend: + * - Dirty buffers on devvp. +@@ -13908,8 +13954,8 @@ softdep_check_suspend(struct mount *mp, + error = 0; + if (bo->bo_numoutput > 0 || + bo->bo_dirty.bv_cnt > 0 || +- softdep_depcnt != 0 || +- ump->softdep_deps != 0 || ++ softdep_depcnt != unlinked || ++ ump->softdep_deps != unlinked || + softdep_accdepcnt != ump->softdep_accdeps || + secondary_writes != 0 || + mp->mnt_secondary_writes != 0 || +Index: sys/ufs/ffs/ffs_vfsops.c +=================================================================== +--- sys/ufs/ffs/ffs_vfsops.c (revision 282245) ++++ sys/ufs/ffs/ffs_vfsops.c (working copy) +@@ -1502,8 +1502,11 @@ ffs_sync(mp, waitfor) + if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) + panic("%s: ffs_sync: modification on read-only filesystem", + fs->fs_fsmnt); +- if (waitfor == MNT_LAZY) +- return (ffs_sync_lazy(mp)); ++ if (waitfor == MNT_LAZY) { ++ if (!rebooting) ++ return (ffs_sync_lazy(mp)); ++ waitfor = MNT_NOWAIT; ++ } + + /* + * Write back each (modified) inode. +@@ -1560,7 +1563,7 @@ loop: + /* + * Force stale filesystem control information to be flushed. + */ +- if (waitfor == MNT_WAIT) { ++ if (waitfor == MNT_WAIT || rebooting) { + if ((error = softdep_flushworklist(ump->um_mountp, &count, td))) + allerror = error; + /* Flushed work items may create new vnodes to clean */ +@@ -1577,9 +1580,12 @@ loop: + if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { + BO_UNLOCK(bo); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); +- if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) +- allerror = error; ++ error = VOP_FSYNC(devvp, waitfor, td); + VOP_UNLOCK(devvp, 0); ++ if (MOUNTEDSOFTDEP(mp) && (error == 0 || error == EAGAIN)) ++ error = ffs_sbupdate(ump, waitfor, 0); ++ if (error != 0) ++ allerror = error; + if (allerror == 0 && waitfor == MNT_WAIT) + goto loop; + } else if (suspend != 0) { +Index: sys/ufs/ffs/softdep.h +=================================================================== +--- sys/ufs/ffs/softdep.h (revision 282245) ++++ sys/ufs/ffs/softdep.h (working copy) +@@ -1063,6 +1063,8 @@ struct mount_softdeps { + */ + #define FLUSH_EXIT 0x0001 /* time to exit */ + #define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ ++#define FLUSH_STARTING 0x0004 /* flush thread not yet started */ ++ + /* + * Keep the old names from when these were in the ufsmount structure. + */ Added: user/cperciva/freebsd-update-build/patches/10.1-RELEASE/11-EN-15:06.file ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.1-RELEASE/11-EN-15:06.file Tue Jun 16 21:07:53 2015 (r284467) @@ -0,0 +1,6603 @@ +Index: contrib/file/ChangeLog +=================================================================== +--- contrib/file/ChangeLog (revision 284174) ++++ contrib/file/ChangeLog (working copy) +@@ -1,3 +1,97 @@ ++2015-01-02 15:15 Christos Zoulas ++ ++ * release 5.22 ++ ++2015-01-01 12:01 Christos Zoulas ++ ++ * add indirect relative for TIFF/Exif ++ ++2014-12-16 18:10 Christos Zoulas ++ ++ * restructure elf note printing to avoid repeated messages ++ * add note limit, suggested by Alexander Cherepanov ++ ++2014-12-16 16:53 Christos Zoulas ++ ++ * Bail out on partial pread()'s (Alexander Cherepanov) ++ * Fix incorrect bounds check in file_printable (Alexander Cherepanov) ++ ++2014-12-11 20:01 Christos Zoulas ++ ++ * PR/405: ignore SIGPIPE from uncompress programs ++ * change printable -> file_printable and use it in ++ more places for safety ++ * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP ++ is present print the interpreter name. ++ ++2014-12-10 20:01 Christos Zoulas ++ ++ * release 5.21 ++ ++2014-11-27 18:40 Christos Zoulas ++ ++ * Allow setting more parameters from the command line. ++ * Split name/use and indirect magic recursion limits. ++ ++2014-11-27 11:12 Christos Zoulas ++ ++ * Adjust ELF parameters and the default recursion ++ level. ++ * Allow setting the recursion level dynamically. ++ ++2014-11-24 8:55 Christos Zoulas ++ ++ * The following fixes resulted from Thomas Jarosch's fuzzing ++ tests that revealed severe performance issues on pathological ++ input: ++ - limit number of elf program and sections processing ++ - abort elf note processing quickly ++ - reduce the number of recursion levels from 20 to 10 ++ - preserve error messages in indirect magic handling ++ ++ This is tracked as CVE-2014-8116 and CVE-2014-8117 ++ ++2014-11-12 10:30 Christos Zoulas ++ ++ * fix bogus free in the user buffer case. ++ ++2014-11-11 12:35 Christos Zoulas ++ ++ * fix out of bounds read for pascal strings ++ * fix memory leak (not freeing the head of each mlist) ++ ++2014-11-07 10:25 Christos Zoulas ++ ++ * When printing strings from a file, convert them to printable ++ on a byte by byte basis, so that we don't get issues with ++ locale's trying to interpret random byte streams as UTF-8 and ++ having printf error out with EILSEQ. ++ ++2014-10-17 11:48 Christos Zoulas ++ ++ * fix bounds in note reading (Francisco Alonso / Red Hat) ++ ++2014-10-11 15:02 Christos Zoulas ++ ++ * fix autoconf glue for setlocale and locale_t; some OS's ++ have locale_t in xlocale.h ++ ++2014-10-10 15:01 Christos Zoulas ++ ++ * release 5.20 ++ ++2014-08-17 10:01 Christos Zoulas ++ ++ * recognize encrypted CDF documents ++ ++2014-08-04 9:18 Christos Zoulas ++ ++ * add magic_load_buffers from Brooks Davis ++ ++2014-07-24 16:40 Christos Zoulas ++ ++ * add thumbs.db support ++ + 2014-06-12 12:28 Christos Zoulas + + * release 5.19 +Index: contrib/file/README +=================================================================== +--- contrib/file/README (revision 284174) ++++ contrib/file/README (working copy) +@@ -1,6 +1,6 @@ + ## README for file(1) Command ## + +- @(#) $File: README,v 1.48 2014/03/07 13:55:30 christos Exp $ ++ @(#) $File: README,v 1.49 2015/01/02 20:23:04 christos Exp $ + + Mailing List: file@mx.gw.com + Mailing List archives: http://mx.gw.com/pipermail/file/ +@@ -25,8 +25,8 @@ A public read-only git repository of the same sour + + https://github.com/file/file + +-The major changes for 5.x are CDF file parsing, indirect magic, and +-overhaul in mime and ascii encoding handling. ++The major changes for 5.x are CDF file parsing, indirect magic, name/use ++(recursion) and overhaul in mime and ascii encoding handling. + + The major feature of 4.x is the refactoring of the code into a library, + and the re-write of the file command in terms of that library. The library +@@ -67,33 +67,41 @@ in magic(5) format please, to the maintainer, Chri + COPYING - read this first. + README - read this second (you are currently reading this file). + INSTALL - read on how to install +- + src/apprentice.c - parses /etc/magic to learn magic ++src/asctime_r.c - replacement for OS's that don't have it. + src/apptype.c - used for OS/2 specific application type magic + src/asprintf.c - replacement for OS's that don't have it. + src/ascmagic.c - third & last set of tests, based on hardwired assumptions. +-src/asctime_r.c - for systems that don't have it. +-src/asprintf.c - for systems that don't have it. +-src/cdf.c - parser for Microsoft Compound Document Files ++src/asctime_r.c - replacement for OS's that don't have it. ++src/asprintf.c - replacement for OS's that don't have it. ++src/cdf.[ch] - parser for Microsoft Compound Document Files + src/cdf_time.c - time converter for CDF. + src/compress.c - handles decompressing files to look inside. +-src/ctime_r.c - for systems that don't have it. ++src/ctime_r.c - replacement for OS's that don't have it. ++src/elfclass.h - common code for elf 32/64. + src/encoding.c - handles unicode encodings + src/file.c - the main program + src/file.h - header file ++src/file_opts.h - list of options ++src/fmtcheck.c - replacement for OS's that don't have it. + src/fsmagic.c - first set of tests the program runs, based on filesystem info + src/funcs.c - utilility functions +-src/getopt_long.c - for systems that don't have it. +-src/getline.c - for systems that don't have it. ++src/getline.c - replacement for OS's that don't have it. ++src/getopt_long.c - replacement for OS's that don't have it. + src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore). + src/names.h - header file for ascmagic.c ++src/magic.h.in - source file for magic.h + src/magic.c - the libmagic api ++src/pread.c - replacement for OS's that don't have it. + src/print.c - print results, errors, warnings. + src/readcdf.c - CDF wrapper. + src/readelf.[ch] - Stand-alone elf parsing code. + src/softmagic.c - 2nd set of tests, based on /etc/magic +-src/strlcat.c - for systems that don't have it. +-src/strlcpy.c - for systems that don't have it. ++src/mygetopt.h - replacement for OS's that don't have it. ++src/strcasestr.c - replacement for OS's that don't have it. ++src/strlcat.c - replacement for OS's that don't have it. ++src/strlcpy.c - replacement for OS's that don't have it. ++src/tar.h - tar file definitions + src/vasprintf.c - for systems that don't have it. + doc/file.man - man page for the command + doc/magic.man - man page for the magic file, courtesy Guy Harris. +Index: contrib/file/TODO +=================================================================== +--- contrib/file/TODO (revision 284174) ++++ contrib/file/TODO (working copy) +@@ -15,3 +15,5 @@ small amount of C is needed (because fast executio + required for soft magic, not the more detailed information given by + hard-wired routines). In this regard, note that hplip, which is + BSD-licensed, has a magic reimplementation in Python. ++ ++Read the kerberos magic entry for more ideas. +Index: contrib/file/config.h.in +=================================================================== +--- contrib/file/config.h.in (revision 284174) ++++ contrib/file/config.h.in (working copy) +@@ -44,6 +44,9 @@ + /* Define to 1 if you have the `fork' function. */ + #undef HAVE_FORK + ++/* Define to 1 if you have the `freelocale' function. */ ++#undef HAVE_FREELOCALE ++ + /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ + #undef HAVE_FSEEKO + +@@ -95,9 +98,15 @@ + /* Define to 1 if you have a working `mmap' system call. */ + #undef HAVE_MMAP + ++/* Define to 1 if you have the `newlocale' function. */ ++#undef HAVE_NEWLOCALE ++ + /* Define to 1 if you have the `pread' function. */ + #undef HAVE_PREAD + ++/* Define to 1 if you have the `setlocale' function. */ ++#undef HAVE_SETLOCALE ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_STDDEF_H + +@@ -182,6 +191,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_UNISTD_H + ++/* Define to 1 if you have the `uselocale' function. */ ++#undef HAVE_USELOCALE ++ + /* Define to 1 if you have the `utime' function. */ + #undef HAVE_UTIME + +@@ -219,6 +231,9 @@ + /* Define to 1 if `vfork' works. */ + #undef HAVE_WORKING_VFORK + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_XLOCALE_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_ZLIB_H + +Index: contrib/file/configure +=================================================================== +--- contrib/file/configure (revision 284174) ++++ contrib/file/configure (working copy) +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for file 5.19. ++# Generated by GNU Autoconf 2.69 for file 5.22. + # + # Report bugs to . + # +@@ -590,8 +590,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='file' + PACKAGE_TARNAME='file' +-PACKAGE_VERSION='5.19' +-PACKAGE_STRING='file 5.19' ++PACKAGE_VERSION='5.22' ++PACKAGE_STRING='file 5.22' + PACKAGE_BUGREPORT='christos@astron.com' + PACKAGE_URL='' + +@@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures file 5.19 to adapt to many kinds of systems. ++\`configure' configures file 5.22 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1397,7 +1397,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of file 5.19:";; ++ short | recursive ) echo "Configuration of file 5.22:";; + esac + cat <<\_ACEOF + +@@ -1507,7 +1507,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-file configure 5.19 ++file configure 5.22 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by file $as_me 5.19, which was ++It was created by file $as_me 5.22, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3029,7 +3029,7 @@ fi + + # Define the identity of the package. + PACKAGE='file' +- VERSION='5.19' ++ VERSION='5.22' + + + cat >>confdefs.h <<_ACEOF +@@ -12785,7 +12785,7 @@ fi + + done + +-for ac_header in getopt.h err.h ++for ac_header in getopt.h err.h xlocale.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +@@ -14191,7 +14191,7 @@ fi + fi + + +-for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof ++for ac_func in strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +@@ -14998,7 +14998,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by file $as_me 5.19, which was ++This file was extended by file $as_me 5.22, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15064,7 +15064,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-file config.status 5.19 ++file config.status 5.22 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Index: contrib/file/configure.ac +=================================================================== +--- contrib/file/configure.ac (revision 284174) ++++ contrib/file/configure.ac (working copy) +@@ -1,5 +1,5 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT([file],[5.19],[christos@astron.com]) ++AC_INIT([file],[5.22],[christos@astron.com]) + AM_INIT_AUTOMAKE([subdir-objects foreign]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +@@ -82,7 +82,7 @@ AC_HEADER_MAJOR + AC_HEADER_SYS_WAIT + AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h) + AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) +-AC_CHECK_HEADERS(getopt.h err.h) ++AC_CHECK_HEADERS(getopt.h err.h xlocale.h) + AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) + AC_CHECK_HEADERS(zlib.h) + +@@ -138,7 +138,7 @@ else + fi]) + + dnl Checks for functions +-AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof) ++AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) + + dnl Provide implementation of some required functions if necessary + AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr fmtcheck) +Index: contrib/file/doc/file.man +=================================================================== +--- contrib/file/doc/file.man (revision 284174) ++++ contrib/file/doc/file.man (working copy) +@@ -1,5 +1,5 @@ +-.\" $File: file.man,v 1.106 2014/03/07 23:11:51 christos Exp $ +-.Dd January 30, 2014 ++.\" $File: file.man,v 1.111 2014/12/16 23:18:40 christos Exp $ ++.Dd December 16, 2014 + .Dt FILE __CSECTION__ + .Os + .Sh NAME +@@ -16,6 +16,7 @@ + .Op Fl F Ar separator + .Op Fl f Ar namefile + .Op Fl m Ar magicfiles ++.Op Fl P Ar name=value + .Ar + .Ek + .Nm +@@ -303,6 +304,16 @@ or + attempt to preserve the access time of files analyzed, to pretend that + .Nm + never read them. ++.It Fl P , Fl Fl parameter Ar name=value ++Set various parameter limits. ++.Bl -column "elf_phnum" "Default" "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -offset indent ++.It Sy "Name" Ta Sy "Default" Ta Sy "Explanation" ++.It Li indir Ta 15 Ta recursion limit for indirect magic ++.It Li name Ta 30 Ta use count limit for name/use magic ++.It Li elf_notes Ta 256 Ta max ELF notes processed ++.It Li elf_phnum Ta 128 Ta max ELF program sections processed ++.It Li elf_shnum Ta 32768 Ta max ELF sections processed ++.El + .It Fl r , Fl Fl raw + Don't translate unprintable characters to \eooo. + Normally +@@ -385,6 +396,7 @@ options. + .Xr hexdump 1 , + .Xr od 1 , + .Xr strings 1 , ++.Xr fstyp 8 + .Sh STANDARDS CONFORMANCE + This program is believed to exceed the System V Interface Definition + of FILE(CMD), as near as one can determine from the vague language +Index: contrib/file/doc/libmagic.man +=================================================================== +--- contrib/file/doc/libmagic.man (revision 284174) ++++ contrib/file/doc/libmagic.man (working copy) +@@ -1,4 +1,4 @@ +-.\" $File: libmagic.man,v 1.28 2014/03/02 14:47:16 christos Exp $ ++.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $ + .\" + .\" Copyright (c) Christos Zoulas 2003. + .\" All Rights Reserved. +@@ -25,7 +25,7 @@ + .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + .\" SUCH DAMAGE. + .\" +-.Dd January 6, 2012 ++.Dd December 16, 2014 + .Dt LIBMAGIC 3 + .Os + .Sh NAME +@@ -40,6 +40,9 @@ + .Nm magic_compile , + .Nm magic_list , + .Nm magic_load , ++.Nm magic_load_buffers , ++.Nm magic_setparam , ++.Nm magic_getparam , + .Nm magic_version + .Nd Magic number recognition library + .Sh LIBRARY +@@ -71,6 +74,12 @@ + .Ft int + .Fn magic_load "magic_t cookie" "const char *filename" + .Ft int ++.Fn magic_load_buffers "magic_t cookie" "void **buffers" "size_t *sizes" "size_t nbuffers" ++.Ft int ++.Fn magic_getparam "magic_t cookie" "int param" "void *value" ++.Ft int ++.Fn magic_setparam "magic_t cookie" "int param" "const void *value" ++.Ft int + .Fn magic_version "void" + .Sh DESCRIPTION + These functions +@@ -253,6 +262,60 @@ adds + to the database filename as appropriate. + .Pp + The ++.Fn magic_load_buffers ++function takes an array of size ++.Fa nbuffers ++of ++.Fa buffers ++with a respective size for each in the array of ++.Fa sizes ++loaded with the contents of the magic databases from the filesystem. ++This function can be used in environment where the magic library does ++not have direct access to the filesystem, but can access the magic ++database via shared memory or other IPC means. ++.Pp ++The ++.Fn magic_getparam ++and ++.Fn magic_setparam ++allow getting and setting various limits related to the the magic ++library. ++.Bl -column "MAGIC_PARAM_ELF_PHNUM_MAX" "size_t" "Default" -offset indent ++.It Sy "Parameter" Ta Sy "Type" Ta Sy "Default" ++.It Li MAGIC_PARAM_INDIR_MAX Ta size_t Ta 15 ++.It Li MAGIC_PARAM_NAME_MAX Ta size_t Ta 30 ++.It Li MAGIC_PARAM_ELF_NOTES_MAX Ta size_t Ta 256 ++.It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128 ++.It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768 ++.El ++.Pp ++The ++.Dv MAGIC_PARAM_INDIR_RECURSION ++parameter controls how many levels of recursion will be followed for ++indirect magic entries. ++.Pp ++The ++.Dv MAGIC_PARAM_NAME_RECURSION ++parameter controls how many levels of recursion will be followed for ++for name/use calls. ++.Pp ++The ++.Dv MAGIC_PARAM_NAME_MAX ++parameter controls the maximum number of calls for name/use. ++.Pp ++The ++.Dv MAGIC_PARAM_NOTES_MAX ++parameter controls how many ELF notes will be processed. ++.Pp ++The ++.Dv MAGIC_PARAM_PHNUM_MAX ++parameter controls how many ELF program sections will be processed. ++.Pp ++The ++.Dv MAGIC_PARAM_SHNUM_MAX ++parameter controls how many ELF sections will be processed. ++.Pp ++The + .Fn magic_version + command returns the version number of this library which is compiled into + the shared library using the constant +Index: contrib/file/doc/magic.man +=================================================================== +--- contrib/file/doc/magic.man (revision 284174) ++++ contrib/file/doc/magic.man (working copy) +@@ -1,5 +1,5 @@ +-.\" $File: magic.man,v 1.84 2014/06/03 19:01:34 christos Exp $ +-.Dd June 3, 2014 ++.\" $File: magic.man,v 1.85 2015/01/01 17:07:34 christos Exp $ ++.Dd January 1, 2015 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sat Jun 20 17:28:30 2015 Return-Path: Delivered-To: svn-src-user@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8C8E80; Sat, 20 Jun 2015 17:28:30 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE2AEA4F; Sat, 20 Jun 2015 17:28:30 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5KHSU4L061349; Sat, 20 Jun 2015 17:28:30 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5KHSUDb061348; Sat, 20 Jun 2015 17:28:30 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201506201728.t5KHSUDb061348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 20 Jun 2015 17:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r284647 - 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.20 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: Sat, 20 Jun 2015 17:28:31 -0000 Author: pho Date: Sat Jun 20 17:28:30 2015 New Revision: 284647 URL: https://svnweb.freebsd.org/changeset/base/284647 Log: Added a regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/tmpfs15.sh (contents, props changed) Added: user/pho/stress2/misc/tmpfs15.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/tmpfs15.sh Sat Jun 20 17:28:30 2015 (r284647) @@ -0,0 +1,50 @@ +#!/bin/sh + +# +# Copyright (c) 2015 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$ +# + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +# "panic: Assertion de->td_cookie == de->td_hash failed at +# /usr/src/sys/modules/tmpfs/../../fs/tmpfs/tmpfs_subr.c:964" seen. +# https://people.freebsd.org/~pho/stress/log/tmpfs15.txt +# Fixed by 284594. + +# Test scenario by kib@ + +. ../default.cfg + +mount -t tmpfs none $mntpoint +mkdir $mntpoint/1 $mntpoint/2 +cd $mntpoint/1 +mkdir p5-Mojo-Pg-2.06 +mkdir advancemenu-2.7_2 +mv p5-Mojo-Pg-2.06 ../2 + +cd / +umount $mntpoint