Message ID | 4626bf8c-6079-976a-f579-f76ed1d2792d@ramsayjones.plus.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | asm-out0: fix a test failure on 32-bit systems | expand |
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
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:
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(-)