fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Tests for idmapped tmpfs
@ 2023-03-13 19:03 Rodrigo Campos
  2023-03-13 19:03 ` [PATCH v3 1/9] vfs: Don't open-code safe_close() Rodrigo Campos
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Rodrigo Campos @ 2023-03-13 19:03 UTC (permalink / raw)
  To: fstests; +Cc: Christian Brauner, Giuseppe Scrivano, Rodrigo Campos

Hi!

This patches add tests for tmpfs idmap mounts inside a userns.

Changes in v3:
	* In patch 9, changed the name of labels for goto. Now after we created
	  an fd, on error we "goto close", after a mkdir, we "goto rm", and so.
	  Before the labels were based on what operation we skipped, that was
	  not so clear when adding a "goto" to which label we should error out.
	* Added Reviewed-by Christian to the first 8 patches
	* Addressed all comments by Christian regarding patch 9, listed below:
	* Removed old reference in the commit msg to
	  "t_inside_userns", as that is not used anymore
	* Make the mount private
	* Use C89 declaration style (declare varaibles at the top of the
	  function)
	* Use "if (!x)" instead of "if (x == NULL)" for not asigned char* vars
	* Add missing space in an if

The only patch changed is the last one (module adding Reviewed-by tags).

I've kept the tabs vs space tabs just in case, but Zorro please feel free to
drop it (IIUC you prefer that?).


Thanks againg for your reviews!

Best,
Rodrigo


Rodrigo Campos (9):
  vfs: Don't open-code safe_close()
  vfs: Fix documentation typo
  vfs: Use tabs to indent, not spaces
  vfs: Fix race condition on get_userns_fd()
  vfs: Make switch_userns set PR_SET_DUMPABLE
  vfs: Prepare tests in &s_idmapped_mounts to be reused inside a userns
  vfs: Make idmapped core tests public
  vfs: Export test_setup() and test_cleanup()
  vfs: Add tmpfs tests for idmap mounts

 src/vfs/Makefile                |   4 +-
 src/vfs/idmapped-mounts.c       | 140 +++++++--------
 src/vfs/idmapped-mounts.h       |  38 ++++
 src/vfs/tmpfs-idmapped-mounts.c | 305 ++++++++++++++++++++++++++++++++
 src/vfs/tmpfs-idmapped-mounts.h |  15 ++
 src/vfs/utils.c                 |  19 +-
 src/vfs/utils.h                 |   4 +-
 src/vfs/vfstest.c               |  19 +-
 src/vfs/vfstest.h               |  10 ++
 tests/tmpfs/001                 |  27 +++
 tests/tmpfs/001.out             |   2 +
 tests/tmpfs/Makefile            |  24 +++
 12 files changed, 520 insertions(+), 87 deletions(-)
 create mode 100644 src/vfs/tmpfs-idmapped-mounts.c
 create mode 100644 src/vfs/tmpfs-idmapped-mounts.h
 create mode 100644 src/vfs/vfstest.h
 create mode 100755 tests/tmpfs/001
 create mode 100644 tests/tmpfs/001.out
 create mode 100644 tests/tmpfs/Makefile

-- 
2.39.2


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-03-14 11:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 19:03 [PATCH v3 0/9] Tests for idmapped tmpfs Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 1/9] vfs: Don't open-code safe_close() Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 2/9] vfs: Fix documentation typo Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 3/9] vfs: Use tabs to indent, not spaces Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 4/9] vfs: Fix race condition on get_userns_fd() Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 5/9] vfs: Make switch_userns set PR_SET_DUMPABLE Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 6/9] vfs: Prepare tests in &s_idmapped_mounts to be reused inside a userns Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 7/9] vfs: Make idmapped core tests public Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 8/9] vfs: Export test_setup() and test_cleanup() Rodrigo Campos
2023-03-13 19:03 ` [PATCH v3 9/9] vfs: Add tmpfs tests for idmap mounts Rodrigo Campos
2023-03-14 10:39   ` Zorro Lang
2023-03-14 11:41     ` Rodrigo Campos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).