Date: Tue, 13 Oct 2015 16:51:12 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r289224 - in user/ngie/more-tests2: etc/mtree tests/sys tests/sys/vfs tools/regression/vfs Message-ID: <201510131651.t9DGpC2s090141@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Oct 13 16:51:12 2015 New Revision: 289224 URL: https://svnweb.freebsd.org/changeset/base/289224 Log: Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs Added: user/ngie/more-tests2/tests/sys/vfs/ user/ngie/more-tests2/tests/sys/vfs/trailing_slash.sh - copied unchanged from r289197, user/ngie/more-tests2/tools/regression/vfs/trailing_slash.t Deleted: user/ngie/more-tests2/tools/regression/vfs/ Modified: user/ngie/more-tests2/etc/mtree/BSD.tests.dist user/ngie/more-tests2/tests/sys/Makefile Modified: user/ngie/more-tests2/etc/mtree/BSD.tests.dist ============================================================================== --- user/ngie/more-tests2/etc/mtree/BSD.tests.dist Tue Oct 13 16:50:12 2015 (r289223) +++ user/ngie/more-tests2/etc/mtree/BSD.tests.dist Tue Oct 13 16:51:12 2015 (r289224) @@ -412,6 +412,8 @@ .. posixshm .. + vfs + .. vm .. .. Modified: user/ngie/more-tests2/tests/sys/Makefile ============================================================================== --- user/ngie/more-tests2/tests/sys/Makefile Tue Oct 13 16:50:12 2015 (r289223) +++ user/ngie/more-tests2/tests/sys/Makefile Tue Oct 13 16:51:12 2015 (r289224) @@ -13,6 +13,7 @@ TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto TESTS_SUBDIRS+= posixshm +TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default Copied: user/ngie/more-tests2/tests/sys/vfs/trailing_slash.sh (from r289197, user/ngie/more-tests2/tools/regression/vfs/trailing_slash.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/more-tests2/tests/sys/vfs/trailing_slash.sh Tue Oct 13 16:51:12 2015 (r289224, copy of r289197, user/ngie/more-tests2/tools/regression/vfs/trailing_slash.t) @@ -0,0 +1,42 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Tests vfs_lookup()'s handling of trailing slashes for symlinks that +# point to files. See kern/21768 for details. Fixed in r193028. +# + +testfile="/tmp/testfile-$$" +testlink="/tmp/testlink-$$" + +tests=" +$testfile:$testlink:$testfile:0 +$testfile:$testlink:$testfile/:1 +$testfile:$testlink:$testlink:0 +$testfile:$testlink:$testlink/:1 +$testfile/:$testlink:$testlink:1 +$testfile/:$testlink:$testlink/:1 +" + +touch $testfile || exit 1 +trap "rm $testfile $testlink" EXIT + +set $tests +echo "1..$#" +n=1 +for testspec ; do + ( + IFS=: + set $testspec + unset IFS + ln -fs "$1" "$2" || exit 1 + cat "$3" >/dev/null 2>&1 + ret=$? + if [ "$ret" -eq "$4" ] ; then + echo "ok $n" + else + echo "fail $n - expected $4, got $ret" + fi + ) + n=$((n+1)) +done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510131651.t9DGpC2s090141>