Skip to content

ZTS: acl/off/posixmode never passes? #16030

@rrevans

Description

@rrevans

I would like help debugging why I'm unable to make acl/off/posixmode pass when running ZTS locally.

System information

Type Version/Name
Distribution Name Fedora
Distribution Version 39
Kernel Version 6.6.8-200.fc39.x86_64
Architecture x86-64
OpenZFS Version latest (8cd8ccc), DEBUG

Describe the problem you're observing

ZTS test tests/functional/acl/off/posixmode.ksh always fails on my setup.

$ ./scripts/zfs-tests.sh -vx -r tmp.run

--- Cleanup ---
Removing pool(s):     
Removing all dm(s):   
Removing loopback(s): 
Removing files(s):    

--- Configuration ---
Runfiles:        tmp.run
STF_TOOLS:       /home/vm37user/zfs/tests/test-runner
STF_SUITE:       /home/vm37user/zfs/tests/zfs-tests
STF_PATH:        /home/vm37user/zfs/tests/zfs-tests/bin
FILEDIR:         /var/tmp
FILES:           /var/tmp/file-vdev0 /var/tmp/file-vdev1 /var/tmp/file-vdev2
LOOPBACKS:       /dev/loop0 /dev/loop1 /dev/loop2
DISKS:           loop0 loop1 loop2
NUM_DISKS:       3
FILESIZE:        4G
ITERATIONS:      1
TAGS:            functional
STACK_TRACER:    no
Keep pool(s):    rpool
Missing util(s): 

/home/vm37user/zfs/tests/test-runner/bin/test-runner.py    -c "tmp.run" -T "functional" -i "/home/vm37user/zfs/tests/zfs-tests" -I "1"
Test: /home/vm37user/zfs/tests/zfs-tests/tests/functional/acl/off/setup (run as root) [00:01] [PASS]
Test: /home/vm37user/zfs/tests/zfs-tests/tests/functional/acl/off/posixmode (run as root) [00:00] [FAIL]
Test: /home/vm37user/zfs/tests/zfs-tests/tests/functional/acl/off/cleanup (run as root) [00:01] [PASS]

Results Summary
PASS	   2
FAIL	   1

Running Time:	00:00:02
Percent passed:	66.7%
Log directory:	/var/tmp/test_results/20240326T080030

Tests with results other than PASS that are expected:

Tests with result of PASS that are unexpected:

Tests with results other than PASS that are unexpected:
    FAIL acl/off/posixmode (expected PASS)

this is the runfile I'm using:

[DEFAULT]
pre = setup
quiet = False
pre_user = root
user = root
timeout = 600
post_user = root
post = cleanup
failsafe_user = root
failsafe = callbacks/zfs_failsafe
outputdir = /var/tmp/test_results
tags = ['functional']

[tests/functional/acl/off]
tests = ['posixmode']
tags = ['functional', 'acl']

The test fails in the tmpfs precheck part of the test:

$ cat /var/tmp/test_results/20240326T080030/off/posixmode/stdout
ASSERTION: Verify POSIX mode bits function correctly
SUCCESS: mount -t tmpfs tmp /var/tmp/tmp.sJ7oJMw6FP
SUCCESS: chmod 777 /var/tmp/tmp.sJ7oJMw6FP
SUCCESS: mkdir /var/tmp/tmp.sJ7oJMw6FP/dir
SUCCESS: chown :root /var/tmp/tmp.sJ7oJMw6FP/dir
SUCCESS: chmod 007 /var/tmp/tmp.sJ7oJMw6FP/dir
SUCCESS: touch /var/tmp/tmp.sJ7oJMw6FP/dir/file
SUCCESS: chown :root /var/tmp/tmp.sJ7oJMw6FP/dir/file
total 0
d------rwx. 2 root root 60 Mar 26 08:00 .
drwxrwxrwx. 3 root root 60 Mar 26 08:00 ..
-rw-r--r--. 1 root root  0 Mar 26 08:00 file
SUCCESS: ls -la /var/tmp/tmp.sJ7oJMw6FP/dir
SUCCESS: rm /var/tmp/tmp.sJ7oJMw6FP/dir/file
SUCCESS: touch /var/tmp/tmp.sJ7oJMw6FP/dir/file
SUCCESS: chown :root /var/tmp/tmp.sJ7oJMw6FP/dir/file
NOTE: user: staff2
NOTE: cmd: rm /var/tmp/tmp.sJ7oJMw6FP/dir/file
NOTE: out: 
NOTE: err: rm: cannot remove '/var/tmp/tmp.sJ7oJMw6FP/dir/file': Permission denied
ERROR: user_run staff2 rm /var/tmp/tmp.sJ7oJMw6FP/dir/file exited 1

It seems that on my setup for some reason g=--- disallows staff2, but I don't understand what's going on or why this would pass on other systems but not Fedora (SELinux? Something different about tmpfs in Linux 6.6?)

Describe how to reproduce the problem

Using the runfile above:

$ cat >/tmp.run
... the runfile contents ...
$ scripts/zfs-tests.sh -vx -r tmp.run

Include any warning/errors/backtraces from the system logs

Nothing of note

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions