qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v2] linux-user: preserve incoming order of environment variables in the target
Date: Wed, 29 Mar 2023 16:53:03 +0200	[thread overview]
Message-ID: <mvmpm8rsj74.fsf@suse.de> (raw)
In-Reply-To: <9e0612a6-cfad-bcb3-8699-faa7e8588349@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Wed, 29 Mar 2023 16:02:52 +0200")

On Mär 29 2023, Philippe Mathieu-Daudé wrote:

> On 29/3/23 16:00, Daniel P. Berrangé wrote:
>> On Wed, Mar 29, 2023 at 03:55:13PM +0200, Andreas Schwab wrote:
>>> Do not reverse the order of environment variables in the target environ
>>> array relative to the incoming environ order.  Some testsuites depend on a
>>> specific order, even though it is not defined by any standard.
>>>
>>> Signed-off-by: Andreas Schwab <schwab@suse.de>
>>> ---
>>>   linux-user/main.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>> bsd-user/main.c appears to have an identical code pattern that
>> will need the same fix
>> 
>>>
>>> diff --git a/linux-user/main.c b/linux-user/main.c
>>> index 4b18461969..dbfd3ee8f1 100644
>>> --- a/linux-user/main.c
>>> +++ b/linux-user/main.c
>>> @@ -691,7 +691,13 @@ int main(int argc, char **argv, char **envp)
>>>       envlist = envlist_create();
>>>         /* add current environment into the list */
>>> +    /* envlist_setenv adds to the front of the list; to preserve environ
>>> +       order add from back to front */
>
> Also, QEMU coding style now requires:
>
>   /*
>    * this comment form.
>    */

It's unfortunate that the next comment just below doesn't follow the
correct style, so I didn't notice.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


  reply	other threads:[~2023-03-29 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 13:55 [PATCH v2] linux-user: preserve incoming order of environment variables in the target Andreas Schwab
2023-03-29 14:00 ` Daniel P. Berrangé
2023-03-29 14:02   ` Philippe Mathieu-Daudé
2023-03-29 14:53     ` Andreas Schwab [this message]
2023-03-29 14:04   ` Andreas Schwab
2023-03-29 14:12     ` Daniel P. Berrangé
2023-03-29 14:06   ` Warner Losh

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=mvmpm8rsj74.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=berrange@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=philmd@linaro.org \
    --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).