From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Demin Han <demin.han@starfivetech.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "alex.bennee@linaro.org" <alex.bennee@linaro.org>,
"erdnaxe@crans.org" <erdnaxe@crans.org>,
"ma.mandourr@gmail.com" <ma.mandourr@gmail.com>
Subject: Re: [PATCH] plugins: add plugin API to get args passed to binary
Date: Mon, 4 Nov 2024 20:28:47 -0800 [thread overview]
Message-ID: <e9dec598-1ee3-4cf8-b6c9-f9fe07b48d79@linaro.org> (raw)
In-Reply-To: <ZQ0PR01MB106328C5544D5AD7E3C00A2585522@ZQ0PR01MB1063.CHNPR01.prod.partner.outlook.cn>
On 11/4/24 19:53, Demin Han wrote:
>>
>> It seems that you already have a wrapper script (qemu-risv64.sh). You can
>> replace it and read command line from $@, which contains the command
>> passed to it.
>
>>>> In the case of llvm-test-suite, you can set TEST_SUITE_RUN_UNDER to a
>>>> wrapper adding a specific plugin, its options, and generating the log
>>>> filename as expected.
>>>
>>> We cant set TEST_SUITE_RUN_UNDER="qemu-riscv64 --plugin
>> /xxx/libxxx.so -L xxx".
>>> We have no any information about binary under test even binary name.
>>> We can get binary name in plugin using qemu_plugin_path_to_binary, but
>> can't solve the issue mentioned in commit msg.
>>>
>>
>> If you pass a script instead, calling the same command, you can get access to
>> command line by reading the content of $@.
>>
>
> Thanks.
> I think this can work.
> Add a arg to plugin and pass the parsed $@ to it.
>
It would be the most flexible, as you can do any pre/post transformation
on input/output. It should provide exactly what you are looking for,
instead of doing complex output in C in your plugin.
> Regards,
> Demin
Let us know if you found a satisfying solution.
Regards,
Pierrick
next prev parent reply other threads:[~2024-11-05 4:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 5:10 [PATCH] plugins: add plugin API to get args passed to binary Demin Han
2024-11-04 21:21 ` Pierrick Bouvier
2024-11-05 2:29 ` Demin Han
2024-11-05 2:49 ` Pierrick Bouvier
2024-11-05 3:31 ` Demin Han
2024-11-05 3:44 ` Pierrick Bouvier
2024-11-05 3:53 ` Demin Han
2024-11-05 4:28 ` Pierrick Bouvier [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-01 9:00 demin.han
2024-11-01 18:18 ` Pierrick Bouvier
2025-01-09 11:58 ` Alex Bennée
2025-01-10 1:24 ` Demin Han
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=e9dec598-1ee3-4cf8-b6c9-f9fe07b48d79@linaro.org \
--to=pierrick.bouvier@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=demin.han@starfivetech.com \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 NNTP newsgroup(s).