From: Randy Dunlap <rdunlap@infradead.org>
To: Coly Li <colyli@suse.de>, linux-kernel@vger.kernel.org
Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>
Subject: Re: [PATCH v3 3/3] lib/test_crc: Add test cases for crc calculation
Date: Tue, 17 Jul 2018 09:57:28 -0700 [thread overview]
Message-ID: <346998e5-8798-e8f0-ccaa-a9d4810b68f5@infradead.org> (raw)
In-Reply-To: <20180717145525.50852-4-colyli@suse.de>
Hi,
On 07/17/2018 07:55 AM, Coly Li wrote:
> diff --git a/lib/test_crc.c b/lib/test_crc.c
> new file mode 100644
> index 000000000000..441bf835fbd3
> --- /dev/null
> +++ b/lib/test_crc.c
> @@ -0,0 +1,138 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * CRC test driver
> + *
> + * Copyright (C) 2018 Coly Li <colyli@suse.de>
> + *
> +
> +static int __init test_crc_init(void)
> +{
> + int i;
> + int v, err = 0;
> +
> + pr_info("Kernel CRC consitency testing:\n");
consistency
> + for (i = 0; test_data[i].name; i++) {
> + v = test_data[i].handler(&test_data[i]);
> + if (v < 0)
> + err++;
> + }
> +
> + if (err == 0)
> + pr_info("test_crc: all %d tests passed\n", i);
> + else
> + pr_err("test_crc: %d cases tested, %d passed, %d failed\n",
> + i, i - err, err);
> +
> + return (err == 0) ? 0 : -EINVAL;
> +}
--
~Randy
next prev parent reply other threads:[~2018-07-17 16:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 14:55 [PATCH v3 0/3] add crc64 calculation as kernel library Coly Li
2018-07-17 14:55 ` [PATCH v3 1/3] lib: add crc64 calculation routines Coly Li
2018-07-17 15:43 ` Andy Shevchenko
2018-07-18 13:58 ` Coly Li
2018-07-17 16:31 ` Eric Biggers
2018-07-18 14:02 ` Coly Li
2018-07-24 13:33 ` David Laight
2018-07-17 14:55 ` [PATCH v3 2/3] bcache: use routines from lib/crc64.c for CRC64 calculation Coly Li
2018-07-17 15:44 ` Andy Shevchenko
2018-07-17 14:55 ` [PATCH v3 3/3] lib/test_crc: Add test cases for crc calculation Coly Li
2018-07-17 16:57 ` Randy Dunlap [this message]
2018-07-18 14:53 ` Coly Li
2018-07-17 17:11 ` Andy Shevchenko
2018-07-18 15:28 ` Coly Li
2018-07-17 18:51 ` Noah Massey
2018-07-17 20:59 ` Andy Shevchenko
2018-07-18 18:30 ` Noah Massey
2018-07-18 15:28 ` Coly Li
2018-07-17 15:46 ` [PATCH v3 0/3] add crc64 calculation as kernel library Andy Shevchenko
2018-07-19 2:45 ` Coly Li
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=346998e5-8798-e8f0-ccaa-a9d4810b68f5@infradead.org \
--to=rdunlap@infradead.org \
--cc=colyli@suse.de \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).