Skip to contentSkip to conversation

generic/688: Skip test if fs doesn't support security

PATCH In review Liu Yiding 4 participants 7 messages Aug 2, 2022 – Aug 4, 2022

lore
Share & tools
lore

Liu Yiding

author
#0 lore raw

PATCH 1/1 generic/688: Skip test if fs doesn't support security

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

---
 tests/generic/688 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/688 +2 -0
index 426286b6..d11b4c21 100755
@@ -7,6 +7,7 @@
 # Functional test for dropping capability bits as part of an fallocate.
 #
 . ./common/preamble
+. ./common/attr
 _begin_fstest auto prealloc quick
 
 # Override the default cleanup function.
@@ -28,6 +29,7 @@ _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_xfs_io_command falloc
 _require_test
+_require_attrs security
 _require_congruent_file_oplen $TEST_DIR 65536
 
 junk_dir=$TEST_DIR/$seq
Signature · 1 line
2.34.1
#1 lore raw
Quoted 5 lines · Liu Yiding

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

---

Hmm... looks like we can re-start this discussion long time ago:

https://lore.kernel.org/fstests/20220323023845.saj5en74km7aibdx@zlang-mailbox/

About how can we deal with those fs doesn't support capabilities, e.g. nfs, virtiofs??

Thanks,
Zorro

Quoted 26 lines
 tests/generic/688 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/688 +2 -0
index 426286b6..d11b4c21 100755
@@ -7,6 +7,7 @@
 # Functional test for dropping capability bits as part of an fallocate.
 #
 . ./common/preamble
+. ./common/attr
 _begin_fstest auto prealloc quick
 
 # Override the default cleanup function.
@@ -28,6 +29,7 @@ _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_xfs_io_command falloc
 _require_test
+_require_attrs security
 _require_congruent_file_oplen $TEST_DIR 65536
 
 junk_dir=$TEST_DIR/$seq
Signature · 1 line
2.34.1
#2 lore raw

Hi Zorro

Quoted 4 lines · Zorro Lang
Quoted 3 lines · Liu Yiding

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

Quoted 8 lines
Quoted 2 lines

---

Hmm... looks like we can re-start this discussion long time ago:

https://lore.kernel.org/fstests/20220323023845.saj5en74km7aibdx@zlang-mailbox/

About how can we deal with those fs doesn't support capabilities, e.g. nfs, virtiofs??

Ahh, so I don't need to send a v2 patch until you finish above discussion.

Quoted 30 lines

Thanks,
Zorro

Quoted 26 lines
  tests/generic/688 | 2 ++
  1 file changed, 2 insertions(+)
tests/generic/688 +2 -0
index 426286b6..d11b4c21 100755
@@ -7,6 +7,7 @@
  # Functional test for dropping capability bits as part of an fallocate.
  #
  . ./common/preamble
+. ./common/attr
  _begin_fstest auto prealloc quick
 
  # Override the default cleanup function.
@@ -28,6 +29,7 @@ _require_command "$GETCAP_PROG" getcap
  _require_command "$SETCAP_PROG" setcap
  _require_xfs_io_command falloc
  _require_test
+_require_attrs security
  _require_congruent_file_oplen $TEST_DIR 65536
 
  junk_dir=$TEST_DIR/$seq
Signature · 1 line
2.34.1
#3 lore raw
Quoted 10 lines · On Wed, Aug 03, 2022 at 06:48:47AM +0000, [email protected] wrote:

Hi Zorro

Quoted 7 lines · Zorro Lang
Quoted 5 lines · Liu Yiding

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

---

Quoted 7 lines
Quoted 5 lines

Hmm... looks like we can re-start this discussion long time ago:

https://lore.kernel.org/fstests/20220323023845.saj5en74km7aibdx@zlang-mailbox/

About how can we deal with those fs doesn't support capabilities, e.g. nfs, virtiofs??

Ahh, so I don't need to send a v2 patch until you finish above discussion.

Actually I'm not sure if we need a _require_capabilities(), or just use "_require_attrs security" for all filesystems which support/unsupport capabilities. Hope to hear more points.

If you'd like to send v2, there's not only g/688 need capabilities.

Thanks,
Zorro

