lkml.org 
[lkml]   [2018]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/4] perf tools: Fix check-headers.sh output file variables
<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Mon, Jul 23, 2018, 08:01 Jiri Olsa &lt;<a href="mailto:jolsa@redhat.com">jolsa@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jul 20, 2018 at 06:22:49PM +0300, Alexander Kapshuk wrote:<br>
&gt; On Fri, Jul 20, 2018 at 6:16 PM Jiri Olsa &lt;<a href="mailto:jolsa@redhat.com" target="_blank" rel="noreferrer">jolsa@redhat.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; On Fri, Jul 20, 2018 at 11:57:45AM -0300, Arnaldo Carvalho de Melo wrote:<br>
&gt; &gt; &gt; Em Fri, Jul 20, 2018 at 01:00:35PM +0200, Jiri Olsa escreveu:<br>
&gt; &gt; &gt; &gt; The warning message in check_w function uses wrongly<br>
&gt; &gt; &gt; &gt; the $file variable instead of $file1 and $file2.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Humm,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Before:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Warning: Kernel ABI header at &#39;tools/arch/powerpc/include/uapi/asm/unistd.h&#39; differs from latest version at &#39;arch/powerpc/include/uapi/asm/unistd.h&#39;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; After:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Warning: Kernel ABI header at &#39;../arch/powerpc/include/uapi/asm/unistd.h&#39; differs from latest version at &#39;../../arch/powerpc/include/uapi/asm/unistd.h&#39;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The previous version is better, I can then just use:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; diff -u tools/arch/powerpc/include/uapi/asm/unistd.h arch/powerpc/include/uapi/asm/unistd.h<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and get what changed, with your change I have to go to tools/perf before<br>
&gt; &gt; &gt; doing that diff, which is an unnecessary extra step in at least my<br>
&gt; &gt; &gt; workflow.<br>
&gt; &gt;<br>
&gt; &gt; so all paths output based in kernel tree root then, will change<br>
&gt; &gt;<br>
&gt; &gt; jirka<br>
&gt; <br>
&gt; I was going to ask about this in a separate email initially, but then<br>
&gt; thought I&#39;d use this email exchange instead, as my question is about<br>
&gt; the code in question. Hope you don&#39;t mind.<br>
&gt; <br>
&gt; If I&#39;m reading this right, the intended behavoir of the block of code<br>
&gt; below is to test file2 for existance, and if it exists, to evaluate $cmd.<br>
&gt; If file1 and file2 are found to differ, print the warning.<br>
&gt; <br>
&gt; test -f $file2 &amp;&amp;<br>
&gt;   eval $cmd || echo &quot;Warning: Kernel ABI header at &#39;tools/$file&#39;<br>
&gt; differs from latest version at &#39;$file&#39;&quot; &gt;&amp;2<br>
&gt; <br>
&gt; The &#39;||&#39; path of execution is however also taken if file2 doesn&#39;t exist,<br>
&gt; which is probably very unlikely to happen. See below.<br>
&gt; <br>
&gt; % file1=file1; file2=file2<br>
&gt; % cmd=&quot;echo diff $file1 $file2&quot;<br>
&gt; % test -f $file2 &amp;&amp;<br>
&gt; eval $cmd || echo &quot;Warning: Kernel ABI header at &#39;tools/$file1&#39;<br>
&gt; differs from latest version at &#39;$file2&#39;&quot; &gt;&amp;2<br>
&gt; Warning: Kernel ABI header at &#39;tools/file1&#39; differs from latest<br>
&gt; version at &#39;file2&#39;<br>
&gt; <br>
&gt; Is this something you would rather leave as is, or perhaps use something<br>
&gt; along the lines of the code below instead:<br>
&gt; <br>
&gt; test -f $file2 &amp;&amp; {<br>
&gt; eval $cmd ||<br>
&gt; echo &quot;Warning: Kernel ABI header at &#39;tools/$file&#39; differs from latest<br>
&gt; version at &#39;$file&#39;&quot; &gt;&amp;2<br>
&gt; }<br>
<br>
hi,<br>
yea, probably..  please feel free to post a patch.. just make sure all<br>
the displayed files paths are based on the kernel root<br>
<br>
thanks,<br>
jirka<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I&#39;m away traveling till August 10th, and I may not be able to send the patch in until I get back. Is that OK?</div><div dir="auto">Thanks.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>
\
 
 \ /
  Last update: 2018-07-24 09:20    [W:0.188 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site