[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd3988e8-dc15-9a81-1de4-560e86d36398@intel.com>
Date: Fri, 9 Sep 2022 06:49:57 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Wander Lairson Costa <wander@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
Shuah Khan <shuah@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Tony Luck <tony.luck@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
Kai Huang <kai.huang@...el.com>,
Isaku Yamahata <isaku.yamahata@...il.com>,
marcelo.cerri@...onical.com, tim.gardner@...onical.com,
khalid.elmously@...onical.com, philip.cox@...onical.com,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v12 2/3] selftests: tdx: Test TDX attestation GetReport
support
On 9/8/22 18:55, Sathyanarayanan Kuppuswamy wrote:
> +#ifdef DEBUG
> +#define pr_debug(...) printf(__VA_ARGS__)
> +#else
> +#define pr_debug(...) _no_printf(__VA_ARGS__)
> +#endif
If you're going this way, please put this in common selftest code.
Don't force every single test to duplicate it.
But, seriously, this is all insanity. Fixing the whole "oh, but DEBUG
might not be defined" thing is not exactly rocket science. Just do this
in your test header or .c file:
#ifndef DEBUG
#define DEBUG 0
#endif
Then you can do:
if (DEBUG)
foo();
all day long.
Or, not. I honestly don't think this is worth even mucking with in the
first place.
Powered by blists - more mailing lists