<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks for your comments, I have modified the patch to V2.<br>
    <br>
    <div class="moz-cite-prefix">On 02/19/2016 12:09 AM, Dmitry V. Levin
      wrote:<br>
    </div>
    <blockquote cite="mid:20160218160908.GF9931@altlinux.org"
      type="cite">
      <pre wrap="">On Thu, Feb 18, 2016 at 04:04:57PM +0800, Fei Jie wrote:
[...]
</pre>
      <blockquote type="cite">
        <pre wrap="">diff --git a/tests/getrusage.c b/tests/getrusage.c
new file mode 100644
index 0000000..eea0168
--- /dev/null
+++ b/tests/getrusage.c
@@ -0,0 +1,38 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_getrusage
+
+#include <sched.h>
</pre>
      </blockquote>
      <pre wrap="">
Do you really need <sched.h> to test getrusage?

</pre>
      <blockquote type="cite">
        <pre wrap="">+#include <stdio.h>
+#include <sys/resource.h>
+#include <unistd.h>
</pre>
      </blockquote>
      <pre wrap="">
Please indent.

</pre>
      <blockquote type="cite">
        <pre wrap="">+
+int
+main(void)
+{
+       struct rusage usage;
+       int rc = syscall(__NR_getrusage, RUSAGE_SELF, &usage);
+       printf("getrusage(RUSAGE_SELF, {ru_utime={%ld, %ld}"
+              ", ru_stime={%ld, %ld}, ru_maxrss=%ld, ru_ixrss=%ld"
+              ", ru_idrss=%ld, ru_isrss=%ld, ru_minflt=%ld"
+              ", ru_majflt=%ld, ru_nswap=%ld, ru_inblock=%ld"
+              ", ru_oublock=%ld, ru_msgsnd=%ld, ru_msgrcv=%ld"
+              ", ru_nsignals=%ld, ru_nvcsw=%ld, ru_nivcsw=%ld}) = %d\n",
+              usage.ru_utime.tv_sec, usage.ru_utime.tv_usec,
+              usage.ru_stime.tv_sec, usage.ru_stime.tv_usec,
+              usage.ru_maxrss, usage.ru_ixrss, usage.ru_idrss,
+              usage.ru_isrss, usage.ru_minflt, usage.ru_majflt,
+              usage.ru_nswap, usage.ru_inblock, usage.ru_oublock,
+              usage.ru_msgsnd, usage.ru_msgrcv, usage.ru_nsignals,
+              usage.ru_nvcsw, usage.ru_nivcsw, rc);
</pre>
      </blockquote>
      <pre wrap="">
While all integer members of struct rusage have type "long",
I believe they should be printed using "%lu" format instead of "%ld".


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
<a class="moz-txt-link-freetext" href="http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140">http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Strace-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Strace-devel@lists.sourceforge.net">Strace-devel@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/strace-devel">https://lists.sourceforge.net/lists/listinfo/strace-devel</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thanks!
Fei Jie</pre>
  </body>
</html>