Commit Graph

24 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
2cf3d848b6 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>
2009-10-20 21:08:32 +00:00
Edward Tomasz Napierala
6839605389 Add regression tests for NFSv4 ACL granular permission enforcement. 2009-09-07 19:40:22 +00:00
Pawel Jakub Dawidek
bf64a6b6b4 lchflags(2) takes int, not u_long like chflags(2) and fchflags(2).
Strange, isn't it?

Pointed out by:	bde
2009-06-03 09:24:58 +00:00
Pawel Jakub Dawidek
af30ab766e 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>
2009-02-23 07:33:29 +00:00
Pawel Jakub Dawidek
092513dad4 Be more Solaris-friendly.
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
2009-01-16 18:09:49 +00:00
Pawel Jakub Dawidek
bbc9c92b45 This actually works on Linux, I just had wrong directory permission.
Found by:	trasz
2008-11-24 16:33:23 +00:00
Pawel Jakub Dawidek
6362fd6090 Include TODO messages even if tests succeeds, so we can detect when something
suddenly started to work.
2008-11-24 16:32:39 +00:00
Pawel Jakub Dawidek
e6b0bd3a3c Mark all the places where Linux is not POSIX-compilant. Tested on ext3. 2008-11-23 20:17:17 +00:00
Pawel Jakub Dawidek
e5419ebc25 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>
2008-11-23 20:07:00 +00:00
Pawel Jakub Dawidek
d385c6dd7e fstest for Linux:
Automatically detect file system type.
2008-11-23 20:02:14 +00:00
Pawel Jakub Dawidek
48a8b4cd56 FreeBSD's way of handling rmdir("..") is not POSIX-compilant. 2008-11-23 19:58:26 +00:00
Pawel Jakub Dawidek
92c1c812f1 Shorter version. 2008-11-23 19:57:16 +00:00
Pawel Jakub Dawidek
564ecacd18 Add support for pathconf(2). 2008-11-23 19:56:40 +00:00
Pawel Jakub Dawidek
12459746f8 Detect operating system automatically. 2008-11-23 19:56:09 +00:00
Pawel Jakub Dawidek
707d3a52eb fstest for Linux:
- Use /dev/urandom, it is more portable.
- Implement todo() function which allows to mark known failures.
2008-11-23 19:50:20 +00:00
Pawel Jakub Dawidek
36aca13fdf IFp4: Regression tests for FreeBSD/ZFS chflags(2)/lchflags(2). 2008-11-22 13:27:15 +00:00
Edward Tomasz Napierala
24878441f6 Make test for write access to the directory being moved a little more
specific.

Approved by:	rwatson (mentor)
2008-11-07 14:46:46 +00:00
Edward Tomasz Napierala
74019bf2bc Improve output when a test fails.
Approved by:	rwatson (mentor)
2008-11-07 14:45:42 +00:00
Edward Tomasz Napierala
b92eda309d 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
2008-11-06 19:17:58 +00:00
Pawel Jakub Dawidek
2125ff0886 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)
2007-07-18 18:07:15 +00:00
Pawel Jakub Dawidek
65e2b8ca1f Simple README file which shows how to use fstest. 2007-01-28 00:10:28 +00:00
Pawel Jakub Dawidek
b20669bdef 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.
2007-01-25 20:50:02 +00:00
Pawel Jakub Dawidek
33e0d352b2 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.
2007-01-25 20:48:14 +00:00
Pawel Jakub Dawidek
53feb1d422 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
2007-01-17 01:42:12 +00:00