Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in changes needed to fix tests for -CURRENT #1

Merged
merged 33 commits into from
Sep 7, 2015
Merged

Conversation

ngie-eign
Copy link
Collaborator

This fixes some of the initial items needed in order to make the tests pass a bit more cleanly on CURRENT with UFS, in particular:

  • Increase the filesystem size in some of the tests so newfs doesn't fail.
  • Fail quickly if mdconfig/newfs fails to execute cleanly.
  • Check for EMLINK with open/16.t on FreeBSD, not EACCES.
  • Add support for detecting noexec so the test programs properly handle those scenarios as the code previously assumed that exec was always on on a filesystem. Preliminary nosuid support was added to misc.sh as well, but nosuid checks need to be backfilled in the scripts. These were needed when testing against OneFS.
  • Add support for detecting when pjdfstest is being run as root -- which is required when calling chflags/01.t, jail(8), and potentially other commands.
  • Iterate down directories for conf/pjdfstest so the installation doesn't require the tests be installed in the tests directory.
  • Fix the number of tests reported via ftruncate/00.t .
  • Allow the program to be compiled on FreeBSD 7.2; use __FreeBSD_version__ as a guide for what functionality should/shouldn't be enabled syscall wise.

Testing done:

UFS:

# uname -a
FreeBSD fbsd-vm.zonarsystems.net 11.0-CURRENT FreeBSD 11.0-CURRENT #2 5dc0f18(atf): Tue Apr  8 18:39:49 PDT 2014     root@fbsd-vm.zonarsystems.net:/usr/obj/usr/src/sys/GENERIC  i386
# mount | grep $PWD
/dev/md24 on /tmp/foobar (ufs, local, soft-updates)
# cd /tmp/foobar/; script /mnt/git/pjdfstest/typescript
Script started, output file is /mnt/git/pjdfstest/typescript
...
All tests successful.
Files=220, Tests=12216, 949 wallclock secs ( 4.31 usr  2.60 sys + 31.61 cusr 251.57 csys = 290.09 CPU)
Result: PASS

ZFS:

# uname -a
FreeBSD bayonetta.local 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #9 r+d4026d5: Sun Apr 20 01:53:29 PDT 2014     nikki@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64
# mount | grep $PWD
sac/scratch/pjdfstest on /scratch/pjdfstest (zfs, local, nfsv4acls)
# prove -rv /scratch/git/github/yaneurabeya-pjdfstest/
...
ok 269
ok 270
ok
/scratch/git/github/yaneurabeya-pjdfstest/tests/unlink/12.t ..... 
1..1
ok 1
ok
/scratch/git/github/yaneurabeya-pjdfstest/tests/unlink/13.t ..... 
1..2
ok 1
ok 2
ok
All tests successful.
Files=220, Tests=11421, 325 wallclock secs ( 2.60 usr  0.45 sys + 11.68 cusr 30.55 csys = 45.28 CPU)
Result: PASS
  • I haven't run the tests on OneFS recently.

Garrett Cooper added 11 commits April 12, 2013 16:13
1. Some testcases assume that the user has root privileges (use mdconfig
   -a / mount, etc).
2. Linux support exists at one degree or another.

Submitted as misc/161915.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
1. Add an all target
2. Conditionalize CC
3. Add LDLIBS/LDFLAGS

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
This is required (at least) when dealing with jails on FreeBSD

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
New versions print out messages in the format...

$ echo foo | openssl md5 -hex
(stdin)= d3b07384d113edec49eaa6238ad5ff00

Trim the '(stdin)= ' part

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
It really only needs to be checked once at the start of
the script

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
@pjd
Copy link
Owner

pjd commented Apr 17, 2013

Garrett, I had some changes that I forgot to merge from FreeBSD. I just did that, could you update your tree and generate pull request again?

Thanks!

pjd added 5 commits April 17, 2013 16:20
- Recognize 'none' or '0' as no flags.
- Allow to separate flags with |.
Add support for bindat(2) and connectat(2).
Add support for the chflagsat(2) syscall.
@ngie-eign ngie-eign closed this Apr 17, 2013
@ngie-eign ngie-eign reopened this Apr 17, 2013
@ngie-eign
Copy link
Collaborator Author

Uh, I guess I can try this again..

Garrett Cooper added 10 commits April 28, 2013 02:01
The important points to note is that __FreeBSD_version is now being
used to pick out when features were added with appropriate HAS_*
macros in the .c file.

Sponsored-by: EMC Isilon
Do the same for the "unsupported OS" message
and from that help determine whether or not exec/suid is possible

Sponsored-by: EMC Isilon
and from that help determine whether or not exec/suid is possible

Sponsored-by: EMC Isilon
Shove the FreeBSD bits under a FreeBSD-specific check

Sponsored-by: EMC Isilon
Sponsored-by: EMC Isilon
Conflicts:
	tests/misc.sh
Garrett Cooper and others added 4 commits April 9, 2014 15:58
Reported-by: Casey Peel @isilon.com
Change the memory disk size to 512kB to newfs failures in select cases

Also, die quickly on mount failures

Sponsored-by: EMC / Isilon
Submitted-by: Casey Peel @ isilon.com
@ngie-eign ngie-eign changed the title Pull in changes needed to fix tests for 10-CURRENT Pull in changes needed to fix tests for -CURRENT Apr 10, 2014
This is being done to avoid sed hacks to misc.sh and make the installation
a little more flexible to avoid an extra directory element (tests/) in the
install.
@ngie-eign
Copy link
Collaborator Author

pjd@: ping?

Garrett Cooper added 2 commits April 29, 2014 18:57
Key HAS_CHFLAGSAT off __FreeBSD_version__
pjd added a commit that referenced this pull request Sep 7, 2015
Pull in changes needed to fix tests for -CURRENT
@pjd pjd merged commit 5da59ab into pjd:master Sep 7, 2015
asomers pushed a commit to asomers/pjdfstest that referenced this pull request Jul 9, 2022
Improves the case declaration by adding support for file types. For each specified file type, a new test case structure is created. It also automatically declare root requirement for privileged file types.
This will allow future parallelization for these tests.

Closes pjd#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants