All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: fstests@vger.kernel.org
Cc: dhowells@redhat.com, linux-afs@lists.infradead.org
Subject: [PATCH 6/9] Add the ability to require O_TMPFILE to be supported for a test
Date: Tue, 25 May 2021 14:34:29 +0100	[thread overview]
Message-ID: <162194966940.4011860.15702357969023449902.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <162194962878.4011860.5561077785368723619.stgit@warthog.procyon.org.uk>

Provide a '_require_o_tmpfile' clause so that a test can require than
O_TMPFILE be supported by the filesystem being tested.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
---

 common/rc                    |    9 +++++++++
 doc/requirement-checking.txt |    7 +++++++
 tests/generic/531            |    1 +
 3 files changed, 17 insertions(+)

diff --git a/common/rc b/common/rc
index e25967d9..c0659215 100644
--- a/common/rc
+++ b/common/rc
@@ -4640,6 +4640,15 @@ _require_unix_perm_checking()
 	esac
 }
 
+_require_o_tmpfile()
+{
+	case $FSTYP in
+	afs)
+		_notrun "O_TMPFILE is not supported on $FSTYP"
+		;;
+	esac
+}
+
 init_rc
 
 ################################################################################
diff --git a/doc/requirement-checking.txt b/doc/requirement-checking.txt
index 9be7a84c..b708887b 100644
--- a/doc/requirement-checking.txt
+++ b/doc/requirement-checking.txt
@@ -21,6 +21,7 @@ they have.  This is done with _require_<xxx> macros, which may take parameters.
 	_require_sgid_inheritance
 	_require_use_local_uidgid
 	_require_unix_perm_checking
+	_require_o_tmpfile
 
  (3) System call requirements.
 
@@ -129,6 +130,12 @@ _require_unix_perm_checking
      some alternative distributed permissions model involving authentication
      tokens rather than the local fsuid/fsgid.
 
+_require_o_tmpfile
+
+     The test requires that O_TMPFILE is supported by open() on that
+     filesystem, thereby allowing the creation of temporary files to be used or
+     tested.
+
 
 ========================
 SYSTEM CALL REQUIREMENTS
diff --git a/tests/generic/531 b/tests/generic/531
index e76418ca..2f3b1dc6 100755
--- a/tests/generic/531
+++ b/tests/generic/531
@@ -32,6 +32,7 @@ _cleanup()
 _supported_fs generic
 _require_scratch
 _require_test_program "t_open_tmpfiles"
+_require_o_tmpfile
 
 rm -f $seqres.full
 _scratch_mkfs >> $seqres.full 2>&1



  parent reply	other threads:[~2021-05-25 13:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 13:33 [PATCH 0/9] Add support for using xfstests to test AFS David Howells
2021-05-25 13:33 ` [PATCH 1/9] Add AFS support David Howells
2021-05-25 13:34 ` [PATCH 2/9] generic/294, afs: Allow for mknod subtest failing if mknod not supported David Howells
2021-05-25 16:09   ` Darrick J. Wong
2021-05-25 16:19   ` David Howells
2021-05-25 16:26     ` Darrick J. Wong
2021-05-30 12:49   ` Eryu Guan
2021-06-01 14:31   ` David Howells
2021-06-06 11:58     ` Eryu Guan
2021-05-25 13:34 ` [PATCH 3/9] generic/314, afs: Allow for a filesystem that doesn't honour SGID inheritance David Howells
2021-05-25 16:10   ` Darrick J. Wong
2021-05-25 13:34 ` [PATCH 4/9] generic/317, afs: Allow for a filesystem not to honour the local uid/gid David Howells
2021-05-25 16:17   ` Darrick J. Wong
2021-05-25 16:41   ` David Howells
2021-05-25 13:34 ` [PATCH 5/9] generic/123, generic/128, afs: Allow for an fs that does its own perm management David Howells
2021-05-25 16:19   ` Darrick J. Wong
2021-05-25 16:44   ` David Howells
2021-05-25 16:51     ` Darrick J. Wong
2021-05-25 13:34 ` David Howells [this message]
2021-05-25 16:19   ` [PATCH 6/9] Add the ability to require O_TMPFILE to be supported for a test Darrick J. Wong
2021-05-30 12:54   ` Eryu Guan
2021-05-25 13:34 ` [PATCH 7/9] afs: Indicate the minimum DIO alignment is 1 David Howells
2021-05-25 13:34 ` [PATCH 8/9] generic/465: Fix handling of DIO alignment < sizeof(long) David Howells
2021-05-25 16:25   ` Darrick J. Wong
2021-05-25 16:46   ` David Howells
2021-05-25 13:34 ` [PATCH 9/9] Fix other posix_memalign() alignment issues David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162194966940.4011860.15702357969023449902.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --subject='Re: [PATCH 6/9] Add the ability to require O_TMPFILE to be supported for a test' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.