[LTP] [PATCH v2 07/33] keyctl15: Test KEYCTL_GET_SECURITY label retrieval

Cyril Hrubis chrubis@suse.cz
Fri Sep 11 17:34:11 CEST 2026


Hi!
> > TST_EXP_POSITIVE()?
> 
> Well, it would not help much because Andrea wanted to use tst_brk().
> I've been thinking for a while to add TST_EXP_*_BRK() variants.
> 
> Therefore it would need to check the result anyway:
> 
> TST_EXP_POSITIVE(keyctl(KEYCTL_GET_SECURITY, key, (unsigned long)buf, sizeof(buf), 0));
> if (TST_PASS)
> 	tst_brk(TBROK | TTERRNO, "KEYCTL_GET_SECURITY failed");
> 
> (And I ignore that we don't have TST_EXP_POSITIVE_SILENT() and probably we don't
> want to call TST_EXP_POSITIVE_() to make it quiet on TPASS).

Why can't we just do:

	TST_EXP_POSITIVE(keyctl(KEYCTL_GET_SECURITY, key, (unsigned long)buf, sizeof(buf), 0));
	if (!TST_PASS)
		return;


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list