History log of /freebsd-9.3-release/tools/regression/pjdfstest/
Revision Date Author Comments
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


219621 13-Mar-2011 pjd

POSIX accepts only ELOOP if O_NOFOLLOW is specified and target is a symlink.


219566 12-Mar-2011 pjd

Add some missing consts.


219464 10-Mar-2011 pjd

Add support for *at syscalls:
- openat(2)
- unlinkat(2)
- mkdirat(2)
- linkat(2)
- symlinkat(2)
- renameat(2)
- mkfifoat(2)
- mknodat(2)
- fchmodat(2)
- fchownat(2)
- fstatat(2)


219463 10-Mar-2011 pjd

Improve test a bit, now that we have fstat(2) support.
The test was support to check if SUID/SGID bits are removed on first
write, but actually we were checking if they were removed after close.
Now we can check if SUID/SGID bits are gone after first write.

While here add checks to see if when both SUID and SGID bits are set they are
both cleared on first write.


219439 09-Mar-2011 pjd

Few initial ftruncate(2) tests. One of them covers stand/154873.

PR: stand/154873


219438 09-Mar-2011 pjd

Pass descriptor number to write(2), now that it is possible.


219437 09-Mar-2011 pjd

Add support for the following syscalls:
- fchmod(2),
- fchown(2),
- fchflags(2),
- fstat(2),
- ftruncate(2),
- fpathconf(2),
- lpathconf(2).
Make write(2) syscall to take descriptor instead of file name.

We implement descriptors by keeping track of open files and allowing to
reference them by the following syscalls. Because pjdfstest already supports
executing multiple syscalls from one command it works pretty well.

For example, the following command:

pjdfstest open foo "O_CREAT,O_RDWR" 0 : open bar "O_CREAT,O_RDONLY" 640 : fchmod 0 0666 : fchown 0 -1 20 : fchmod 1 0444

is equivalent of (error checking omitted):

int fd[2];

fd[0] = open("foo", O_CREAT | O_RDWR, 0);
fd[1] = open("bar", O_CREAT | O_RDONLY, 0640);
fchmod(fd[0], 0666);
fchown(fd[0], -1, 20);
fchmod(fd[1], 0444);


211474 18-Aug-2010 pjd

More tests.


211410 17-Aug-2010 pjd

More tests, especially for lchown(2).


211354 15-Aug-2010 pjd

Finish renaming fstest to pjdfstest.


211352 15-Aug-2010 pjd

Give fstest a more unique name: pjdfstest.
It is released from time to time and used outside FreeBSD, so it is good to
have a name one can google.


211351 15-Aug-2010 pjd

Update copyright years.


211350 15-Aug-2010 pjd

More tests.


211336 15-Aug-2010 pjd

More tests (especially for lchmod(2)), less code duplication.


211290 13-Aug-2010 pjd

- Use loops to avoid code duplication.
- More tests.


211242 12-Aug-2010 pjd

More tests.


211235 12-Aug-2010 pjd

Portable Makefile.


211234 12-Aug-2010 pjd

Fix copy&pasted code - we want to create character device here.


211186 11-Aug-2010 pjd

- Use loops where possible to avoid code duplication.
- Don't pass uid and gid to create_file() if not needed.
- More tests.


211185 11-Aug-2010 pjd

Allow to specify uid, gid and mode for create_file().


211180 11-Aug-2010 pjd

More and more tests.


211179 11-Aug-2010 pjd

Move create_file() to misc.sh, as it is going to be used in more places.


211178 11-Aug-2010 pjd

Make use of recently added dirgen_max() and namegen_max() to implement
ENAMETOOLONG checks.


211177 11-Aug-2010 pjd

Instead of hardcoding {NAME_MAX} as 255 and {PATH_MAX} as 1024 obtain those from
pathconf(2) and properly generate too long file names.
This should fix ENAMETOOLONG checks on Linux.


211156 10-Aug-2010 pjd

More tests, mostly related to devices and sockets.


211116 09-Aug-2010 pjd

Linux has no strlcpy().


211110 09-Aug-2010 pjd

Fix bind(2) and connect(2) support on Solaris.


211109 09-Aug-2010 pjd

Fix file system type detection on Solaris.


211108 09-Aug-2010 pjd

Small tweaks.


211107 09-Aug-2010 pjd

No need to use grep to check if path start with /.

Suggested by: ed


210984 06-Aug-2010 pjd

Various cleanups, mostly to make the test work on FreeBSD/ZFS.


210973 06-Aug-2010 pjd

${GREP} can only be used after loading 'conf'.


210972 06-Aug-2010 pjd

Don't use egrep directly - use ${GREP}.


210971 06-Aug-2010 pjd

Check first todo() argument against operating system name and operating system
name plus file system name.


210970 06-Aug-2010 pjd

For FreeBSD and Linux use awk's toupper() function.

Suggested by: ed


210969 06-Aug-2010 pjd

Convert file system type to upper case.


210967 06-Aug-2010 pjd

Add tests for mknod(2).

Submitted by: Jan Senolt <senoltj@centrum.cz>
Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>
Polished by: pjd


210965 06-Aug-2010 pjd

Add mknod(2) support.

Submitted by: Jan Senolt <senoltj@centrum.cz>
Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>


210964 06-Aug-2010 pjd

Sort includes.


210956 06-Aug-2010 pjd

open(2) returns EOPNOTSUPP when trying to open a socket.


210955 06-Aug-2010 pjd

Test for EACCES also when opening FIFO or directory.


210954 06-Aug-2010 pjd

Test O_RDONLY|O_RDWR flags as potentially invalid.


210953 06-Aug-2010 pjd

Make description readable.


210952 06-Aug-2010 pjd

Add missing -U argument to usage.


210951 06-Aug-2010 pjd

Implement two new syscalls: bind(2) and connect(2) for operating on UNIX
domain sockets.


208798 04-Jun-2010 maxim

o Makefile BSDfication.

PR: misc/147461 (with my changes)
Submitted by: Erik Cederstrand


198305 20-Oct-2009 pjd

Fix a case where rename actually succeeds, which is also expected behaviour
according to POSIX. This fixes ZFS on Solaris testing.

Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>


196948 07-Sep-2009 trasz

Add regression tests for NFSv4 ACL granular permission enforcement.


193373 03-Jun-2009 pjd

lchflags(2) takes int, not u_long like chflags(2) and fchflags(2).
Strange, isn't it?

Pointed out by: bde


188934 23-Feb-2009 pjd

Add explicit casting in few places.

It is only really necessary for open(2)'s third argument, which is optional and
obtained through stdarg(3). open(2)'s third argument is 32bit and we pass 64
bits. On little endian it works, because we take lower 32 bits, but on big
endian platforms we take upper 32 bits, so we end up with 0.

Reported by: Milan Čermák <Milan.Cermak@Sun.COM>


187334 16-Jan-2009 pjd

Be more Solaris-friendly.

Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>


185252 24-Nov-2008 pjd

This actually works on Linux, I just had wrong directory permission.

Found by: trasz


185251 24-Nov-2008 pjd

Include TODO messages even if tests succeeds, so we can detect when something
suddenly started to work.


185229 23-Nov-2008 pjd

Mark all the places where Linux is not POSIX-compilant. Tested on ext3.


185227 23-Nov-2008 pjd

fstest for Linux:
- Use -- when needed so Linux getopt(3) won't get confused.
- Follow POSIX more closely.

Submitted by: Szabolcs Szakacsits <szaka@ntfs-3g.org>


185223 23-Nov-2008 pjd

fstest for Linux:
Automatically detect file system type.


185221 23-Nov-2008 pjd

FreeBSD's way of handling rmdir("..") is not POSIX-compilant.


185220 23-Nov-2008 pjd

Shorter version.


185219 23-Nov-2008 pjd

Add support for pathconf(2).


185218 23-Nov-2008 pjd

Detect operating system automatically.


185216 23-Nov-2008 pjd

fstest for Linux:
- Use /dev/urandom, it is more portable.
- Implement todo() function which allows to mark known failures.


185173 22-Nov-2008 pjd

IFp4: Regression tests for FreeBSD/ZFS chflags(2)/lchflags(2).


184749 07-Nov-2008 trasz

Make test for write access to the directory being moved a little more
specific.

Approved by: rwatson (mentor)


184748 07-Nov-2008 trasz

Improve output when a test fails.

Approved by: rwatson (mentor)


184737 06-Nov-2008 trasz

Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
from one parent directory to another, in addition to the usual access checks
one also needs write access to the subdirectory being moved.

Approved by: rwatson (mentor), pjd


171486 18-Jul-2007 pjd

Make fstest work out-of-the-box on Solaris:
- Solaris' setgroups(2) doesn't change process' effective gid, so set it
explicitly.
- POSIX doesn't define O_NOFOLLOW. FreeBSD returns EMLINK when target is
a symbolic link, but Solaris returns ELOOP then.
- Solaris doesn't define O_SHLOCK and O_EXLOCK flags.

Approved by: re (rwatson)


166289 28-Jan-2007 pjd

Simple README file which shows how to use fstest.


166232 25-Jan-2007 pjd

MFp4: - When new object is created, it's group ID can be set to process'
effective group ID or to group ID of its parent directory.
- Add some comments from POSIX.
- Verify that after successful O_TRUNC open, size is equal to 0.


166231 25-Jan-2007 pjd

MFp4: When user is not a member of the group which owns a file, even if
he is the file's owner, he can't set set-gid bit.
POSIX requires to return 0 and clear the bit, but FreeBSD returns
EPERM for UFS in such case. For now do the same in ZFS.


166065 17-Jan-2007 pjd

Add 3436 file system regression tests in 184 files.
Almost all regression tests are based on very flexible fstest tool.
They verify correctness (POSIX conformance) of almost all file
system-related system calls.

The motivation behind this work is my ZFS port and POSIX, who doesn't
provide free test suites.

Runs on: FreeBSD/UFS, FreeBSD/ZFS, Solaris/UFS, Solaris/ZFS

To try it out:

# cd fstest
# make
# find tests/* -type d | xargs prove