On Wed, 5 Mar 2025 at 00:52, Bart Van Assche wrote:
>
> On 3/4/25 1:21 AM, Marco Elver wrote:
> > +#include
> > +
> > +/*
> > + * Test that helper macros work as expected.
> > + */
> > +static void __used test_common_helpers(void)
> > +{
> > + BUILD_BUG_ON(capability_unsafe(3) != 3); /* plain
On 3/4/25 1:21 AM, Marco Elver wrote:
+#include
+
+/*
+ * Test that helper macros work as expected.
+ */
+static void __used test_common_helpers(void)
+{
+ BUILD_BUG_ON(capability_unsafe(3) != 3); /* plain expression */
+ BUILD_BUG_ON(capability_unsafe((void)2; 3;) != 3); /* does not
Add a simple test stub where we will add common supported patterns that
should not generate false positive of each new supported capability.
Signed-off-by: Marco Elver
---
lib/Kconfig.debug | 14 ++
lib/Makefile | 3 +++
lib/test_capability-analysis.c