linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] asm-out0: fix a test failure on 32-bit systems
@ 2021-02-27 17:15 Ramsay Jones
  2021-02-28 21:31 ` Luc Van Oostenryck
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2021-02-27 17:15 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Sparse Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Luc,

So, I did some 32-bit testing this afternoon ... ;-)

The problem here being s/symaddr.64/symaddr.32/, of course. I did the
minimum necessary to get it to work (adding the -m64), so no creative
solutions here (not that I could think of any)!

[I suppose that I could also have created asm-out1.c as a copy and then
done s/symaddr.64/symaddr.32/, s/-m64/-m32/, but I didn't.]

ATB,
Ramsay Jones

 validation/linear/asm-out0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validation/linear/asm-out0.c b/validation/linear/asm-out0.c
index a8e0be69..8b0907b3 100644
--- a/validation/linear/asm-out0.c
+++ b/validation/linear/asm-out0.c
@@ -6,7 +6,7 @@ static void asm_out0(void)
 
 /*
  * check-name: asm-out0
- * check-command: test-linearize -fdump-ir $file
+ * check-command: test-linearize -m64 -fdump-ir $file
  *
  * check-output-start
 asm_out0:
-- 
2.30.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] asm-out0: fix a test failure on 32-bit systems
  2021-02-27 17:15 [PATCH] asm-out0: fix a test failure on 32-bit systems Ramsay Jones
@ 2021-02-28 21:31 ` Luc Van Oostenryck
  0 siblings, 0 replies; 2+ messages in thread
From: Luc Van Oostenryck @ 2021-02-28 21:31 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Sparse Mailing-list

On Sat, Feb 27, 2021 at 05:15:19PM +0000, Ramsay Jones wrote:
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Luc,
> 
> So, I did some 32-bit testing this afternoon ... ;-)

Good :)
 
> The problem here being s/symaddr.64/symaddr.32/, of course. I did the
> minimum necessary to get it to work (adding the -m64), so no creative
> solutions here (not that I could think of any)!
> 
> [I suppose that I could also have created asm-out1.c as a copy and then
> done s/symaddr.64/symaddr.32/, s/-m64/-m32/, but I didn't.]

The ideal solution, at least from a functional point of view, would be
to change the "32" by something like "$POINTER_SIZE$" and doing the
substitution when comparing the files but that would complicate a bit
more the testing and make it slower. Another solution would simply to
add for such tests an option to not display the instruction's size.

In this case, what you did is, IMO, the correct solution because the test
is obviously not size dependent, it's just that the size is displayed.

Thanks,
-- Luc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-28 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 17:15 [PATCH] asm-out0: fix a test failure on 32-bit systems Ramsay Jones
2021-02-28 21:31 ` Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).