<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 10, 2019 at 4:33 PM Li Wang <<a href="mailto:liwan@redhat.com">liwan@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-size:small"><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ping Fang <<a href="mailto:pifang@redhat.com" target="_blank">pifang@redhat.com</a>> wrote:<br></div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ac_version = ACCT_VERION | ACCT_BYTEORDER<br>
which is 0x83 (131) on big endian system.<br>
<br>
failure output:<br>
tst_kconfig.c:62: INFO: Parsing kernel config<br>
'/boot/config-4.18.0-147.el8.s390x'<br>
tst_test.c:1118: INFO: Timeout per run is 0h 05m 00s<br>
tst_kconfig.c:62: INFO: Parsing kernel config<br>
'/boot/config-4.18.0-147.el8.s390x'<br>
acct02.c:239: INFO: Verifying using 'struct acct_v3'<br>
acct02.c:192: INFO: == entry 1 ==<br>
acct02.c:147: INFO: ac_version != 3 (131)<br>
<span class="gmail_default" style="font-size:small"></span>acct02.c:192: INFO: == entry 2 ==<br>
acct02.c:82: INFO: ac_comm != 'acct02_helper' ('acct02')<br>
acct02.c:133: INFO: ac_exitcode != 32768 (0)<br>
acct02.c:141: INFO: ac_ppid != 34501 (34500)<br>
acct02.c:147: INFO: ac_version != 3 (131)<br>
acct02.c:182: FAIL: end of file reached<br></blockquote><div><br></div><div><div style="font-size:small">I'm wondering that is there any necessary to use do{}...while loop for entry many times? Since the verify_acct() only check the dummy program(acct02_helper) accounting struct. So in the error logs, we could see some meaningless data(acct02) in entry 2.</div></div></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">It turns out I was wrong, if accounting is turned on, system records for each terminating process but not only for that process, so we need to pick up the correct acct_struct in acct_file via the while loop.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Sorry for making noise, I pull back my comments here.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Regards,<br>Li Wang<br></div></div></div></div></div>