[LTP] [PATCH v3 1/3] lib: Add tst_crypto and tst_netlink libs

Cyril Hrubis chrubis@suse.cz
Thu Jul 19 17:11:55 CEST 2018


Hi!
> +void tst_crypto_open(struct tst_crypto_session *ses)
> +{
> +	TEST(socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CRYPTO));
> +	if (TEST_RETURN < 0 && TEST_ERRNO == EPROTONOSUPPORT) {
> +		tst_brk(TCONF | TTERRNO, "NETLINK_CRYPTO is probably disabled");
> +	} else if (TEST_RETURN < 0) {
> +		tst_brk(TBROK | TTERRNO,
> +			"socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CRYPTO)");
> +	}

I got rid of this else branch, since we call tst_brk() in the first if
it's not needed at all, and pushed both patches, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list