Linux-FSCrypt Archive on lore.kernel.org
 help / color / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: Eric Biggers <ebiggers@kernel.org>, linux-fscrypt@vger.kernel.org
Cc: jsorensen@fb.com, kernel-team@fb.com
Subject: Re: [PATCH 3/3] Add some basic test programs for libfsverity
Date: Thu, 21 May 2020 11:29:00 -0400
Message-ID: <5928b89f-3c8d-6f8a-85e2-2e44792d1656@gmail.com> (raw)
In-Reply-To: <20200515041042.267966-4-ebiggers@kernel.org>

On 5/15/20 12:10 AM, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> Add three test programs: 'test_hash_algs', 'test_compute_digest', and
> 'test_sign_digest'.  Nothing fancy yet, just some basic tests to test
> each library function.
> 
> With the new Makefile, these get run by 'make check'.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  programs/test_compute_digest.c |  54 +++++++++++++++++++++++++++++++++
>  programs/test_hash_algs.c      |  27 +++++++++++++++++
>  programs/test_sign_digest.c    |  44 +++++++++++++++++++++++++++
>  testdata/cert.pem              |  31 +++++++++++++++++++
>  testdata/file.sig              | Bin 0 -> 708 bytes
>  testdata/key.pem               |  52 +++++++++++++++++++++++++++++++
>  6 files changed, 208 insertions(+)
>  create mode 100644 programs/test_compute_digest.c
>  create mode 100644 programs/test_hash_algs.c
>  create mode 100644 programs/test_sign_digest.c
>  create mode 100644 testdata/cert.pem
>  create mode 100644 testdata/file.sig
>  create mode 100644 testdata/key.pem
> 
> diff --git a/programs/test_compute_digest.c b/programs/test_compute_digest.c
> new file mode 100644
> index 0000000..5d00576
> --- /dev/null
> +++ b/programs/test_compute_digest.c
> @@ -0,0 +1,54 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +#include "utils.h"
> +
> +struct file {
> +	u8 *data;
> +	size_t size;
> +	size_t offset;
> +};

The only issue I have here is the use of u8/u16/u32 in userland.

Reviewed-by: Jes Sorensen <jsorensen@fb.com>

Cheers,
Jes


  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  4:10 [PATCH 0/3] fsverity-utils: introduce libfsverity Eric Biggers
2020-05-15  4:10 ` [PATCH 1/3] Split up cmd_sign.c Eric Biggers
2020-05-21 15:26   ` Jes Sorensen
2020-05-15  4:10 ` [PATCH 2/3] Introduce libfsverity Eric Biggers
2020-05-21 15:24   ` Jes Sorensen
2020-05-21 16:08     ` Eric Biggers
2020-05-21 16:45       ` Jes Sorensen
2020-05-21 16:59         ` Eric Biggers
2020-05-21 17:13           ` Jes Sorensen
2020-05-15  4:10 ` [PATCH 3/3] Add some basic test programs for libfsverity Eric Biggers
2020-05-21 15:29   ` Jes Sorensen [this message]
2020-05-15 20:50 ` [PATCH 0/3] fsverity-utils: introduce libfsverity Jes Sorensen
2020-05-20  3:06   ` Eric Biggers
2020-05-20 13:26     ` Jes Sorensen

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=5928b89f-3c8d-6f8a-85e2-2e44792d1656@gmail.com \
    --to=jes.sorensen@gmail.com \
    --cc=ebiggers@kernel.org \
    --cc=jsorensen@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-fscrypt@vger.kernel.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

Linux-FSCrypt Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lkml.kernel.org/linux-fscrypt/0 linux-fscrypt/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-fscrypt linux-fscrypt/ https://lkml.kernel.org/linux-fscrypt \
		linux-fscrypt@vger.kernel.org
	public-inbox-index linux-fscrypt

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fscrypt


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git