Merge ^/head r320398 through r320572.

This commit is contained in:
Dimitry Andric 2017-07-02 11:48:07 +00:00
commit f6e653bb10
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang500-import/; revision=320573
463 changed files with 4232 additions and 1763 deletions

View File

@ -43,7 +43,7 @@ contrib/libcxxrt dim Pre-commit review preferred.
contrib/llvm dim Pre-commit review preferred.
contrib/llvm/tools/lldb emaste Pre-commit review preferred.
contrib/netbsd-tests freebsd-testing,ngie Pre-commit review requested.
contrib/pjdfstest freebsd-testing,ngie,pjd Pre-commit review requested.
contrib/pjdfstest freebsd-testing,asomers,ngie,pjd Pre-commit review requested.
dev/usb/wlan adrian Pre-commit review requested, send to freebsd-wireless@freebsd.org
*env(3) secteam Due to the problematic security history of this
code, please have patches reviewed by secteam.

View File

@ -56,6 +56,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
Please see the 20141231 entry below for information about prerequisites
and upgrading, if you are not already using clang 3.5.0 or higher.
20170701:
WITHOUT_RCMDS is now the default. Set WITH_RCMDS if you need them to be
built with the base system.
20170625:
The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is
a very major ABI incompatible change, so users of FreeBSD/powerpc must

View File

@ -40,6 +40,7 @@
.Nm atf_fail ,
.Nm atf_get ,
.Nm atf_get_srcdir ,
.Nm atf_init_test_cases ,
.Nm atf_pass ,
.Nm atf_require_prog ,
.Nm atf_set ,
@ -82,6 +83,8 @@
.Nm atf_get
.Qq var_name
.Nm atf_get_srcdir
.Nm atf_init_test_cases
.Qq name
.Nm atf_pass
.Nm atf_require_prog
.Qq prog_name

View File

@ -10,9 +10,8 @@
#include "ipf.h"
char *hostname(family, ip)
int family;
void *ip;
char *
hostname(int family, void *ip)
{
static char hostbuf[MAXHOSTNAMELEN+1];
struct hostent *hp;
@ -24,7 +23,7 @@ char *hostname(family, ip)
if (family == AF_INET) {
ipa.s_addr = *(u_32_t *)ip;
if (ipa.s_addr == htonl(0xfedcba98))
return "test.host.dots";
return ("test.host.dots");
}
if ((opts & OPT_NORESOLVE) == 0) {
@ -34,7 +33,7 @@ char *hostname(family, ip)
*hp->h_name != '\0') {
strncpy(hostbuf, hp->h_name, sizeof(hostbuf));
hostbuf[sizeof(hostbuf) - 1] = '\0';
return hostbuf;
return (hostbuf);
}
np = getnetbyaddr(ipa.s_addr, AF_INET);
@ -42,19 +41,19 @@ char *hostname(family, ip)
*np->n_name != '\0') {
strncpy(hostbuf, np->n_name, sizeof(hostbuf));
hostbuf[sizeof(hostbuf) - 1] = '\0';
return hostbuf;
return (hostbuf);
}
}
}
if (family == AF_INET) {
return inet_ntoa(ipa);
return (inet_ntoa(ipa));
}
#ifdef USE_INET6
(void) inet_ntop(AF_INET6, ip, hostbuf, sizeof(hostbuf) - 1);
hostbuf[MAXHOSTNAMELEN] = '\0';
return hostbuf;
return (hostbuf);
#else
return "IPv6";
return ("IPv6");
#endif
}

View File

@ -10,8 +10,8 @@
#include "ipf.h"
char *portname(pr, port)
int pr, port;
char *
portname(int pr, int port)
{
static char buf[32];
struct protoent *p = NULL;
@ -28,16 +28,16 @@ char *portname(pr, port)
NULL : sv1;
}
if (sv)
return buf;
return (buf);
} else if ((pr != -2) && (p = getprotobynumber(pr))) {
if ((sv = getservbyport(htons(port), p->p_name))) {
strncpy(buf, sv->s_name, sizeof(buf)-1);
buf[sizeof(buf)-1] = '\0';
return buf;
return (buf);
}
}
}
(void) sprintf(buf, "%d", port);
return buf;
return (buf);
}

View File

@ -11,10 +11,7 @@
ipstate_t *
printstate(sp, opts, now)
ipstate_t *sp;
int opts;
u_long now;
printstate(ipstate_t *sp, int opts, u_long now)
{
struct protoent *pr;
synclist_t ipsync;
@ -210,7 +207,7 @@ printstate(sp, opts, now)
if (kmemcpy((char *)&ipsync, (u_long)sp->is_sync,
sizeof(ipsync))) {
PRINTF("status could not be retrieved\n");
return NULL;
return (NULL);
}
PRINTF("idx %d num %d v %d pr %d rev %d\n",
@ -220,5 +217,5 @@ printstate(sp, opts, now)
PRINTF("not synchronized\n");
}
return sp->is_next;
return (sp->is_next);
}

View File

