[LTP] [PATCH v4 4/7] Add lsm_get_self_attr03 test

Andrea Cervesato andrea.cervesato@suse.com
Mon Jun 2 15:18:55 CEST 2025


On 6/2/25 14:46, Cyril Hrubis wrote:
> 				next_ctx(next)
>
> Otherwise we will fail the check below.
Right.
>
>> +	for (uint32_t i = 1; i < count; i++) {
>> +		TST_EXP_EXPR(strcmp(attr, (char *)next->ctx) != 0,
>> +			"Attribute and next LSM context must be different");
>> +
>> +		next = next_ctx(next);
>> +	}
> Have you actually tried this on a machine with more than one LSM active?
Fixed, also I think I we to check if "/sys/kernel/security/lsm" exists. 
I guess it doesn't exist if no LSM are present.

- Andrea


More information about the ltp mailing list