From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
rcu@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Josh Triplett <josh@joshtriplett.org>
Subject: Re: [PATCH] tools/rcutorture: Make identify_qemu_vcpus() independant of local language
Date: Fri, 20 Nov 2020 00:03:03 +0100 [thread overview]
Message-ID: <20201119230303.GA31371@lothringen> (raw)
In-Reply-To: <20201119215903.GD1437@paulmck-ThinkPad-P72>
On Thu, Nov 19, 2020 at 01:59:03PM -0800, Paul E. McKenney wrote:
> On Thu, Nov 19, 2020 at 01:30:24AM +0100, Frederic Weisbecker wrote:
> > The implementation expects `lscpu` to have a "CPU: " line, for example:
> >
> > CPU(s): 8
> >
> > But some local language settings may advocate for their own version:
> >
> > Processeur(s) : 8
> >
> > As a result the function may return an empty string and rcutorture would
> > dump the following warning (still with the local taste):
> >
> > kvm-test-1-run.sh: ligne 138 : test: : nombre entier attendu comme expression
> >
> > Just use a command whose output every language agree with.
> >
> > Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
> > Cc: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Josh Triplett <josh@joshtriplett.org>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Cc: Lai Jiangshan <jiangshanlai@gmail.com>
> > Cc: rcu@vger.kernel.org
>
> Queued for review and testing, thank you! As usual, I could not resist
> the urge to edit a bit, so please let me know if I messed anything up.
>
> If there are too many of these, it might be easier for kvm.sh to switch
> itself to EN-US mode, but this change both simplified the code and helped
> defend the purity of the French language, so steady as she goes! ;-)
We aligned the stars!
> commit 655f941b96cbfc6f8869142ece092d8617425948
> Author: Frederic Weisbecker <frederic@kernel.org>
> Date: Thu Nov 19 01:30:24 2020 +0100
>
> tools/rcutorture: Make identify_qemu_vcpus() independent of local language
>
> The rcutorture scripts' identify_qemu_vcpus() function expects `lscpu`
> to have a "CPU: " line, for example:
>
> CPU(s): 8
>
> But different local language settings can give different results:
>
> Processeur(s) : 8
>
> As a result, identify_qemu_vcpus() may return an empty string, resulting
> in the following warning (with the same local language settings):
>
> kvm-test-1-run.sh: ligne 138 : test: : nombre entier attendu comme expression
>
> This commit therefore changes identify_qemu_vcpus() to use getconf,
> which produces local-language-independend output.
>
> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
> Cc: Paul E. McKenney <paulmck@kernel.org>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Lai Jiangshan <jiangshanlai@gmail.com>
> Cc: rcu@vger.kernel.org
Even better, Thanks!
prev parent reply other threads:[~2020-11-19 23:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 0:30 [PATCH] tools/rcutorture: Make identify_qemu_vcpus() independant of local language Frederic Weisbecker
2020-11-19 21:59 ` Paul E. McKenney
2020-11-19 23:03 ` Frederic Weisbecker [this message]
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=20201119230303.GA31371@lothringen \
--to=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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