@ -75,7 +75,7 @@ usage(prog)
char *prog;
{
fprintf(stderr, "Usage:\t%s\n", prog);
fprintf(stderr, "\t-a [-dnv] [-m <name>] [-o <role>] [-t type] [-T ttl] -i <ipaddr>[/netmask]\n");
fprintf(stderr, "\t-a [-dnv] -m <name> [-o <role>] [-t type] [-T ttl] -i <ipaddr>[/netmask]\n");
fprintf(stderr, "\t-A [-dnv] [-m <name>] [-o <role>] [-S <seed>] [-t <type>]\n");
fprintf(stderr, "\t-f <file> [-dnuv]\n");
fprintf(stderr, "\t-F [-dv] [-o <role>] [-t <type>]\n");

View File

@ -1,8 +1,8 @@
diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
index 21e401ac..f977c5f5 100644
index 21e401ac..c26f9f4a 100644
--- a/doc/jemalloc.xml.in
+++ b/doc/jemalloc.xml.in
@@ -53,11 +53,21 @@
@@ -53,11 +53,22 @@
<para>This manual describes jemalloc @jemalloc_version@. More information
can be found at the <ulink
url="http://jemalloc.net/">jemalloc website</ulink>.</para>
@ -10,7 +10,8 @@ index 21e401ac..f977c5f5 100644
+ <para>The following configuration options are enabled in libc's built-in
+ jemalloc: <option>--enable-fill</option>,
+ <option>--enable-lazy-lock</option>, <option>--enable-stats</option>,
+ <option>--enable-utrace</option>, and <option>--enable-xmalloc</option>.
+ <option>--enable-utrace</option>, <option>--enable-xmalloc</option>, and
+ <option>--with-malloc-conf=abort_conf:false</option>.
+ Additionally, <option>--enable-debug</option> is enabled in development
+ versions of FreeBSD (controlled by the
+ <constant>MALLOC_PRODUCTION</constant> make variable).</para>
@ -25,7 +26,7 @@ index 21e401ac..f977c5f5 100644
<refsect2>
<title>Standard API</title>
<funcprototype>
@@ -3252,4 +3262,18 @@ malloc_conf = "narenas:1";]]></programlisting></para>
@@ -3252,4 +3263,18 @@ malloc_conf = "narenas:1";]]></programlisting></para>
<para>The <function>posix_memalign()</function> function conforms
to IEEE Std 1003.1-2001 (<quote>POSIX.1</quote>).</para>
</refsect1>

View File

