[LTP] [PATCH v3 1/2] poll: add basic POLLHUP semantics test

Cyril Hrubis chrubis@suse.cz
Wed Feb 25 11:37:44 CET 2026


Hi!
> +	TEST(poll(&pfd, 1, -1));
> +
> +	if (TST_RET == -1) {
> +		tst_res(TFAIL | TTERRNO, "poll() failed");
> +		return;
> +	} else if (TST_RET != 1) {
> +		tst_res(TFAIL, "Unexpected poll() return value %ld", TST_RET);
> +		return;
> +	}

No need for the else here. We do return in the previous if () block.

Otherwise:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list