Re: [PATCH v12 2/3] selftests: tdx: Test TDX attestation GetReport support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux