[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250918220620.13e74f27@pumpkin>
Date: Thu, 18 Sep 2025 22:06:20 +0100
From: David Laight <david.laight.linux@...il.com>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: Nicolas Pitre <nico@...xnic.net>, Andrew Morton
<akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org, Oleg Nesterov
<oleg@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Biju Das
<biju.das.jz@...renesas.com>
Subject: Re: [PATCH v3 next 05/10] lib: Add tests for
mul_u64_u64_div_u64_roundup()
On Thu, 18 Sep 2025 16:00:42 +0200
Uwe Kleine-König <u.kleine-koenig@...libre.com> wrote:
> Hello David,
>
> On Tue, Jun 17, 2025 at 12:30:17AM -0400, Nicolas Pitre wrote:
> > On Sat, 14 Jun 2025, David Laight wrote:
> >
> > > Replicate the existing mul_u64_u64_div_u64() test cases with round up.
> > > Update the shell script that verifies the table, remove the comment
> > > markers so that it can be directly pasted into a shell.
> > >
> > > Rename the divisor from 'c' to 'd' to match mul_u64_add_u64_div_u64().
> > >
> > > It any tests fail then fail the module load with -EINVAL.
> > >
> > > Signed-off-by: David Laight <david.laight.linux@...il.com>
> >
> > I must withdraw my Reviewed-by here.
> >
> > > /*
> > > * The above table can be verified with the following shell script:
> > > - *
> > > - * #!/bin/sh
> > > - * sed -ne 's/^{ \+\(.*\), \+\(.*\), \+\(.*\), \+\(.*\) },$/\1 \2 \3 \4/p' \
> > > - * lib/math/test_mul_u64_u64_div_u64.c |
> > > - * while read a b c r; do
> > > - * expected=$( printf "obase=16; ibase=16; %X * %X / %X\n" $a $b $c | bc )
> > > - * given=$( printf "%X\n" $r )
> > > - * if [ "$expected" = "$given" ]; then
> > > - * echo "$a * $b / $c = $r OK"
> > > - * else
> > > - * echo "$a * $b / $c = $r is wrong" >&2
> > > - * echo "should be equivalent to 0x$expected" >&2
> > > - * exit 1
> > > - * fi
> > > - * done
> > > +
> > > +#!/bin/sh
> > > +sed -ne 's/^{ \+\(.*\), \+\(.*\), \+\(.*\), \+\(.*\), \+\(.*\) },$/\1 \2 \3 \4 \5/p' \
> > > + lib/math/test_mul_u64_u64_div_u64.c |
> > > +while read a b d r d; do
> >
> > This "read a b d r d" is wrong and that breaks the script.
>
> I think apart from that problem the series is fine, isn't it? Given that
> I wait for some time to be able to use the mul_u64_u64_div_u64_roundup()
> variant, I would very appreciate your effort to end in this patch set
> going in. Do you plan to address this issue? If not, I offer to look
> into it and create the next revision for this series.
The series doesn't currently apply due to a conflicting change.
So does need a new version.
I did start trying to do it, but have been busy.
I'll try to find some time.
David
>
> Best regards
> Uwe
Powered by blists - more mailing lists