[COMMITTED 2/3] gas: BPF pseudo-c syntax tests
Jan Beulich
jbeulich@suse.com
Fri Apr 28 06:10:24 GMT 2023
On 27.04.2023 20:07, Jose E. Marchesi wrote:
>
>> On 27.04.2023 11:59, Jose E. Marchesi wrote:
>>>
>>>> On 26.04.2023 19:31, Jose E. Marchesi via Binutils wrote:
>>>>> --- a/gas/testsuite/gas/bpf/alu-be.d
>>>>> +++ b/gas/testsuite/gas/bpf/alu-be.d
>>>>> @@ -1,5 +1,6 @@
>>>>> #as: --EB
>>>>> #source: alu.s
>>>>> +#source: alu-pseudoc.s
>>>>> #objdump: -dr
>>>>> #name: eBPF ALU64 instructions, big endian
>>>>
>>>> I may of course be reading binutils-common.exp's run_dump_test wrong,
>>>> but is this having the intended effect of assembling each of the files
>>>> once and checking objdump output for each of them? It looks to me as
>>>> if only the assembling step would be performed for both, which I don't
>>>> think is what is wanted.
>>>
>>> It was an attempt to avoid having to replicate the same contents in
>>> alu-be.d and alu-be-pseudoc.d. Will look into this too.
>>
>> I assumed that would have been the goal, but that's achieved by using
>> #dump: instead (in a new, small *.d).
>
> Thanks for the hint. I just pushed the fix below that makes use of
> #dump.
Hmm, thanks for doing this, but ...
> From 2b8c7766ea357ff9b22531d6fdf0c3bd69cc044f Mon Sep 17 00:00:00 2001
> From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
> Date: Thu, 27 Apr 2023 20:05:19 +0200
> Subject: [PATCH] gas: bpf: fix tests for pseudo-c syntax
>
> This patch fixes the GAS BPF testsuite so the tests for pseudo-c
> syntax are actually executed.
>
> 2023-04-27 Jose E. Marchesi <jose.marchesi@oracle.com>
>
> * testsuite/gas/bpf/mem.dump: New file.
> * testsuite/gas/bpf/mem-pseudoc.d: Likewise.
> * testsuite/gas/bpf/mem.d: #dump mem.dump.
> * testsuite/gas/bpf/lddw.dump: New file.
> * testsuite/gas/bpf/lddw-pseudoc.d: Likewise.
> * testsuite/gas/bpf/lddw.d: #dump lddw.dump.
> * testsuite/gas/bpf/jump.dump: New file.
> * testsuite/gas/bpf/jump-pseudoc.d: Likewise
> * testsuite/gas/bpf/jump.d: #dump jump.dump.
> * testsuite/gas/bpf/jump32.dump: New file.
> * testsuite/gas/bpf/jump32-pseudoc.d: Likewise.
> * testsuite/gas/bpf/jump32.d: #dump jump32.dump.
> * testsuite/gas/bpf/lddw-be.dump: New file.
> * testsuite/gas/bpf/lddw-be-pseudoc.d: Likewise.
> * testsuite/gas/bpf/lddw-be.d: #dump lddw-be.dump.
> * testsuite/gas/bpf/indcall-1.dump: New file.
> * testsuite/gas/bpf/indcall-1-pseudoc.d: Likewise.
> * testsuite/gas/bpf/indcall-1.d: #dump indcall-1.dump.
> * testsuite/gas/bpf/indcall-1-pseudoc.s (main): Fix lddw
> instruction.
> * testsuite/gas/bpf/atomic.dump: New file.
> * testsuite/gas/bpf/atomic-pseudoc.d: Likewise.
> * testsuite/gas/bpf/atomic.d: #dump atomic.dump.
> * testsuite/gas/bpf/alu32.dump: New file.
> * testsuite/gas/bpf/alu32-pseudoc.d: Likewise.
> * testsuite/gas/bpf/alu32.d: #dump alu32.dump.
> * testsuite/gas/bpf/alu.dump: New file.
> * testsuite/gas/bpf/alu-pseudoc.d: Likewise.
> * testsuite/gas/bpf/alu.d: #dump alu.dump.
>
> * testsuite/gas/bpf/alu-be.dump: New file.
> * testsuite/gas/bpf/alu-be-pseudoc.d: Likewise.
> * testsuite/gas/bpf/alu-be.d: #dump alu-be.dump.
> * testsuite/gas/bpf/alu32-be-pseudoc.d: New file.
> * testsuite/gas/bpf/alu32-be-dump: Likewise.
> * testsuite/gas/bpf/alu32-be.d: #dump alu32-be-dump.
> * testsuite/gas/bpf/bpf.exp: Run *-pseudoc tests.
... why all the new *.dump files? That's far more code churn than was
necessary, as the original *.d files served their purpose quite fine,
while the new tests would only have needed to reference those *.d ones.
Anyway - I guess it is as it is now, but please consider (prefer) the
alternative in the future.
Jan
More information about the Binutils
mailing list