Re: [LTP] [PATCH] Verify virtual device availability

Petr Vorel
2024-12-10T20:22:53Z

Hi Andrea,

...
> static void setup(void)
> {
> fd_send = open_uinput();
> + if (fd_send == -1)
> + tst_brk(TCONF, "Virtual device is not available");

Thinking about it twice, how about renaming the function safe_open_uinput()
and add tst_brk(TCONF, ...) there?

Function is not used in library where tst_brk(TCONF, ...) would be problematic,
therefore I would not even bother with having SAFE_OPEN_UINPUT() which would
evaluate open_uinput().

Kind regards,
Petr