This allows tests to run without prior configuration.
Details
Details
- Reviewers
pho scf allanjude - Group Reviewers
tests - Commits
- rG3ee87f8a4d7a: stress2: Use tests as the default test user.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 60923 Build 57807: arc lint + arc unit
Event Timeline
Comment Actions
That does not work for me. This is what I get on a pristine install:
root@x8:~ # uname -a FreeBSD x8.osted.lan 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n273322-22429a464a5f: Wed Oct 30 09:52:55 CET 2024 root@x8.osted.lan:/usr/src/sys/amd64/compile/PHO amd64 root@x8:~ # grep tests /etc/master.passwd tests:*:977:977::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin root@x8:~ # su tests -c date This account is currently not available. root@x8:~ #
Comment Actions
I'm puzzled by how your change could work for you.
root@x8:/usr/src/tools/test/stress2/misc # git diff | cat diff --git a/tools/test/stress2/default.cfg b/tools/test/stress2/default.cfg index bff7f3f168a9..dbd1ca0bbc43 100644 --- a/tools/test/stress2/default.cfg +++ b/tools/test/stress2/default.cfg @@ -56,7 +56,7 @@ testcases/tcp/tcp export diskimage=${diskimage:-/tmp/diskimage} # Location of 1G disk image export mntpoint=${mntpoint:-/mnt} # Disk image mount point -export testuser=${testuser:-TBD} # Name of non root test user +export testuser=${testuser:-tests} # Name of non root test user export mdstart=${mdstart:-10} # Start of free md units export newfs_flags=${newfs_flags:-"-U"} # Default file system flags export stress2origin=${stress2origin:-`pwd`} root@x8:/usr/src/tools/test/stress2/misc # ./all.sh -o vunref2.sh Creating local configuration file: /tmp/stress2.d/x8.osted.lan. Enter non-root test user name: tests User "tests" not usable. root@x8:/usr/src/tools/test/stress2/misc #
Note that none of the existing tests uses "su -m"
Comment Actions
I only needed to run tmpfs24 which does not use $testuser but refuses to run if it is not defined. This patch does not fix every broken test, but it fixes some of them.