@ -96,6 +96,7 @@ do_extract_helper() {
do_autogen() {
./autogen.sh --enable-xmalloc --enable-utrace \
--with-malloc-conf=abort_conf:false \
--with-xslroot=/usr/local/share/xsl/docbook --with-private-namespace=__ \
--with-lg-page-sizes=12,13,14,16
}

View File

@ -2,12 +2,12 @@
.\" Title: JEMALLOC
.\" Author: Jason Evans
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 06/14/2017
.\" Date: 06/29/2017
.\" Manual: User Manual
.\" Source: jemalloc 5.0.0-4-g84f6c2cae0fb1399377ef6aea9368444c4987cc6
.\" Language: English
.\"
.TH "JEMALLOC" "3" "06/14/2017" "jemalloc 5.0.0-4-g84f6c2cae0fb" "User Manual"
.TH "JEMALLOC" "3" "06/29/2017" "jemalloc 5.0.0-4-g84f6c2cae0fb" "User Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -38,8 +38,9 @@ The following configuration options are enabled in libc\*(Aqs built\-in jemalloc
\fB\-\-enable\-fill\fR,
\fB\-\-enable\-lazy\-lock\fR,
\fB\-\-enable\-stats\fR,
\fB\-\-enable\-utrace\fR, and
\fB\-\-enable\-xmalloc\fR\&. Additionally,
\fB\-\-enable\-utrace\fR,
\fB\-\-enable\-xmalloc\fR, and
\fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally,
\fB\-\-enable\-debug\fR
is enabled in development versions of FreeBSD (controlled by the
\fBMALLOC_PRODUCTION\fR

View File

@ -329,7 +329,7 @@
/* #undef JEMALLOC_EXPORT */
/* config.malloc_conf options string. */
#define JEMALLOC_CONFIG_MALLOC_CONF ""
#define JEMALLOC_CONFIG_MALLOC_CONF "abort_conf:false"
/* If defined, jemalloc takes the malloc/free/etc. symbol names. */
#define JEMALLOC_IS_MALLOC 1

View File

@ -658,6 +658,8 @@ mmap_eof_not_eol_body()
atf_expect_fail "gnu grep from ports has no --mmap option"
fi
atf_expect_fail "relies on jemalloc feature no longer available; needs to be rewritten - bug 220309"
printf "ABC" > test1
jot -b " " -s "" 4096 >> test2

19
contrib/pjdfstest/.gitignore vendored Normal file
View File

@ -0,0 +1,19 @@
autom4te.cache
aclocal.m4
compile
configure
config.h*
config.guess
config.log
config.status
config.sub
depcomp
install-sh
missing
pjdfstest
stamp-h1
INSTALL
Makefile
Makefile.in
.deps
*.o

View File

@ -0,0 +1,19 @@
language: c
sudo: required
matrix:
include:
- os: linux
compiler: clang
dist: xenial
- os: linux
compiler: gcc
dist: xenial
- os: osx
compiler: clang
- os: osx
compiler: gcc
script:
- ./travis/build.sh
- ./travis/test.sh

View File

@ -0,0 +1,3 @@
* Alan Somers <asomers@FreeBSD.org> - contributor/co-maintainer
* Ngie Cooper <ngie@FreeBSD.org> - contributor/co-maintainer
* Pawel Jakub Dawidek <pawel@dawidek.net> - pjdfstest author/maintainer

27
contrib/pjdfstest/COPYING Normal file
View File

@ -0,0 +1,27 @@
$FreeBSD: head/tools/regression/pjdfstest/LICENSE 211354 2010-08-15 21:29:03Z pjd $
License for all regression tests available with pjdfstest:
Copyright (c) 2006-2012 Pawel Jakub Dawidek <pawel@dawidek.net>
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 AUTHORS 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 AUTHORS 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.

View File

View File

@ -1,26 +0,0 @@
# $FreeBSD$
PROG= pjdfstest
${PROG}: ${PROG}.c
@OSTYPE=`uname`; \
CFLAGS=-D__OS_$${OSTYPE}__; \
if [ $$OSTYPE = "FreeBSD" ]; then \
CFLAGS="$$CFLAGS -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_FCHFLAGS -DHAS_CHFLAGSAT -DHAS_LCHFLAGS -DHAS_FREEBSD_ACL -DHAS_BINDAT -DHAS_CONNECTAT -DHAS_LPATHCONF"; \
elif [ $$OSTYPE = "SunOS" ]; then \
CFLAGS="$$CFLAGS -DHAS_TRUNCATE64 -DHAS_STAT64"; \
CFLAGS="$$CFLAGS -lsocket"; \
elif [ $$OSTYPE = "Darwin" ]; then \
CFLAGS="$$CFLAGS -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS"; \
elif [ $$OSTYPE == "Linux" ]; then \
CFLAGS="$$CFLAGS -D_GNU_SOURCE"; \
else \
echo "Unsupported operating system: ${OSTYPE}."; \
exit 1; \
fi; \
cmd="gcc -Wall $$CFLAGS ${PROG}.c -o ${PROG}"; \
echo $$cmd; \
$$cmd
clean:
rm -f ${PROG}

View File

@ -0,0 +1,5 @@
AM_CFLAGS= -Wall -Werror
bin_PROGRAMS= pjdfstest
pjdfstest_SOURCES= pjdfstest.c

0
contrib/pjdfstest/NEWS Normal file
View File

View File

@ -1,22 +1,57 @@
$FreeBSD: head/tools/regression/pjdfstest/README 211354 2010-08-15 21:29:03Z pjd $
Few notes on how to use pjdfstest in short steps:
============
Introduction
============
# cd pjdfstest
# vi tests/conf
Change 'fs' to file system type you want to test (UFS or ZFS).
# vi Makefile
You need to manually tweak few things by editing CFLAGS lines
at the top of the file.
# make
It will compile pjdfstest utility which is used by regression tests.
# cd /path/to/file/system/you/want/to/test/
# prove -r /path/to/pjdfstest/tests
pjdfstest is a test suite that helps exercise POSIX system calls.
That's all. Enjoy.
pjdfstest supports the following operating systems/filesystems:
Currently supported operating systems: FreeBSD, Solaris.
Currently supported file system types: UFS, ZFS.
- Supported Operating Systems: FreeBSD, Linux, Solaris
- Supported Filesystems: ext4, UFS, ZFS
--
Pawel Jakub Dawidek <pawel@dawidek.net>
==================
Building pjdfstest
==================
-------------
Prerequisites
-------------
- autoconf 2.69 or newer
- automake 1.15 or newer
- cc (clang or gcc)
- make
- appropriate system headers (please install your distribution appropriate
header package)
---------
Procedure
---------
$ autoreconf -ifs
$ ./configure
$ make pjdfstest
=================
Running pjdfstest
=================
-------------
Prerequisites
-------------
- You must be root when running these testcases.
----------------------
Software Prerequisites
----------------------
- perl
- TAP-Harness (perl package)
---------
Procedure
---------
# cd /path/to/filesystem/under/test
# prove -rv /path/to/pjdfstest/tests

View File

@ -0,0 +1,107 @@
AC_PREREQ(2.61)
AC_INIT([pjdfstest],[0.1],)
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([ \
Makefile \
])
AC_CANONICAL_HOST
AC_PROG_CC([cc])
# For _GNU_SOURCE on Linux, etc.
AC_USE_SYSTEM_EXTENSIONS
AC_CHECK_HEADERS([ \
sys/mkdev.h \
])
#HAS_FREEBSD_ACL
AC_CHECK_FUNC([bindat],
[AC_DEFINE([HAVE_BINDAT], [1], [Define if bindat exists])])
AC_CHECK_FUNC([chflags],
[AC_DEFINE([HAVE_CHFLAGS], [1], [Define if chflags exists])])
AC_CHECK_FUNC([chflagsat],
[AC_DEFINE([HAVE_CHFLAGSAT], [1], [Define if chflagsat exists])])
AC_CHECK_FUNC([connectat],
[AC_DEFINE([HAVE_CONNECTAT], [1], [Define if connectat exists])])
AC_CHECK_FUNC([faccessat],
[AC_DEFINE([HAVE_FACCESSAT], [1], [Define if faccessat exists])])
AC_CHECK_FUNC([fchflags],
[AC_DEFINE([HAVE_FCHFLAGS], [1], [Define if fchflags exists])])
AC_CHECK_FUNC([fchmodat],
[AC_DEFINE([HAVE_FCHMODAT], [1], [Define if fchmodat exists])])
AC_CHECK_FUNC([fchownat],
[AC_DEFINE([HAVE_FCHOWNAT], [1], [Define if fchownat exists])])
AC_CHECK_FUNC([fstatat],
[AC_DEFINE([HAVE_FSTATAT], [1], [Define if fstatat exists])])
AC_CHECK_FUNC([lchflags],
[AC_DEFINE([HAVE_LCHFLAGS], [1], [Define if lchflags exists])])
AC_CHECK_FUNC([lchmod],
[AC_DEFINE([HAVE_LCHMOD], [1], [Define if lchmod exists])])
AC_CHECK_FUNC([linkat],
[AC_DEFINE([HAVE_LINKAT], [1], [Define if linkat exists])])
AC_CHECK_FUNC([lpathconf],
[AC_DEFINE([HAVE_LPATHCONF], [1], [Define if lpathconf exists])])
AC_CHECK_FUNC([mkdirat],
[AC_DEFINE([HAVE_MKDIRAT], [1], [Define if mkdirat exists])])
AC_CHECK_FUNC([mkfifoat],
[AC_DEFINE([HAVE_MKFIFOAT], [1], [Define if mkfifoat exists])])
AC_CHECK_FUNC([mknodat],
[AC_DEFINE([HAVE_MKNODAT], [1], [Define if mknodat exists])])
AC_CHECK_FUNC([openat],
[AC_DEFINE([HAVE_OPENAT], [1], [Define if openat exists])])
AC_CHECK_FUNC([posix_fallocate],
[AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define if posix_fallocate exists])])
AC_CHECK_FUNC([readlinkat],
[AC_DEFINE([HAVE_READLINKAT], [1], [Define if readlinkat exists])])
AC_CHECK_FUNC([renameat],
[AC_DEFINE([HAVE_RENAMEAT], [1], [Define if renameat exists])])
AC_CHECK_FUNC([symlinkat],
[AC_DEFINE([HAVE_SYMLINKAT], [1], [Define if symlinkat exists])])
AC_CHECK_FUNC([utimensat],
[AC_DEFINE([HAVE_UTIMENSAT], [1], [Define if utimensat exists])])
# ACL test battery.
AC_CHECK_HEADER([sys/acl.h], [has_sys_acl_h=yes], [has_sys_acl_h=no])
has_acl_funcs=no
if test x$has_sys_acl_h = xyes; then
AC_DEFINE([HAVE_SYS_ACL_H], [1],
[Define to 1 if sys/acl.h is available])
AC_CHECK_FUNCS([acl_create_entry_np acl_from_text acl_get_entry acl_get_file acl_set_file],
[has_acl_funcs=yes],[])
fi
if test x$has_acl_funcs = xyes; then
# Check for NFSv4 ACL support.
AC_CHECK_DECL([ACL_TYPE_NFS4],
[has_nfsv4_acl_support=yes], [has_nfsv4_acl_support=no],[[#include <sys/acl.h>]])
if test x$has_nfsv4_acl_support = xyes; then
AC_DEFINE([HAS_NFSV4_ACL_SUPPORT], [1],
[Define to 1 if NFSv4 ACL support is available])
fi
fi
AC_CHECK_MEMBERS([struct stat.st_atim, struct stat.st_atimespec], [], [], [[
#include <sys/types.h>
#include <sys/stat.h>
]])
AC_CHECK_MEMBERS([struct stat.st_birthtim, struct stat.st_birthtime, struct stat.st_birthtimespec], [], [], [[
#include <sys/types.h>
#include <sys/stat.h>
]])
AC_CHECK_MEMBERS([struct stat.st_ctim, struct stat.st_ctimespec], [], [], [[
#include <sys/types.h>
#include <sys/stat.h>
]])
AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimespec], [], [], [[
#include <sys/types.h>
#include <sys/stat.h>
]])
AC_OUTPUT

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/00.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags changes flags"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/01.t 211474 2010-08-18 22:06:43Z pjd $
desc="chflags returns ENOTDIR if a component of the path prefix is not a directory"
@ -7,6 +8,8 @@ dir=`dirname $0`
. ${dir}/../misc.sh
require chflags
if requires_root
then
echo "1..17"
@ -20,3 +23,7 @@ for type in regular fifo block char socket; do
expect 0 unlink ${n0}/${n1}
done
expect 0 rmdir ${n0}
else
echo "1..1"
fi

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/02.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns ENAMETOOLONG if a component of a pathname exceeded {NAME_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/03.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/04.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns ENOENT if the named file does not exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/05.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EACCES when search permission is denied for a component of the path prefix"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/06.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns ELOOP if too many symbolic links were encountered in translating the pathname"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/07.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EPERM when the effective user ID does not match the owner of the file and the effective user ID is not the super-user"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/08.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EPERM when one of SF_IMMUTABLE, SF_APPEND, or SF_NOUNLINK is set and the user is not the super-user"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/09.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EPERM when one of SF_IMMUTABLE, SF_APPEND, or SF_NOUNLINK is set and securelevel is greater than 0"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/10.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EPERM if non-super-user tries to set one of SF_IMMUTABLE, SF_APPEND, or SF_NOUNLINK"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/11.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EPERM if a user tries to set or remove the SF_SNAPSHOT flag"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/12.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EROFS if the named file resides on a read-only file system"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chflags/13.t 211352 2010-08-15 21:24:17Z pjd $
desc="chflags returns EFAULT if the path argument points outside the process's allocated address space"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/00.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod changes permission"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/01.t 211474 2010-08-18 22:06:43Z pjd $
desc="chmod returns ENOTDIR if a component of the path prefix is not a directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/02.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns ENAMETOOLONG if a component of a pathname exceeded {NAME_MAX} characters"
@ -6,7 +7,11 @@ desc="chmod returns ENAMETOOLONG if a component of a pathname exceeded {NAME_MAX
dir=`dirname $0`
. ${dir}/../misc.sh
echo "1..10"
if supported lchmod; then
echo "1..10"
else
echo "1..5"
fi
nx=`namegen_max`
nxx="${nx}x"
@ -17,8 +22,10 @@ expect 0620 stat ${nx} mode
expect 0 unlink ${nx}
expect ENAMETOOLONG chmod ${nxx} 0620
expect 0 create ${nx} 0644
expect 0 lchmod ${nx} 0620
expect 0620 stat ${nx} mode
expect 0 unlink ${nx}
expect ENAMETOOLONG lchmod ${nxx} 0620
if supported lchmod; then
expect 0 create ${nx} 0644
expect 0 lchmod ${nx} 0620
expect 0620 stat ${nx} mode
expect 0 unlink ${nx}
expect ENAMETOOLONG lchmod ${nxx} 0620
fi

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/03.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"
@ -6,7 +7,11 @@ desc="chmod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} char
dir=`dirname $0`
. ${dir}/../misc.sh
echo "1..10"
if supported lchmod; then
echo "1..10"
else
echo "1..5"
fi
nx=`dirgen_max`
nxx="${nx}x"
@ -19,10 +24,12 @@ expect 0642 stat ${nx} mode
expect 0 unlink ${nx}
expect ENAMETOOLONG chmod ${nxx} 0642
expect 0 create ${nx} 0644
expect 0 lchmod ${nx} 0642
expect 0642 stat ${nx} mode
expect 0 unlink ${nx}
expect ENAMETOOLONG lchmod ${nxx} 0642
if supported lchmod; then
expect 0 create ${nx} 0644
expect 0 lchmod ${nx} 0642
expect 0642 stat ${nx} mode
expect 0 unlink ${nx}
expect ENAMETOOLONG lchmod ${nxx} 0642
fi
rm -rf "${nx%%/*}"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/04.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns ENOENT if the named file does not exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/05.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns EACCES when search permission is denied for a component of the path prefix"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/06.t 211474 2010-08-18 22:06:43Z pjd $
desc="chmod returns ELOOP if too many symbolic links were encountered in translating the pathname"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/07.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns EPERM if the operation would change the ownership, but the effective user ID is not the super-user"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/08.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns EPERM if the named file has its immutable or append-only flag set"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/09.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns EROFS if the named file resides on a read-only file system"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/10.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns EFAULT if the path argument points outside the process's allocated address space"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/11.t 211352 2010-08-15 21:24:17Z pjd $
desc="chmod returns EFTYPE if the effective user ID is not the super-user, the mode includes the sticky bit (S_ISVTX), and path does not refer to a directory"
@ -63,6 +64,12 @@ for type in regular fifo block char socket symlink; do
create_file ${type} ${n1} 0640 65534 65534
expect 0 symlink ${n1} ${n2}
case "${os}" in
Darwin)
expect 0 -u 65534 -g 65534 chmod ${n1} 01644
expect 01644 stat ${n1} mode
expect 0 -u 65534 -g 65534 chmod ${n2} 01640
expect 01640 stat ${n1} mode
;;
FreeBSD)
expect EFTYPE -u 65534 -g 65534 chmod ${n1} 01644
expect 0640 stat ${n1} mode
@ -93,6 +100,10 @@ for type in regular fifo block char socket symlink; do
if supported lchmod; then
create_file ${type} ${n1} 0640 65534 65534
case "${os}" in
Darwin)
expect 0 -u 65534 -g 65534 lchmod ${n1} 01644
expect 01644 lstat ${n1} mode
;;
FreeBSD)
expect EFTYPE -u 65534 -g 65534 lchmod ${n1} 01644
expect 0640 lstat ${n1} mode

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/12.t 219463 2011-03-10 20:59:02Z pjd $
desc="verify SUID/SGID bit behaviour"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/00.t 228975 2011-12-30 00:04:11Z uqs $
desc="chown changes ownership"
@ -213,6 +214,20 @@ done
# when non-super-user calls chown(2) successfully, set-uid and set-gid bits may
# be removed, except when both uid and gid are equal to -1.
for type in regular dir fifo block char socket symlink; do
#
# Linux makes a destinction for behavior when an executable file vs a
# non-executable file. From chmod(2):
#
# When the owner or group of an executable file are changed by an
# unprivileged user the S_ISUID and S_ISGID mode bits are cleared.
#
# I believe in this particular case, the behavior's bugged.
#
if [ "${type}" = "dir" -a "${os}" = "Linux" ]; then
_todo_msg="Linux doesn't clear the SGID/SUID bits for directories, despite the description noted"
else
_todo_msg=
fi
if [ "${type}" != "symlink" ]; then
create_file ${type} ${n0}
@ -220,10 +235,12 @@ for type in regular dir fifo block char socket symlink; do
expect 0 chmod ${n0} 06555
expect 06555,65534,65533 stat ${n0} mode,uid,gid
expect 0 -u 65534 -g 65533,65532 chown ${n0} 65534 65532
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65532 stat ${n0} mode,uid,gid
expect 0 chmod ${n0} 06555
expect 06555,65534,65532 stat ${n0} mode,uid,gid
expect 0 -u 65534 -g 65533,65532 -- chown ${n0} -1 65533
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65533 stat ${n0} mode,uid,gid
expect 0 chmod ${n0} 06555
expect 06555,65534,65533 stat ${n0} mode,uid,gid
@ -236,13 +253,17 @@ for type in regular dir fifo block char socket symlink; do
expect 06555,65534,65533 stat ${n0} mode,uid,gid
expect 06555,65534,65533 stat ${n1} mode,uid,gid
expect 0 -u 65534 -g 65533,65532 chown ${n1} 65534 65532
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65532 stat ${n0} mode,uid,gid
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65532 stat ${n1} mode,uid,gid
expect 0 chmod ${n1} 06555
expect 06555,65534,65532 stat ${n0} mode,uid,gid
expect 06555,65534,65532 stat ${n1} mode,uid,gid
expect 0 -u 65534 -g 65533,65532 -- chown ${n1} -1 65533
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65533 stat ${n0} mode,uid,gid
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65533 stat ${n1} mode,uid,gid
expect 0 chmod ${n1} 06555
expect 06555,65534,65533 stat ${n0} mode,uid,gid
@ -270,6 +291,7 @@ for type in regular dir fifo block char socket symlink; do
fi
expect 06555,65534,65533 lstat ${n0} mode,uid,gid
expect 0 -u 65534 -g 65533,65532 lchown ${n0} 65534 65532
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65532 lstat ${n0} mode,uid,gid
if supported lchmod; then
expect 0 lchmod ${n0} 06555
@ -278,6 +300,7 @@ for type in regular dir fifo block char socket symlink; do
fi
expect 06555,65534,65532 lstat ${n0} mode,uid,gid
expect 0 -u 65534 -g 65533,65532 -- lchown ${n0} -1 65533
[ -n "${_todo_msg}" ] && todo "Linux" "${_todo_msg}"
expect 0555,65534,65533 lstat ${n0} mode,uid,gid
if supported lchmod; then
expect 0 lchmod ${n0} 06555

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/01.t 211474 2010-08-18 22:06:43Z pjd $
desc="chown returns ENOTDIR if a component of the path prefix is not a directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/02.t 211352 2010-08-15 21:24:17Z pjd $
desc="chown returns ENAMETOOLONG if a component of a pathname exceeded ${NAME_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/03.t 211352 2010-08-15 21:24:17Z pjd $
desc="chown returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/04.t 211410 2010-08-17 06:08:09Z pjd $
desc="chown returns ENOENT if the named file does not exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/05.t 211410 2010-08-17 06:08:09Z pjd $
desc="chown returns EACCES when search permission is denied for a component of the path prefix"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/06.t 211410 2010-08-17 06:08:09Z pjd $
desc="chown returns ELOOP if too many symbolic links were encountered in translating the pathname"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/07.t 211410 2010-08-17 06:08:09Z pjd $
desc="chown returns EPERM if the operation would change the ownership, but the effective user ID is not the super-user and the process is not an owner of the file"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/08.t 211352 2010-08-15 21:24:17Z pjd $
desc="chown returns EPERM if the named file has its immutable or append-only flag set"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/09.t 211352 2010-08-15 21:24:17Z pjd $
desc="chown returns EROFS if the named file resides on a read-only file system"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/10.t 211410 2010-08-17 06:08:09Z pjd $
desc="chown returns EFAULT if the path argument points outside the process's allocated address space"

