diff mbox series

[kvm-unit-tests,07/32] powerpc/sprs: Don't fail changed SPRs that are used by the test harness

Message ID 20240226101218.1472843-8-npiggin@gmail.com (mailing list archive)
State New, archived
Headers show
Series powerpc improvements | expand

Commit Message

Nicholas Piggin Feb. 26, 2024, 10:11 a.m. UTC
SPRs annotated with SPR_HARNESS can change between consecutive reads
because the test harness code has changed them. Avoid failing the
test in this case.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 powerpc/sprs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth March 1, 2024, 11:15 a.m. UTC | #1
On 26/02/2024 11.11, Nicholas Piggin wrote:
> SPRs annotated with SPR_HARNESS can change between consecutive reads
> because the test harness code has changed them. Avoid failing the
> test in this case.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   powerpc/sprs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/powerpc/sprs.c b/powerpc/sprs.c
> index 8253ea971..44edd0d7b 100644
> --- a/powerpc/sprs.c
> +++ b/powerpc/sprs.c
> @@ -563,7 +563,7 @@ int main(int argc, char **argv)
>   			if (before[i] >> 32)
>   				pass = false;
>   		}
> -		if (!(sprs[i].type & SPR_ASYNC) && (before[i] != after[i]))
> +		if (!(sprs[i].type & (SPR_HARNESS|SPR_ASYNC)) && (before[i] != after[i]))
>   			pass = false;
>   
>   		if (sprs[i].width == 32 && !(before[i] >> 32) && !(after[i] >> 32))

I guess you could also squash this into the previous patch (to avoid 
problems with bisecting later?) ...

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>
Nicholas Piggin March 5, 2024, 2:14 a.m. UTC | #2
On Fri Mar 1, 2024 at 9:15 PM AEST, Thomas Huth wrote:
> On 26/02/2024 11.11, Nicholas Piggin wrote:
> > SPRs annotated with SPR_HARNESS can change between consecutive reads
> > because the test harness code has changed them. Avoid failing the
> > test in this case.
> > 
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> >   powerpc/sprs.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/powerpc/sprs.c b/powerpc/sprs.c
> > index 8253ea971..44edd0d7b 100644
> > --- a/powerpc/sprs.c
> > +++ b/powerpc/sprs.c
> > @@ -563,7 +563,7 @@ int main(int argc, char **argv)
> >   			if (before[i] >> 32)
> >   				pass = false;
> >   		}
> > -		if (!(sprs[i].type & SPR_ASYNC) && (before[i] != after[i]))
> > +		if (!(sprs[i].type & (SPR_HARNESS|SPR_ASYNC)) && (before[i] != after[i]))
> >   			pass = false;
> >   
> >   		if (sprs[i].width == 32 && !(before[i] >> 32) && !(after[i] >> 32))
>
> I guess you could also squash this into the previous patch (to avoid 
> problems with bisecting later?) ...

Yeah, I guess it doesn't make much sense to split out since lots of
other stuff changes in the previous patch too.

>
> Anyway:
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Thanks,
Nick
diff mbox series

Patch

diff --git a/powerpc/sprs.c b/powerpc/sprs.c
index 8253ea971..44edd0d7b 100644
--- a/powerpc/sprs.c
+++ b/powerpc/sprs.c
@@ -563,7 +563,7 @@  int main(int argc, char **argv)
 			if (before[i] >> 32)
 				pass = false;
 		}
-		if (!(sprs[i].type & SPR_ASYNC) && (before[i] != after[i]))
+		if (!(sprs[i].type & (SPR_HARNESS|SPR_ASYNC)) && (before[i] != after[i]))
 			pass = false;
 
 		if (sprs[i].width == 32 && !(before[i] >> 32) && !(after[i] >> 32))