Hi Mark, On Thu, Mar 10, 2022 at 02:43:35PM +0000, Mark Brown wrote: > The current tests use the prctls for various things but there's no > coverage of the edges of the interface so add some basics. This isn't > hugely useful as it is (it originally had some coverage for the > combinations with asymmetric mode but we removed the prctl() for that) > but it might be a helpful starting point for future work, for example > covering error handling. > > Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> > --- [..] > diff --git a/tools/testing/selftests/arm64/mte/check_prctl.c b/tools/testing/selftests/arm64/mte/check_prctl.c > new file mode 100644 > index 000000000000..500aefc5d7cd > --- /dev/null > +++ b/tools/testing/selftests/arm64/mte/check_prctl.c > @@ -0,0 +1,123 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (C) 2022 ARM Limited > + > +#include <stdbool.h> > +#include <stdio.h> > +#include <string.h> > + > +#include <sys/auxv.h> > +#include <sys/prctl.h> > + > +#include <asm/hwcap.h> > + > +#include "kselftest.h" > + > +static bool system_has_mte; This looks unused (apart from being set in main()). Thanks, Joey