View File

@ -1,15 +1,40 @@
# $FreeBSD: head/tools/regression/pjdfstest/tests/conf 211354 2010-08-15 21:29:03Z pjd $
# vim: filetype=sh noexpandtab ts=8 sw=8
# pjdfstest configuration file
# Supported operating systems: FreeBSD, Darwin, SunOS, Linux
os=`uname`
unsupported_os()
{
echo "Unsupported operating system ${os}." >/dev/stderr
exit 1
}
get_mountpoint()
{
case "${os}" in
Darwin|FreeBSD)
df . | tail -1 | awk '{print $NF}'
;;
*)
unsupported_os
;;
esac
}
case "${os}" in
FreeBSD|Darwin)
Darwin)
GREP=grep
#fs=`df -T . | tail -1 | awk '{print $2}'`
pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
fs=`mount | ${GREP} -E "^${pattern}" | awk -F '[(,]' '{print toupper($2)}'`
mountpoint="`get_mountpoint`"
fs=`mount | grep "on $mountpoint" | sed -e 's/.*(//' -e 's/,.*//g' | tr '[:lower:]' '[:upper:]'`
;;
FreeBSD)
GREP=grep
#fs=`df -T . | tail -1 | awk '{print $2}'`
mountpoint="`get_mountpoint`"
fs=`mount -p | awk '$2 == "'$mountpoint'" { print toupper($3) }'`
;;
Solaris|SunOS)
GREP=ggrep
@ -22,8 +47,7 @@ Linux)
fs=`df -PT . | tail -1 | awk '{print toupper($2)}'`
;;
*)
echo "Unsupported operating system ${os}." >/dev/stderr
exit 1
unsupported_os
;;
esac

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/ftruncate/00.t 219439 2011-03-09 23:11:30Z pjd $
desc="ftruncate descrease/increase file size"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/01.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns ENOTDIR if a component of the path prefix is not a directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/02.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns ENAMETOOLONG if a component of a pathname exceeded {NAME_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/03.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/04.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns ENOENT if the named file does not exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/05.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EACCES when search permission is denied for a component of the path prefix"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/06.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EACCES if the named file is not writable by the user"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/07.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns ELOOP if too many symbolic links were encountered in translating the pathname"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/08.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EPERM if the named file has its immutable or append-only flag set"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/09.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EISDIR if the named file is a directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/10.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EROFS if the named file resides on a read-only file system"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/11.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns ETXTBSY the file is a pure procedure (shared text) file that is being executed"
@ -7,6 +8,7 @@ dir=`dirname $0`
. ${dir}/../misc.sh
[ "${os}" = "FreeBSD" ] || quick_exit
noexec && quick_exit
requires_exec

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/12.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EFBIG or EINVAL if the length argument was greater than the maximum file size"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/13.t 211352 2010-08-15 21:24:17Z pjd $
desc="ftruncate returns EINVAL if the length argument was less than 0"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/14.t 211352 2010-08-15 21:24:17Z pjd $
desc="truncate returns EFAULT if the path argument points outside the process's allocated address space"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/00.t 211352 2010-08-15 21:24:17Z pjd $
desc="NFSv4 granular permissions checking - WRITE_DATA vs APPEND_DATA on directories"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/01.t 211352 2010-08-15 21:24:17Z pjd $
desc="NFSv4 granular permissions checking - ACL_READ_ATTRIBUTES and ACL_WRITE_ATTRIBUTES"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/02.t 211352 2010-08-15 21:24:17Z pjd $
desc="NFSv4 granular permissions checking - ACL_READ_ACL and ACL_WRITE_ACL"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/03.t 211352 2010-08-15 21:24:17Z pjd $
desc="NFSv4 granular permissions checking - DELETE and DELETE_CHILD"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/04.t 211352 2010-08-15 21:24:17Z pjd $
desc="NFSv4 granular permissions checking - ACL_WRITE_OWNER"
@ -6,12 +7,11 @@ desc="NFSv4 granular permissions checking - ACL_WRITE_OWNER"
dir=`dirname $0`
. ${dir}/../misc.sh
[ "${os}:${fs}" = "FreeBSD:ZFS" ] || quick_exit
nfsv4acls || quick_exit
echo "1..52"
echo "1..22"
n0=`namegen`
n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n2} 0755
@ -42,39 +42,5 @@ expect 0 -u 65534 -g 65532,65531 chown ${n0} 65534 65531
expect 65534,65531 lstat ${n0} uid,gid
expect 0 unlink ${n0}
# When non-owner calls chown(2) successfully, set-uid and set-gid bits are
# removed, except when both uid and gid are equal to -1.
expect 0 create ${n0} 0644
expect 0 prependacl ${n0} user:65534:write_owner::allow
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} 65534 65532
expect 0555,65534,65532 lstat ${n0} mode,uid,gid
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} -1 65533
expect 0555,65534,65533 lstat ${n0} mode,uid,gid
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} -1 -1
expect 06555,65534,65533 lstat ${n0} mode,uid,gid
expect 0 unlink ${n0}
expect 0 mkdir ${n0} 0755
expect 0 prependacl ${n0} user:65534:write_owner::allow
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} 65534 65532
expect 0555,65534,65532 lstat ${n0} mode,uid,gid
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} -1 65533
expect 0555,65534,65533 lstat ${n0} mode,uid,gid
expect 0 chmod ${n0} 06555
expect 06555 lstat ${n0} mode
expect 0 -u 65534 -g 65533,65532 chown ${n0} -1 -1
expect 06555,65534,65533 lstat ${n0} mode,uid,gid
expect 0 rmdir ${n0}
cd ${cdir}
expect 0 rmdir ${n2}

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/granular/05.t 211352 2010-08-15 21:24:17Z pjd $
desc="NFSv4 granular permissions checking - DELETE and DELETE_CHILD with directories"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/00.t 211352 2010-08-15 21:24:17Z pjd $
desc="link creates hardlinks"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/01.t 211474 2010-08-18 22:06:43Z pjd $
desc="link returns ENOTDIR if a component of either path prefix is not a directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/02.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns ENAMETOOLONG if a component of either pathname exceeded {NAME_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/03.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns ENAMETOOLONG if an entire length of either path name exceeded {PATH_MAX} characters"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/04.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns ENOENT if a component of either path prefix does not exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/05.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EMLINK if the link count of the file named by name1 would exceed 32767"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/06.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EACCES when a component of either path prefix denies search permission"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/07.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EACCES when the requested link requires writing in a directory with a mode that denies write permission"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/08.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns ELOOP if too many symbolic links were encountered in translating one of the pathnames"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/09.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns ENOENT if the source file does not exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/10.t 211474 2010-08-18 22:06:43Z pjd $
desc="link returns EEXIST if the destination file does exist"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/11.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EPERM if the source file is a directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/12.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EPERM if the source file has its immutable or append-only flag set"
@ -10,7 +11,7 @@ require chflags
case "${os}:${fs}" in
FreeBSD:ZFS)
echo "1..27"
echo "1..28"
;;
FreeBSD:UFS)
echo "1..48"
@ -31,12 +32,9 @@ expect 0 unlink ${n1}
expect 1 stat ${n0} nlink
expect 0 chflags ${n0} SF_IMMUTABLE
todo FreeBSD:ZFS "Creating a hard link to a file protected by SF_IMMUTABLE should return EPERM."
expect EPERM link ${n0} ${n1}
todo FreeBSD:ZFS "Creating a hard link to a file protected by SF_IMMUTABLE should return EPERM."
expect 1 stat ${n0} nlink
expect 0 chflags ${n0} none
todo FreeBSD:ZFS "Creating a hard link to a file protected by SF_IMMUTABLE should return EPERM."
expect 0 link ${n0} ${n1}
expect 2 stat ${n0} nlink
expect 0 unlink ${n1}
@ -49,24 +47,16 @@ expect 0 chflags ${n0} none
expect 0 unlink ${n1}
expect 1 stat ${n0} nlink
case "${os}:${fs}" in
FreeBSD:ZFS)
expect 0 chflags ${n0} SF_APPEND
expect 0 link ${n0} ${n1}
expect 2 stat ${n0} nlink
expect 0 chflags ${n0} none
expect 0 unlink ${n1}
expect 1 stat ${n0} nlink
;;
FreeBSD:UFS)
expect 0 chflags ${n0} SF_APPEND
expect EPERM link ${n0} ${n1}
expect 0 chflags ${n0} none
expect 0 link ${n0} ${n1}
expect 2 stat ${n0} nlink
expect 0 unlink ${n1}
expect 1 stat ${n0} nlink
expect 0 chflags ${n0} SF_APPEND
expect EPERM link ${n0} ${n1}
expect 0 chflags ${n0} none
expect 0 link ${n0} ${n1}
expect 2 stat ${n0} nlink
expect 0 unlink ${n1}
expect 1 stat ${n0} nlink
case "${os}:${fs}" in
FreeBSD:UFS)
expect 0 chflags ${n0} UF_IMMUTABLE
expect EPERM link ${n0} ${n1}
expect 0 chflags ${n0} none

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/13.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EPERM if the parent directory of the destination file has its immutable flag set"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/14.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EXDEV if the source and the destination files are on different file systems"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/15.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns ENOSPC if the directory in which the entry for the new link is being placed cannot be extended because there is no space left on the file system containing the directory"

View File

@ -1,4 +1,5 @@
#!/bin/sh
# vim: filetype=sh noexpandtab ts=8 sw=8
# $FreeBSD: head/tools/regression/pjdfstest/tests/link/16.t 211352 2010-08-15 21:24:17Z pjd $
desc="link returns EROFS if the requested link requires writing in a directory on a read-only file system"

Some files were not shown because too many files have changed in this diff Show More