Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252026 > unrolled thread

[PATCH 10/13] lib/test_printf.c: account for kvasprintf tests

Started byRasmus Villemoes <linux@rasmusvillemoes.dk>
First post2015-10-20 22:40 +0200
Last post2015-10-26 07:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 10/13] lib/test_printf.c: account for kvasprintf tests Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-10-20 22:40 +0200
    Re: [PATCH 10/13] lib/test_printf.c: account for kvasprintf tests Kees Cook <keescook@chromium.org> - 2015-10-26 07:50 +0100

#1252026 — [PATCH 10/13] lib/test_printf.c: account for kvasprintf tests

FromRasmus Villemoes <linux@rasmusvillemoes.dk>
Date2015-10-20 22:40 +0200
Subject[PATCH 10/13] lib/test_printf.c: account for kvasprintf tests
Message-ID<qlLRp-6h1-51@gated-at.bofh.it>
These should also count as performed tests.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 lib/test_printf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/test_printf.c b/lib/test_printf.c
index 80ddafb2675d..8fca007d9bcd 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -127,6 +127,7 @@ __test(const char *expect, int elen, const char *fmt, ...)
 
 	p = kvasprintf(GFP_KERNEL, fmt, ap);
 	if (p) {
+		total_tests++;
 		if (memcmp(p, expect, elen+1)) {
 			pr_warn("kvasprintf(..., \"%s\", ...) returned '%s', expected '%s'\n",
 				fmt, p, expect);
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1255696

FromKees Cook <keescook@chromium.org>
Date2015-10-26 07:50 +0100
Message-ID<qnJLs-4TL-9@gated-at.bofh.it>
In reply to#1252026
On Wed, Oct 21, 2015 at 5:30 AM, Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
> These should also count as performed tests.
>
> Cc: Kees Cook <keescook@chromium.org>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Acked-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  lib/test_printf.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/test_printf.c b/lib/test_printf.c
> index 80ddafb2675d..8fca007d9bcd 100644
> --- a/lib/test_printf.c
> +++ b/lib/test_printf.c
> @@ -127,6 +127,7 @@ __test(const char *expect, int elen, const char *fmt, ...)
>
>         p = kvasprintf(GFP_KERNEL, fmt, ap);
>         if (p) {
> +               total_tests++;
>                 if (memcmp(p, expect, elen+1)) {
>                         pr_warn("kvasprintf(..., \"%s\", ...) returned '%s', expected '%s'\n",
>                                 fmt, p, expect);
> --
> 2.6.1
>



-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web