Re: [PATCH 3/3] selftests: add readfile(2) selftests
From: Greg Kroah-Hartman
Date: Sun Jul 05 2020 - 02:55:19 EST
On Sat, Jul 04, 2020 at 08:38:26PM +0200, Geert Uytterhoeven wrote:
> Hi Greg,
>
> On Sat, Jul 4, 2020 at 4:05 PM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > Test the functionality of readfile(2) in various ways.
> >
> > Also provide a simple speed test program to benchmark using readfile()
> > instead of using open()/read()/close().
> >
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> Any benchmark results to share?
Yes, the readfile_speed.c file will show you that on your machine, I'll
post the results of that for two of my machines when I send the next
version of this patch series.
>
> > --- /dev/null
> > +++ b/tools/testing/selftests/readfile/readfile.c
>
> > +static void readfile(const char *filename)
> > +{
> > +// int root_fd;
>
> ???
Ugh, sorry about that, I obviously didn't clean up my last tests from
this file, thanks for catching that.
I should add more tests to validate the flag handling as well, will do
all of that for the next version, thanks for noticing this.
greg k-h