Issue 15747: Various chflags tests failing on FreeBSD/ZFS (original) (raw)

Both of my FreeBSD ZFS slaves (8.2 and 9.1) have chflags tests failing as follows:

====================================================================== ERROR: test_chflags (test.test_posix.PosixTester)

Traceback (most recent call last): File "/home/buildslave/cpython/3.2.snakebite-freebsd91-amd64/build/Lib/test/test_posix.py", line 350, in test_chflags self._test_chflags_regular_file(posix.chflags, support.TESTFN) File "/home/buildslave/cpython/3.2.snakebite-freebsd91-amd64/build/Lib/test/test_posix.py", line 337, in _test_chflags_regular_file chflags_func(target_file, st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '@test_48794_tmp'

====================================================================== ERROR: test_lchflags_regular_file (test.test_posix.PosixTester)

Traceback (most recent call last): File "/home/buildslave/cpython/3.2.snakebite-freebsd91-amd64/build/Lib/test/test_posix.py", line 354, in test_lchflags_regular_file self._test_chflags_regular_file(posix.lchflags, support.TESTFN) File "/home/buildslave/cpython/3.2.snakebite-freebsd91-amd64/build/Lib/test/test_posix.py", line 337, in _test_chflags_regular_file chflags_func(target_file, st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '@test_48794_tmp'

Traceback (most recent call last): File "/home/buildslave/cpython/3.2.snakebite-freebsd91-amd64/build/Lib/test/test_posix.py", line 367, in test_lchflags_symlink dummy_symlink_st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '/tmp/@test_48794_tmp-dummy-symlink'


From the FreeBSD chflags(1) manual page:

 The flags are specified as an octal number or a comma separated list of
 keywords.  The following keywords are currently defined:

       arch, archived
               set the archived flag (super-user only)

       opaque  set the opaque flag (owner or super-user only)

       nodump  set the nodump flag (owner or super-user only)

       sappnd, sappend
               set the system append-only flag (super-user only)

       schg, schange, simmutable
               set the system immutable flag (super-user only)

       sunlnk, sunlink
               set the system undeletable flag (super-user only)

       uappnd, uappend
               set the user append-only flag (owner or super-user only)

       uchg, uchange, uimmutable
               set the user immutable flag (owner or super-user only)

       uunlnk, uunlink
               set the user undeletable flag (owner or super-user only)

That indicates only root can set the immutable flag -- but if this were the case, I wonder why none of the other FreeBSD build slaves have run into it?

Either way, placeholder issue until I can spend some more time on it.

I think this needs a backport to 2.7, my FreeBSD buildbots are failing on that branch since moving buildbots home directory onto a ZFS fs:

====================================================================== ERROR: test_chflags (test.test_posix.PosixTester)

Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 350, in test_chflags self._test_chflags_regular_file(posix.chflags, test_support.TESTFN) File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 337, in _test_chflags_regular_file chflags_func(target_file, st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '@test_38161_tmp'

====================================================================== ERROR: test_lchflags_regular_file (test.test_posix.PosixTester)

Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 354, in test_lchflags_regular_file self._test_chflags_regular_file(posix.lchflags, test_support.TESTFN) File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 337, in _test_chflags_regular_file chflags_func(target_file, st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '@test_38161_tmp'


Ran 38 tests in 0.455s

I won't link the buildbot log url here since it will not be valid forever.