]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/317, afs: Allow for a filesystem not to honour the local uid/gid
authorDavid Howells <dhowells@redhat.com>
Mon, 24 Apr 2023 14:10:39 +0000 (15:10 +0100)
committerZorro Lang <zlang@kernel.org>
Sun, 30 Apr 2023 16:00:42 +0000 (00:00 +0800)
Each AFS cell has it's own set of user IDs that is uses internally, in its
ACL system and in its protection management protocol.  The user ID used by
the fileserver is selected from the set belonging to the fileserver's cell
according to the authentication token associated with an RPC operation -
and this is set as a file's user ID when it is created.

This means that tests that expect to set a UID and see the same UID still
set afterwards will fail.

Add a "_require_use_local_uidgid" clause to indicate that a test expects
internal UID/GID information to be seen in the stat output and should be
skipped if AFS's case.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc
doc/requirement-checking.txt
tests/generic/317

index 49fd0d1beee90a7b7690050a169e3201c74ac4e6..3a7b518263898b81c787fad33c6ab6b427a156d5 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -5161,6 +5161,15 @@ _require_sgid_inheritance()
        esac
 }
 
+_require_use_local_uidgid()
+{
+       case $FSTYP in
+       afs)
+               _notrun "$FSTYP doesn't honour local uid and gid"
+               ;;
+       esac
+}
+
 init_rc
 
 ################################################################################
index a3588ee9095d49158ee0e5ff1583ea306b5984c5..f24ecf5c4f30b12a246de54a36f9b099dd37f73a 100644 (file)
@@ -17,6 +17,7 @@ they have.  This is done with _require_<xxx> macros, which may take parameters.
        _require_chattr <letters>
        _require_exportfs
        _require_sgid_inheritance
+       _require_use_local_uidgid
 
  (3) System call requirements.
 
@@ -104,6 +105,13 @@ _require_sgid_inheritance
      of the SGID bit and the GID from a marked directory.  The test will be
      skipped if not supported.
 
+_require_use_local_uidgid
+
+     The test requires that the $TEST_DEV filesystem sets the uid and gid of a
+     newly created file to the creating process's fsuid and fsgid.  Remote
+     filesystems, for example, may choose other settings or not even have these
+     concepts available.  The test will be skipped if not supported.
+
 
 ========================
 SYSTEM CALL REQUIREMENTS
index 134d5e3fc32666a9ca5cca5c5e739ac9788d4d3e..39cccc8bc0d05fd7e6245c5f02f242fb24c4e975 100755 (executable)
@@ -38,6 +38,7 @@ _require_user
 _require_ugid_map
 _require_userns
 _require_chown
+_require_use_local_uidgid
 qa_user_id=`id -u $qa_user`
 
 _filter_output()