public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: binutils@sourceware.org
Subject: Re: [COMMITTED 2/3] gas: BPF pseudo-c syntax tests
Date: Fri, 28 Apr 2023 08:10:24 +0200	[thread overview]
Message-ID: <e9c6599c-756d-f2e2-d846-82d7c0978926@suse.com> (raw)
In-Reply-To: <87o7n95hcr.fsf@oracle.com>

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

  reply	other threads:[~2023-04-28  6:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 17:31 [COMMITTED 1/3] gas: support for the BPF pseudo-c assembly syntax Jose E. Marchesi
2023-04-26 17:31 ` [COMMITTED 2/3] gas: BPF pseudo-c syntax tests Jose E. Marchesi
2023-04-27  8:26   ` Jan Beulich
2023-04-27  9:59     ` Jose E. Marchesi
2023-04-27 10:05       ` Jan Beulich
2023-04-27 18:07         ` Jose E. Marchesi
2023-04-28  6:10           ` Jan Beulich [this message]
2023-04-26 17:31 ` [COMMITTED 3/3] gas: documentation for the BPF pseudo-c asm syntax Jose E. Marchesi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9c6599c-756d-f2e2-d846-82d7c0978926@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=jose.marchesi@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).