svn commit: r295120 - in user/pho/stress2: . misc
Peter Holm
pho at FreeBSD.org
Mon Feb 1 07:39:59 UTC 2016
Author: pho
Date: Mon Feb 1 07:39:57 2016
New Revision: 295120
URL: https://svnweb.freebsd.org/changeset/base/295120
Log:
Delete old and outdated syscall fuzzing tests. syscall4.sh is the current syscall
fuzzer.
Explain how to run syscall fuzzing as root, if you really must.
Fix a single style issue in syscall4.sh
Sponsored by: EMC / Isilon Storage Division
Deleted:
user/pho/stress2/misc/syscall.sh
user/pho/stress2/misc/syscall2.sh
user/pho/stress2/misc/syscall3.sh
Modified:
user/pho/stress2/README
user/pho/stress2/misc/syscall4.sh
Modified: user/pho/stress2/README
==============================================================================
--- user/pho/stress2/README Mon Feb 1 07:15:31 2016 (r295119)
+++ user/pho/stress2/README Mon Feb 1 07:39:57 2016 (r295120)
@@ -4,12 +4,10 @@ This is the FreeBSD kernel stress test s
computer, by stressing selected parts of the kernel, thus exposing inadequate
error handling.
-Do not run the syscall test as root.
-
To build and use:
make
-sh ./run.sh
+sh ./run.sh (see stress2/misc)
The "run.sh" script accepts an optional configuration file in order to test specific areas.
For example:
@@ -40,6 +38,14 @@ To run all of these tests once, type "./
The default mode is to compile tests, but pre-build binaries may be used.
See default.cfg for details.
+There may sometimes be a need for running single syscall fuzzing as root.
+This can be achieved by setting the environment variable "USE_ROOT",
+before running misc/syscall4.sh. For example:
+$ ./syscall4.sh 6
+$ USE_ROOT= ./syscall4.sh 6
+Running syscall4 as root for 6.
+$
+
The name stress2 indicates that this is the second generation of the Kernel Stress Test Suite.
The first version (stress) was based mostly on scripts.
Modified: user/pho/stress2/misc/syscall4.sh
==============================================================================
--- user/pho/stress2/misc/syscall4.sh Mon Feb 1 07:15:31 2016 (r295119)
+++ user/pho/stress2/misc/syscall4.sh Mon Feb 1 07:39:57 2016 (r295120)
@@ -236,7 +236,7 @@ test(void *arg __unused)
if ((fd[i] = open(p->fts_path, O_RDONLY)) == -1)
continue;
i++;
- i = i % 900;
+ i = i % nitems(fd);
}
if (fts_close(fts) == -1)
@@ -309,8 +309,9 @@ main(int argc, char **argv)
if ((pw = getpwnam("nobody")) == NULL)
err(1, "no such user: nobody");
- if (getenv("USE_ROOT"))
- fprintf(stderr, "Running syscall4 as root.\n");
+ if (getenv("USE_ROOT") && argc == 2)
+ fprintf(stderr, "Running syscall4 as root for %s.\n",
+ argv[1]);
else {
if (setgroups(1, &pw->pw_gid) ||
setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
More information about the svn-src-user
mailing list