History log of /freebsd-9.3-release/tools/regression/pjdfstest/pjdfstest.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-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 22-Sep-2011 kensmith

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

Approved by: re (implicit)


# 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)


# 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);


# 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.


# 211116 09-Aug-2010 pjd

Linux has no strlcpy().


# 211110 09-Aug-2010 pjd

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


# 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.


# 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.


# 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>


# 185219 23-Nov-2008 pjd

Add support for pathconf(2).


# 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)


# 166065 16-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