public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] block/ltp_block_dev.c: Fix error on older distributions
Date: Mon, 11 Mar 2019 11:27:56 +0800	[thread overview]
Message-ID: <5C85D5BC.1010205@cn.fujitsu.com> (raw)
In-Reply-To: <1552274488-18515-1-git-send-email-huangjh.jy@cn.fujitsu.com>

Hi Jinhui,

It looks good to me. :-)
Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

Best Regards,
Xiao Yang
On 2019/03/11 11:21, Jinhui huang wrote:
> major number was limited to 511(i.e. BLKDEV_MAJOR_MAX - 1) by commit 133d55c
> since kernel v4.14 so that register_blkdev() with a major number gather than
> 511 got failure on older distributions.  It's just a change of limit rather
> than bug fix so we want to accept both of results on all kernels.
>
> Fixes: 8d19ee6 ("block/ltp_block_dev.c: Update tests for the newer kernel")
>
> Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com>
> ---
>  .../kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c     | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c b/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c
> index b0f6ce5..c7c8683 100644
> --- a/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c
> +++ b/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c
> @@ -232,10 +232,15 @@ static int tc05(void)
>  
>  		if (major == 0) {
>  			unregister_blkdev(test_major[i], BLK_DEV_NAME);
> +#ifdef BLKDEV_MAJOR_MAX
>  			pass = 0;
> +#endif
>  		} else {
>  			prk_debug("register_blkdev() with major %u got error %i\n",
>  				  test_major[i], major);
> +#ifndef BLKDEV_MAJOR_MAX
> +			pass = 0;
> +#endif
>  		}
>  	}
>  




  reply	other threads:[~2019-03-11  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11  3:21 [LTP] [PATCH] block/ltp_block_dev.c: Fix error on older distributions Jinhui huang
2019-03-11  3:27 ` Xiao Yang [this message]
2019-03-14 10:12   ` Xiao Yang

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=5C85D5BC.1010205@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=ltp@lists.linux.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox