[LTP] [PATCH v3 09/36] keyctl15: Test KEYCTL_GET_SECURITY label retrieval

Cyril Hrubis chrubis@suse.cz
Fri Sep 18 11:50:12 CEST 2026


> > 	if (rc == 0) {
> > 		tst_res(TFAIL, "empty security label not NUL terminated");
> > 		return;
> > 	}
> > 
> > 	if (rc > sizeof(buf)) {
> > 		tst_res(TFAIL, "buffer too small");
> > 		return;
> > 	}
> 
> My only concern is whether the TFAIL is correct when truncation
> occurs. Shouldn't the test allocate a larger buffer instead?

Well we can always allocate large enough buffer in the test setup.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list