[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKcwS9uY1WSvM3uz@google.com>
Date: Thu, 21 Aug 2025 07:42:19 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Ira Weiny <ira.weiny@...el.com>
Cc: Sagi Shahar <sagis@...gle.com>, linux-kselftest@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>,
Ackerley Tng <ackerleytng@...gle.com>, Ryan Afranji <afranji@...gle.com>,
Andrew Jones <ajones@...tanamicro.com>, Isaku Yamahata <isaku.yamahata@...el.com>,
Erdem Aktas <erdemaktas@...gle.com>, Rick Edgecombe <rick.p.edgecombe@...el.com>,
Roger Wang <runanwang@...gle.com>, Binbin Wu <binbin.wu@...ux.intel.com>,
Oliver Upton <oliver.upton@...ux.dev>, "Pratik R. Sampat" <pratikrajesh.sampat@....com>,
Reinette Chatre <reinette.chatre@...el.com>, Chao Gao <chao.gao@...el.com>,
Chenyi Qiang <chenyi.qiang@...el.com>, Kees Cook <kees@...nel.org>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Subject: Re: [PATCH v9 01/19] KVM: selftests: Include overflow.h instead of
redefining is_signed_type()
On Thu, Aug 21, 2025, Ira Weiny wrote:
> Need to add the selftest folks.
>
> + linux-kselftest@...r.kernel.org
> + Kees Cook <kees@...nel.org>
> + Shuah Khan <shuah@...nel.org>
>
> Sagi Shahar wrote:
> > Redefinition of is_signed_type() causes compilation warning for tests
> > which use kselftest_harness. Replace the definition with linux/overflow.h
> >
> > Signed-off-by: Sagi Shahar <sagis@...gle.com>
>
> Thanks! I've seen this as well and it fixes the warning for me as well.
> It might be worth picking up separate from this series depending on what
> the selftest folks say.
Again[1], I already have a fix applied and will send it to Paolo today. And simply
including overflow.h doesn't work[2] because not all selftests add tools/include to
their include path.
I appreciate the enthusiastic though!
[1] https://lore.kernel.org/all/aKcqRFWuGZQQ3v3y@google.com
[2] https://lore.kernel.org/all/18f2ea68-0f7c-465e-917e-e079335995c1@sirena.org.uk
>
> Tested-by: Ira Weiny <ira.weiny@...el.com>
> Reviewed-by: Ira Weiny <ira.weiny@...el.com>
>
> > ---
> > tools/testing/selftests/kselftest_harness.h | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
> > index 2925e47db995..a580a0d33c65 100644
> > --- a/tools/testing/selftests/kselftest_harness.h
> > +++ b/tools/testing/selftests/kselftest_harness.h
> > @@ -56,6 +56,7 @@
> > #include <asm/types.h>
> > #include <ctype.h>
> > #include <errno.h>
> > +#include <linux/overflow.h>
> > #include <linux/unistd.h>
> > #include <poll.h>
> > #include <stdbool.h>
> > @@ -751,8 +752,6 @@
> > for (; _metadata->trigger; _metadata->trigger = \
> > __bail(_assert, _metadata))
> >
> > -#define is_signed_type(var) (!!(((__typeof__(var))(-1)) < (__typeof__(var))1))
> > -
> > #define __EXPECT(_expected, _expected_str, _seen, _seen_str, _t, _assert) do { \
> > /* Avoid multiple evaluation of the cases */ \
> > __typeof__(_expected) __exp = (_expected); \
> > --
> > 2.51.0.rc1.193.gad69d77794-goog
> >
>
>
Powered by blists - more mailing lists