[LTP] [PATCH v2 1/3] fanotify14: Use FAN_MARK_INODE semantic flag
Amir Goldstein
amir73il@gmail.com
Sun Jul 16 07:35:28 CEST 2023
FAN_MARK_INODE is defined as 0, but we use the semantic flag
to improve the test case description.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
testcases/kernel/syscalls/fanotify/fanotify14.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify14.c b/testcases/kernel/syscalls/fanotify/fanotify14.c
index bfa0349fe..08cd94858 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify14.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify14.c
@@ -68,7 +68,7 @@ static struct test_case_t {
{FLAGS_DESC(FAN_CLASS_PRE_CONTENT | FAN_REPORT_FID), {}, {}, EINVAL},
/* INODE_EVENTS in mask without class FAN_REPORT_FID are not valid */
- {FLAGS_DESC(FAN_CLASS_NOTIF), FLAGS_DESC(0), FLAGS_DESC(INODE_EVENTS),
+ {FLAGS_DESC(FAN_CLASS_NOTIF), FLAGS_DESC(FAN_MARK_INODE), FLAGS_DESC(INODE_EVENTS),
EINVAL},
/* INODE_EVENTS in mask with FAN_MARK_MOUNT are not valid */
@@ -91,7 +91,7 @@ static struct test_case_t {
{}, {}, EINVAL},
/* FAN_RENAME without FAN_REPORT_NAME is not valid */
- {FLAGS_DESC(FAN_CLASS_NOTIF | FAN_REPORT_DFID_FID), FLAGS_DESC(0),
+ {FLAGS_DESC(FAN_CLASS_NOTIF | FAN_REPORT_DFID_FID), FLAGS_DESC(FAN_MARK_INODE),
FLAGS_DESC(FAN_RENAME), EINVAL},
/* With FAN_MARK_ONLYDIR on non-dir is not valid */
@@ -100,19 +100,19 @@ static struct test_case_t {
/* With FAN_REPORT_TARGET_FID, FAN_DELETE on non-dir is not valid */
{FLAGS_DESC(FAN_CLASS_NOTIF | FAN_REPORT_DFID_NAME_TARGET),
- FLAGS_DESC(0), FLAGS_DESC(FAN_DELETE), ENOTDIR},
+ FLAGS_DESC(FAN_MARK_INODE), FLAGS_DESC(FAN_DELETE), ENOTDIR},
/* With FAN_REPORT_TARGET_FID, FAN_RENAME on non-dir is not valid */
{FLAGS_DESC(FAN_CLASS_NOTIF | FAN_REPORT_DFID_NAME_TARGET),
- FLAGS_DESC(0), FLAGS_DESC(FAN_RENAME), ENOTDIR},
+ FLAGS_DESC(FAN_MARK_INODE), FLAGS_DESC(FAN_RENAME), ENOTDIR},
/* With FAN_REPORT_TARGET_FID, FAN_ONDIR on non-dir is not valid */
{FLAGS_DESC(FAN_CLASS_NOTIF | FAN_REPORT_DFID_NAME_TARGET),
- FLAGS_DESC(0), FLAGS_DESC(FAN_OPEN | FAN_ONDIR), ENOTDIR},
+ FLAGS_DESC(FAN_MARK_INODE), FLAGS_DESC(FAN_OPEN | FAN_ONDIR), ENOTDIR},
/* With FAN_REPORT_TARGET_FID, FAN_EVENT_ON_CHILD on non-dir is not valid */
{FLAGS_DESC(FAN_CLASS_NOTIF | FAN_REPORT_DFID_NAME_TARGET),
- FLAGS_DESC(0), FLAGS_DESC(FAN_OPEN | FAN_EVENT_ON_CHILD),
+ FLAGS_DESC(FAN_MARK_INODE), FLAGS_DESC(FAN_OPEN | FAN_EVENT_ON_CHILD),
ENOTDIR},
/* FAN_MARK_IGNORE_SURV with FAN_DELETE on non-dir is not valid */
--
2.34.1
More information about the ltp
mailing list