[LTP] [PATCH 2/2] inotify: Add SAFE_MYINOTIFY_ADD_WATCH() helper
Petr Vorel
pvorel@suse.cz
Wed Jun 5 16:16:13 CEST 2019
Hi Li,
thanks for your review.
> If test exit with TBROK the reap_wd will never get a chance to set as 1,
> and the cleanup() also make no sense in tst_brk() calling.
No, that's a "flag" for cleanup function which is run always (no matter whether
tst_brk() was called). See cleanup() and mount_flag in [1].
> > with reap_wd defined in inotify.h there could be also
> > SAFE_MYINOTIFY_RM_WATCH().
And my suggestion above was to handle this flag in inotify.h. Than it'd make
sense to add also SAFE_MYINOTIFY_RM_WATCH().
Kind regards,
Petr
[1] https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines#a-word-about-the-cleanup-callback
More information about the ltp
mailing list