Skip to content

Comments

Fix fanotify_supported()#185

Merged
ericcurtin merged 1 commit intoinotify-tools:masterfrom
amir73il:fsnotify
Jul 16, 2023
Merged

Fix fanotify_supported()#185
ericcurtin merged 1 commit intoinotify-tools:masterfrom
amir73il:fsnotify

Conversation

@amir73il
Copy link
Contributor

Parse negative value of --timeout argument and error only after setting up all watches.

this is used to improve the helper to detect support for fanotify on a specific filesystem (e.g. overlayfs) and test permission for specific flags (e.g. --filesystem).

With this improvement, we can remove the workaround for not testing fanotify inside containers, because the helper will detect if kernel supports fanotify support inside containers or not (overlayfs support for fanotify should be supported in future kernels).

Parse negative value of --timeout argument and error only after setting
up all watches.

this is used to improve the helper to detect support for fanotify on a
specific filesystem (e.g. overlayfs) and test permission for specific
flags (e.g. --filesystem).

With this improvement, we can remove the workaround for not testing
fanotify inside containers, because the helper will detect if kernel
supports fanotify support inside containers or not (overlayfs support
for fanotify should be supported in future kernels).

Signed-off-by: Amir Goldstein <[email protected]>
@amir73il
Copy link
Contributor Author

@ericcurtin not sure why ubuntu-latest-multi failed (internal libpod error) does not seem to be related to my change?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@amir73il
Copy link
Contributor Author

@ericcurtin since we had the unfortunate of never enabling fanotify by default, I'd like to request that the first release that does support --fanotify will also include this negative-timeout-as-kernel-support-test feature.

This will allow me to use the distro shipped fsnotifywait for writing more advances fanotify tests in other test suites (e.g. fstests) where it is easier to test fanotify inside unprivileged userns, with idmapped mounts, etc, when the distro shipped fsnotifywait supports --fanotify.

Copy link
Member

@ericcurtin ericcurtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericcurtin ericcurtin merged commit 8d1979a into inotify-tools:master Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants