forked from freebsd/freebsd-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The summary of changes is as follows.. Generic changes:: - Added configure support [2]. - Check for lchmod filesystem support with create_file(..); for testcases that require lchmod, skip the testcase -- otherwise use chmod directly [1]. - Added Travis CI integration [2]. - Added utimensat testcases [1]. Linux support:: - Fixed Linux support to pass on later supported versions of Fedora/Ubuntu [2]. - Conditionally enable posix_fallocate(2) support [2]. OSX support:: - Fixed compilation on OSX [2]. - Added partial OSX support (the test run isn't fully green yet) [2]. MFC after: 2 months Obtained from: https://github.com/pjd/pjdfstest/tree/0.1 Relnotes: yes Submitted by: asomers [1], ngie [2] Tested with: UFS, ZFS
- Loading branch information
Showing
250 changed files
with
1,759 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* Alan Somers <[email protected]> - contributor/co-maintainer | ||
* Ngie Cooper <[email protected]> - contributor/co-maintainer | ||
* Pawel Jakub Dawidek <[email protected]> - pjdfstest author/maintainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
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. |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AM_CFLAGS= -Wall -Werror | ||
|
||
bin_PROGRAMS= pjdfstest | ||
|
||
pjdfstest_SOURCES= pjdfstest.c |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
|
||
# 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 | ||
|
||
That's all. Enjoy. | ||
|
||
Currently supported operating systems: FreeBSD, Solaris. | ||
Currently supported file system types: UFS, ZFS. | ||
|
||
-- | ||
Pawel Jakub Dawidek <[email protected]> | ||
============ | ||
Introduction | ||
============ | ||
|
||
pjdfstest is a test suite that helps exercise POSIX system calls. | ||
|
||
pjdfstest supports the following operating systems/filesystems: | ||
|
||
- Supported Operating Systems: FreeBSD, Linux, Solaris | ||
- Supported Filesystems: ext4, UFS, ZFS | ||
|
||
================== | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.