[PATCH] tests: commandhelper: Accept POLLNVAL on macOS

Ján Tomko jtomko at redhat.com
Wed Oct 7 17:17:05 UTC 2020


On a Wednesday in 2020, Roman Bolshakov wrote:
>commandhelper hangs indefinetely in poll() on macOS on commandtest test2

*indefinitely

>and later because POLLNVAL is returned on revents for input file
>descriptor opened from /dev/null, i.e this hangs:
>
>  $ tests/commandhelper < /dev/null
>  BEGIN STDOUT
>  BEGIN STDERR
>  ^C
>
>But it works fine with regular stdin:
>
>  $ tests/commandhelper <<< test
>  BEGIN STDOUT
>  BEGIN STDERR
>  test
>  test
>  END STDOUT
>  END STDERR
>
>The issue is mentioned in poll(2):
>
>  BUGS
>    The poll() system call currently does not support devices.
>
>With the change all 28 cases in commandtest pass.
>

Thanks for fixing this.

Is there a bug that track this? If so, including it in a comment
would help us delete this special case in distant future.

Jano

>Signed-off-by: Roman Bolshakov <r.bolshakov at yadro.com>
>---
> tests/commandhelper.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201007/18a129da/attachment-0001.sig>


More information about the libvir-list mailing list