All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Fan Ni <fan.ni@samsung.com>, Bagas Sanjaya <bagasdotme@gmail.com>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-cxl@vger.kernel.org
Subject: Re: [PATCH v2 1/4] test printf: Add very basic struct resource tests
Date: Mon, 28 Oct 2024 11:07:00 +0200	[thread overview]
Message-ID: <Zx9UNA5Ht-RrWFIh@smile.fi.intel.com> (raw)
In-Reply-To: <20241025-cxl-pra-v2-1-123a825daba2@intel.com>

On Fri, Oct 25, 2024 at 07:46:53PM -0500, Ira Weiny wrote:
> The printf tests for struct resource were stubbed out.  struct range
> printing will leverage the struct resource implementation.
> 
> To prevent regression add some basic sanity tests for struct resource.

...

> +	struct resource test_resource = {
> +		.start = 0xc0ffee00,
> +		.end = 0xc0ffee00,
> +		.flags = IORESOURCE_MEM,
> +	};
> +
> +	test("[mem 0xc0ffee00 flags 0x200]",
> +	     "%pr", &test_resource);
> +
> +	test_resource = (struct resource) {
> +		.start = 0xc0ffee,
> +		.end = 0xba5eba11,
> +		.flags = IORESOURCE_MEM,
> +	};
> +	test("[mem 0x00c0ffee-0xba5eba11 flags 0x200]",
> +	     "%pr", &test_resource);
> +
> +	test_resource = (struct resource) {
> +		.start = 0xba5eba11,
> +		.end = 0xc0ffee,
> +		.flags = IORESOURCE_MEM,
> +	};
> +	test("[mem 0xba5eba11-0x00c0ffee flags 0x200]",
> +	     "%pr", &test_resource);
> +
> +	test_resource = (struct resource) {
> +		.start = 0xba5eba11,
> +		.end = 0xba5eca11,
> +		.flags = IORESOURCE_MEM,
> +	};
> +
> +	test("[mem 0xba5eba11-0xba5eca11 flags 0x200]",
> +	     "%pr", &test_resource);
> +
> +	test_resource = (struct resource) {
> +		.start = 0xba11,
> +		.end = 0xca10,
> +		.flags = IORESOURCE_IO |
> +			 IORESOURCE_DISABLED |
> +			 IORESOURCE_UNSET,
> +	};

I know that I have given my tag, but I just realized that you may use
DEFINE_RES_*() macros here.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-10-28  9:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26  0:46 [PATCH v2 0/4] printf: Add struct range print specifier Ira Weiny
2024-10-26  0:46 ` [PATCH v2 1/4] test printf: Add very basic struct resource tests Ira Weiny
2024-10-28  9:07   ` Andy Shevchenko [this message]
2024-10-28 21:29     ` Ira Weiny
2024-10-26  0:46 ` [PATCH v2 2/4] Documentation/printf: struct resource add start == end special case Ira Weiny
2024-10-28  9:07   ` Andy Shevchenko
2024-10-29 15:19   ` Jonathan Cameron
2024-11-07 12:34   ` Petr Mladek
2024-10-26  0:46 ` [PATCH v2 3/4] printf: Add print format (%pra) for struct range Ira Weiny
2024-10-28  9:11   ` Andy Shevchenko
2024-11-07 14:24   ` Petr Mladek
2024-10-26  0:46 ` [PATCH v2 4/4] cxl/cdat: Use %pra for dpa range outputs Ira Weiny
2024-10-30 10:51 ` [PATCH v2 0/4] printf: Add struct range print specifier metux
2024-10-31 21:34   ` Ira Weiny
2024-11-07 14:43   ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zx9UNA5Ht-RrWFIh@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alison.schofield@intel.com \
    --cc=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.