Message ID | 20201113155123.5959-6-pvorel@suse.cz |
---|---|
State | Superseded |
Headers | show |
Series | Introduce SAFE_FANOTIFY_MARK() macro + cleanup | expand |
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h index 277760c09..f3c2d48b3 100644 --- a/testcases/kernel/syscalls/fanotify/fanotify.h +++ b/testcases/kernel/syscalls/fanotify/fanotify.h @@ -67,6 +67,11 @@ int safe_fanotify_init(const char *file, const int lineno, tst_brk(TBROK | TERRNO, "%s:%d: fanotify_init() failed", file, lineno); } + + if (rval < -1) { + tst_brk(TBROK | TERRNO, "%s:%d: invalid fanotify_init() return %d", + file, lineno, rval); + } #else tst_brk(TCONF, "Header <sys/fanotify.h> is not present"); #endif /* HAVE_SYS_FANOTIFY_H */
for fanotify_init() in safe_fanotify_init() Signed-off-by: Petr Vorel <pvorel@suse.cz> --- New in v2. FYI We agreed in LTP to test these. testcases/kernel/syscalls/fanotify/fanotify.h | 5 +++++ 1 file changed, 5 insertions(+)