linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file
@ 2019-08-05 17:01 Steven Rostedt
  2019-08-13 21:21 ` Steven Rostedt
  2019-08-19 14:39 ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2019-08-05 17:01 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Peter Zijlstra, Arnaldo Carvalho de Melo, Jiri Olsa,
	Alexander Shishkin, Wang Nan, He Kuang, Michal Marek,
	Uwe Kleine-König, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros, Tzvetomir Stoyanov

[
  Not sure why I wasn't Cc'd on the original patch (or the one before that)
  but I guess I need to add tools/lib/traceevent under MAINTAINERs for
  perhaps tracing?
]

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The tools/lib/traceevent/Makefile had a test added to it to detect a failure
of the "nm" when making the dynamic list file (whatever that is). The
problem is that the test sorts the values "U W w" and some versions of sort
will place "w" ahead of "W" (even though it has a higher ASCII value, and
break the test.

Add 'tr "w" "W"' to merge the two and not worry about the ordering.

Cc: stable@vger.kernel.org
Fixes: 6467753d61399 ("tools lib traceevent: Robustify do_generate_dynamic_list_file")
Reported-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 3292c290654f..8352d53dcb5a 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -266,8 +266,8 @@ endef
 
 define do_generate_dynamic_list_file
 	symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
-	xargs echo "U W w" | tr ' ' '\n' | sort -u | xargs echo`;\
-	if [ "$$symbol_type" = "U W w" ];then				\
+	xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
+	if [ "$$symbol_type" = "U W" ];then				\
 		(echo '{';						\
 		$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
 		echo '};';						\
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file
  2019-08-05 17:01 [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file Steven Rostedt
@ 2019-08-13 21:21 ` Steven Rostedt
  2019-08-13 21:35   ` Arnaldo Carvalho de Melo
  2019-08-19 14:39 ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2019-08-13 21:21 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Peter Zijlstra, Arnaldo Carvalho de Melo, Jiri Olsa,
	Alexander Shishkin, Wang Nan, He Kuang, Michal Marek,
	Uwe Kleine-König, Stephane Eranian, Paul Turner,
	David Carrillo-Cisneros, Tzvetomir Stoyanov

On Mon, 5 Aug 2019 13:01:50 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> [
>   Not sure why I wasn't Cc'd on the original patch (or the one before that)
>   but I guess I need to add tools/lib/traceevent under MAINTAINERs for
>   perhaps tracing?
> ]
> 

Ping?

-- Steve

> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> The tools/lib/traceevent/Makefile had a test added to it to detect a failure
> of the "nm" when making the dynamic list file (whatever that is). The
> problem is that the test sorts the values "U W w" and some versions of sort
> will place "w" ahead of "W" (even though it has a higher ASCII value, and
> break the test.
> 
> Add 'tr "w" "W"' to merge the two and not worry about the ordering.
> 
> Cc: stable@vger.kernel.org
> Fixes: 6467753d61399 ("tools lib traceevent: Robustify do_generate_dynamic_list_file")
> Reported-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>  tools/lib/traceevent/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> index 3292c290654f..8352d53dcb5a 100644
> --- a/tools/lib/traceevent/Makefile
> +++ b/tools/lib/traceevent/Makefile
> @@ -266,8 +266,8 @@ endef
>  
>  define do_generate_dynamic_list_file
>  	symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
> -	xargs echo "U W w" | tr ' ' '\n' | sort -u | xargs echo`;\
> -	if [ "$$symbol_type" = "U W w" ];then				\
> +	xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
> +	if [ "$$symbol_type" = "U W" ];then				\
>  		(echo '{';						\
>  		$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
>  		echo '};';						\


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file
  2019-08-13 21:21 ` Steven Rostedt
@ 2019-08-13 21:35   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-08-13 21:35 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Ingo Molnar, Peter Zijlstra, Jiri Olsa, Alexander Shishkin,
	Wang Nan, He Kuang, Michal Marek, Uwe Kleine-König,
	Stephane Eranian, Paul Turner, David Carrillo-Cisneros,
	Tzvetomir Stoyanov

Em Tue, Aug 13, 2019 at 05:21:12PM -0400, Steven Rostedt escreveu:
> On Mon, 5 Aug 2019 13:01:50 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > [
> >   Not sure why I wasn't Cc'd on the original patch (or the one before that)
> >   but I guess I need to add tools/lib/traceevent under MAINTAINERs for
> >   perhaps tracing?
> > ]
> > 
> 
> Ping?

Will apply later today, thanks,

- Arnaldo
 
> -- Steve
> 
> > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> > 
> > The tools/lib/traceevent/Makefile had a test added to it to detect a failure
> > of the "nm" when making the dynamic list file (whatever that is). The
> > problem is that the test sorts the values "U W w" and some versions of sort
> > will place "w" ahead of "W" (even though it has a higher ASCII value, and
> > break the test.
> > 
> > Add 'tr "w" "W"' to merge the two and not worry about the ordering.
> > 
> > Cc: stable@vger.kernel.org
> > Fixes: 6467753d61399 ("tools lib traceevent: Robustify do_generate_dynamic_list_file")
> > Reported-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > ---
> >  tools/lib/traceevent/Makefile | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> > index 3292c290654f..8352d53dcb5a 100644
> > --- a/tools/lib/traceevent/Makefile
> > +++ b/tools/lib/traceevent/Makefile
> > @@ -266,8 +266,8 @@ endef
> >  
> >  define do_generate_dynamic_list_file
> >  	symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
> > -	xargs echo "U W w" | tr ' ' '\n' | sort -u | xargs echo`;\
> > -	if [ "$$symbol_type" = "U W w" ];then				\
> > +	xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
> > +	if [ "$$symbol_type" = "U W" ];then				\
> >  		(echo '{';						\
> >  		$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
> >  		echo '};';						\

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file
  2019-08-05 17:01 [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file Steven Rostedt
  2019-08-13 21:21 ` Steven Rostedt
@ 2019-08-19 14:39 ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-08-19 14:39 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Ingo Molnar, Peter Zijlstra, Jiri Olsa, Alexander Shishkin,
	Wang Nan, He Kuang, Michal Marek, Uwe Kleine-König,
	Stephane Eranian, Paul Turner, David Carrillo-Cisneros,
	Tzvetomir Stoyanov

Em Mon, Aug 05, 2019 at 01:01:50PM -0400, Steven Rostedt escreveu:
> [
>   Not sure why I wasn't Cc'd on the original patch (or the one before that)
>   but I guess I need to add tools/lib/traceevent under MAINTAINERs for
>   perhaps tracing?
> ]
> 
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> The tools/lib/traceevent/Makefile had a test added to it to detect a failure
> of the "nm" when making the dynamic list file (whatever that is). The
> problem is that the test sorts the values "U W w" and some versions of sort
> will place "w" ahead of "W" (even though it has a higher ASCII value, and
> break the test.
> 
> Add 'tr "w" "W"' to merge the two and not worry about the ordering.

Thanks, applied.

- Arnaldo
 
> Cc: stable@vger.kernel.org
> Fixes: 6467753d61399 ("tools lib traceevent: Robustify do_generate_dynamic_list_file")
> Reported-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>  tools/lib/traceevent/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> index 3292c290654f..8352d53dcb5a 100644
> --- a/tools/lib/traceevent/Makefile
> +++ b/tools/lib/traceevent/Makefile
> @@ -266,8 +266,8 @@ endef
>  
>  define do_generate_dynamic_list_file
>  	symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
> -	xargs echo "U W w" | tr ' ' '\n' | sort -u | xargs echo`;\
> -	if [ "$$symbol_type" = "U W w" ];then				\
> +	xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
> +	if [ "$$symbol_type" = "U W" ];then				\
>  		(echo '{';						\
>  		$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
>  		echo '};';						\
> -- 
> 2.20.1

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-19 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 17:01 [PATCH] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file Steven Rostedt
2019-08-13 21:21 ` Steven Rostedt
2019-08-13 21:35   ` Arnaldo Carvalho de Melo
2019-08-19 14:39 ` Arnaldo Carvalho de Melo

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).