Quoted 31 lines
Quoted 31 lines

Thanks,
Zorro

Quoted 26 lines
  tests/generic/688 | 2 ++
  1 file changed, 2 insertions(+)
tests/generic/688 +2 -0
index 426286b6..d11b4c21 100755
@@ -7,6 +7,7 @@
  # Functional test for dropping capability bits as part of an fallocate.
  #
  . ./common/preamble
+. ./common/attr
  _begin_fstest auto prealloc quick
 
  # Override the default cleanup function.
@@ -28,6 +29,7 @@ _require_command "$GETCAP_PROG" getcap
  _require_command "$SETCAP_PROG" setcap
  _require_xfs_io_command falloc
  _require_test
+_require_attrs security
  _require_congruent_file_oplen $TEST_DIR 65536
 
  junk_dir=$TEST_DIR/$seq
Signature · 1 line
2.34.1
#4 lore raw
Quoted 15 lines · Zorro Lang
Quoted 14 lines · On Wed, Aug 03, 2022 at 06:48:47AM +0000, [email protected] wrote:

Hi Zorro

Quoted 11 lines · Zorro Lang
Quoted 5 lines · Liu Yiding

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

---

Hmm... looks like we can re-start this discussion long time ago:

https://lore.kernel.org/fstests/20220323023845.saj5en74km7aibdx@zlang-mailbox/

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

About how can we deal with those fs doesn't support capabilities, e.g. nfs, virtiofs??

Ahh, so I don't need to send a v2 patch until you finish above discussion.

Actually I'm not sure if we need a _require_capabilities(), or just use "_require_attrs security" for all filesystems which support/unsupport capabilities. Hope to hear more points.

I think a _require_capabilities() is much better than "_require_attrs security()".

Quoted 37 lines

If you'd like to send v2, there's not only g/688 need capabilities.

Thanks,
Zorro

Quoted 31 lines
Quoted 31 lines

Thanks,
Zorro

Quoted 26 lines
   tests/generic/688 | 2 ++
   1 file changed, 2 insertions(+)
tests/generic/688 +2 -0
index 426286b6..d11b4c21 100755
@@ -7,6 +7,7 @@
   # Functional test for dropping capability bits as part of an fallocate.
   #
   . ./common/preamble
+. ./common/attr
   _begin_fstest auto prealloc quick
 
   # Override the default cleanup function.
@@ -28,6 +29,7 @@ _require_command "$GETCAP_PROG" getcap
   _require_command "$SETCAP_PROG" setcap
   _require_xfs_io_command falloc
   _require_test
+_require_attrs security
   _require_congruent_file_oplen $TEST_DIR 65536
 
   junk_dir=$TEST_DIR/$seq
Signature · 1 line
2.34.1
#5 lore raw
In reply to Liu Yiding
Quoted 13 lines · Liu Yiding

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

---
 tests/generic/688 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/688 +0 -0
index 426286b6..d11b4c21 100755

tests/generic/688 line 11

Quoted 5 lines
tests/generic/688 +1 -0
@@ -7,6 +7,7 @@
 # Functional test for dropping capability bits as part of an fallocate.
 #
 . ./common/preamble
+. ./common/attr
 _begin_fstest auto prealloc quick

Includes don't belong in the test preamble/setup section. They belong a few lines below in the section titled:

# Include common functions.

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#6 lore raw

Hi Dave.

Quoted 9 lines · Dave Chinner
Quoted 8 lines · Liu Yiding

This test require security attr. Skip test if fs doesn't support security attr. E.g. virtiofs

---
  tests/generic/688 | 2 ++
  1 file changed, 2 insertions(+)
Quoted 13 lines

tests/generic/688 line 11

Quoted 10 lines
tests/generic/688 +1 -0
index 426286b6..d11b4c21 100755
@@ -7,6 +7,7 @@
  # Functional test for dropping capability bits as part of an fallocate.
  #
  . ./common/preamble
+. ./common/attr
  _begin_fstest auto prealloc quick

Includes don't belong in the test preamble/setup section. They belong a few lines below in the section titled:

Thank you for your point. :)

Quoted 7 lines

# Include common functions.

Cheers,

Dave.