[PATCH v1 6/7] kselftest/arm64: mte: add test type enum

Mark Brown broonie at kernel.org
Wed Jan 26 08:33:53 PST 2022


On Tue, Jan 25, 2022 at 03:09:19PM +0000, Joey Gouly wrote:

> This enum will be used to parameterise the test to perform other syscalls
> than 'read'.

> -	evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE, page_sz),

> +	for (t = 0; t < LAST_TEST; t++) {
> +		evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE, page_sz, t),

I appreciate that the lines were already over 80 columns here but
between the extra parameter and the extra indentation we're getting some
very long lines here.  Some line breaks wouldn't go amiss?

Alternatively I wonder if it wouldn't be better to restructure this so
that the list of tests is stored in a data structure, or indeed it looks
like as well as the enum for syscalls we could also be generating the
various combinations of shared/private, sync/async and tag offsets.
That seems more maintainable overall.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220126/b201ec58/attachment-0001.sig>


More information about the linux-arm-kernel mailing list