[LTP] [PATCH v4 4/7] Add lsm_get_self_attr03 test
    Cyril Hrubis 
    chrubis@suse.cz
       
    Mon Jun  2 16:38:36 CEST 2025
    
    
  
Hi!
> > 				next_ctx(next)
> >
> > Otherwise we will fail the check below.
> Right.
Feel free to add my Reviewed-by: with that fixed.
> >> +	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.
We do call verify_supported_attr_current(); in the setup, that should be
enough. What I was asking for was if you ever tested this code on a
mach9ine where the count > 1 so that the loop actually triggered.
-- 
Cyril Hrubis
chrubis@suse.cz
    
    
More information about the ltp
mailing list