* Re: [LTP] [PATCH] ltp-pan.c: fix error of Total Tests
[not found] <4F2CE53D.9030908@cn.fujitsu.com>
@ 2012-05-16 14:53 ` Cyril Hrubis
[not found] ` <1337219962-5782-1-git-send-email-penght@cn.fujitsu.com>
0 siblings, 1 reply; 10+ messages in thread
From: Cyril Hrubis @ 2012-05-16 14:53 UTC (permalink / raw)
To: Peng Haitao; +Cc: LTP List
Hi!
> When execvp() fails, the testcases is counted in Total Tests, but not added in
> logfile. In fact the testcases result should be added in logfile.
> static pid_t
> -run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode)
> +run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode,
> + int *failcnt, int fmt_print, FILE * logfile)
> {
> ssize_t errlen;
> int cpid;
> @@ -978,6 +982,26 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode)
> termtype = "unknown";
> }
> time(&end_time);
> + if (logfile != NULL) {
> + if (!fmt_print)
> + fprintf(logfile,
> + "tag=%s stime=%d dur=%d exit=%s "
> + "stat=%d core=%s cu=%d cs=%d\n",
> + colle->name, (int)(active->mystime),
> + (int) (end_time - active->mystime), termtype,
> + termid, (status & 0200) ? "yes" : "no",
> + 0, 0);
> + else {
I suggest to add curly brackets around the multiline fprintf too.
> + if (termid != 0)
> + ++*failcnt;
> +
> + fprintf(logfile, "%-30.30s %-10.10s %-5d\n",
> + colle->name, ((termid != 0) ? "FAIL" : "PASS"),
> + termid);
> + }
> + fflush(logfile);
> + }
> +
> if (!quiet_mode)
> {
> //write_test_start(active, errbuf);
Otherwise I don't have any objection to adding this into the ltp-pan.
Although I don't understand the messy pan code that much (and I don't
have any intentions to study it more closely).
Do have anybody else an opinion?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
[not found] ` <4FB45E98.3010506@cn.fujitsu.com>
@ 2012-05-17 2:31 ` Garrett Cooper
2012-05-17 2:33 ` Wanlong Gao
0 siblings, 1 reply; 10+ messages in thread
From: Garrett Cooper @ 2012-05-17 2:31 UTC (permalink / raw)
To: gaowanlong; +Cc: ltp-list
On Wed, May 16, 2012 at 7:12 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
> On 05/17/2012 09:59 AM, Peng Haitao wrote:
>
>> When execvp() fails, the testcases is counted in Total Tests, but not
>> added in logfile. In fact the testcases result should be added in logfile.
>
> I prefer adding this for matching the Total Tests amount.
> So,
>
> Acked-by: Wanlong Gao <gaownalong@cn.fujitsu.com>
It's nice that this is finally being fixed. This is one issue that
has been outstanding for several years that needed to be resolved (I
noticed it during/after I developed the execltp python script).
Thanks!
-Garrett
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 2:31 ` [LTP] [PATCH v2] " Garrett Cooper
@ 2012-05-17 2:33 ` Wanlong Gao
2012-05-17 2:39 ` Garrett Cooper
0 siblings, 1 reply; 10+ messages in thread
From: Wanlong Gao @ 2012-05-17 2:33 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
On 05/17/2012 10:31 AM, Garrett Cooper wrote:
> On Wed, May 16, 2012 at 7:12 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
>> On 05/17/2012 09:59 AM, Peng Haitao wrote:
>>
>>> When execvp() fails, the testcases is counted in Total Tests, but not
>>> added in logfile. In fact the testcases result should be added in logfile.
>>
>> I prefer adding this for matching the Total Tests amount.
>> So,
>>
>> Acked-by: Wanlong Gao <gaownalong@cn.fujitsu.com>
>
> It's nice that this is finally being fixed. This is one issue that
> has been outstanding for several years that needed to be resolved (I
> noticed it during/after I developed the execltp python script).
So, Garrett, you can ACK this?
Thanks,
Wanlong Gao
> Thanks!
> -Garrett
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 2:33 ` Wanlong Gao
@ 2012-05-17 2:39 ` Garrett Cooper
2012-05-17 2:40 ` Garrett Cooper
0 siblings, 1 reply; 10+ messages in thread
From: Garrett Cooper @ 2012-05-17 2:39 UTC (permalink / raw)
To: gaowanlong; +Cc: ltp-list
On Wed, May 16, 2012 at 7:33 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
> On 05/17/2012 10:31 AM, Garrett Cooper wrote:
>
>> On Wed, May 16, 2012 at 7:12 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
>>> On 05/17/2012 09:59 AM, Peng Haitao wrote:
>>>
>>>> When execvp() fails, the testcases is counted in Total Tests, but not
>>>> added in logfile. In fact the testcases result should be added in logfile.
>>>
>>> I prefer adding this for matching the Total Tests amount.
>>> So,
>>>
>>> Acked-by: Wanlong Gao <gaownalong@cn.fujitsu.com>
>>
>> It's nice that this is finally being fixed. This is one issue that
>> has been outstanding for several years that needed to be resolved (I
>> noticed it during/after I developed the execltp python script).
>
>
> So, Garrett, you can ACK this?
I will ACK the sentiment, but I prefer to test it in order to ensure
that it actually works...
You can easily trigger this problem with the following spoofed runtest scenario:
aok echo "hello"
donotexist donotexist
exit_quickly exit 1
true true
The first will fail success with "hello" output, the second should
fail with ENOENT, the third will fail without output, and the fourth
should success with output.
If this functions as I described above, I'll be more than happy to ACK
the patch.
Thanks!
-Garrett
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 2:39 ` Garrett Cooper
@ 2012-05-17 2:40 ` Garrett Cooper
2012-05-17 2:47 ` Peng Haitao
0 siblings, 1 reply; 10+ messages in thread
From: Garrett Cooper @ 2012-05-17 2:40 UTC (permalink / raw)
To: gaowanlong; +Cc: ltp-list
On Wed, May 16, 2012 at 7:39 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> On Wed, May 16, 2012 at 7:33 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
>> On 05/17/2012 10:31 AM, Garrett Cooper wrote:
>>
>>> On Wed, May 16, 2012 at 7:12 PM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
>>>> On 05/17/2012 09:59 AM, Peng Haitao wrote:
>>>>
>>>>> When execvp() fails, the testcases is counted in Total Tests, but not
>>>>> added in logfile. In fact the testcases result should be added in logfile.
>>>>
>>>> I prefer adding this for matching the Total Tests amount.
>>>> So,
>>>>
>>>> Acked-by: Wanlong Gao <gaownalong@cn.fujitsu.com>
>>>
>>> It's nice that this is finally being fixed. This is one issue that
>>> has been outstanding for several years that needed to be resolved (I
>>> noticed it during/after I developed the execltp python script).
>>
>>
>> So, Garrett, you can ACK this?
>
> I will ACK the sentiment, but I prefer to test it in order to ensure
> that it actually works...
>
> You can easily trigger this problem with the following spoofed runtest scenario:
>
> aok echo "hello"
> donotexist donotexist
> exit_quickly exit 1
> true true
>
> The first will fail success with "hello" output, the second should
s/fail success/pass/
> fail with ENOENT, the third will fail without output, and the fourth
> should success with output.
>
> If this functions as I described above, I'll be more than happy to ACK
> the patch.
>
> Thanks!
> -Garrett
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 2:40 ` Garrett Cooper
@ 2012-05-17 2:47 ` Peng Haitao
2012-05-17 4:39 ` Garrett Cooper
0 siblings, 1 reply; 10+ messages in thread
From: Peng Haitao @ 2012-05-17 2:47 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
Garrett Cooper said the following on 2012-5-17 10:40:
>> You can easily trigger this problem with the following spoofed runtest scenario:
>>
>> aok echo "hello"
>> donotexist donotexist
>> exit_quickly exit 1
>> true true
>>
The test log is as follows:
Running tests.......
<<<test_start>>>
tag=aok stime=1337251363
cmdline="echo "hello""
contacts=""
analysis=exit
<<<test_output>>>
hello
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=donotexist stime=1337251363
cmdline="donotexist"
contacts=""
analysis=exit
<<<test_output>>>
<<<execution_status>>>
initiation_status="pan(17520): execvp of 'donotexist' (tag donotexist) failed. errno:2 No such file or directory"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=exit_quickly stime=1337251363
cmdline="exit 1"
contacts=""
analysis=exit
<<<test_output>>>
<<<execution_status>>>
initiation_status="pan(17520): execvp of 'exit' (tag exit_quickly) failed. errn o:2 No such file or directory"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=true stime=1337251363
cmdline="true"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>
INFO: ltp-pan reported all tests PASS
LTP Version: 20120401-38-g3d3e94e
###############################################################
Done executing testcases.
LTP Version: 20120401-38-g3d3e94e
###############################################################
# cat results/LTP_RUN_ON-2012_May_17-18h_42m_42s.log
Test Start Time: Thu May 17 18:42:43 2012
-----------------------------------------
Testcase Result Exit Value
-------- ------ ----------
aok PASS 0
donotexist FAIL 2
exit_quickly FAIL 2
true PASS 0
-----------------------------------------------
Total Tests: 4
Total Failures: 2
Kernel Version: 2.6.32-220.el6.x86_64
Machine Architecture: x86_64
Hostname: RHEL6U2-x86-64
Thanks.
--
Best Regards,
Peng Haitao
>> The first will fail success with "hello" output, the second should
>
> s/fail success/pass/
>
>> fail with ENOENT, the third will fail without output, and the fourth
>> should success with output.
>>
>> If this functions as I described above, I'll be more than happy to ACK
>> the patch.
>>
>> Thanks!
>> -Garrett
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 2:47 ` Peng Haitao
@ 2012-05-17 4:39 ` Garrett Cooper
2012-05-17 5:04 ` Peng Haitao
0 siblings, 1 reply; 10+ messages in thread
From: Garrett Cooper @ 2012-05-17 4:39 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On Wed, May 16, 2012 at 7:47 PM, Peng Haitao <penght@cn.fujitsu.com> wrote:
>
> Garrett Cooper said the following on 2012-5-17 10:40:
>>> You can easily trigger this problem with the following spoofed runtest scenario:
>>>
>>> aok echo "hello"
>>> donotexist donotexist
>>> exit_quickly exit 1
>>> true true
>>>
>
> The test log is as follows:
>
> Running tests.......
> <<<test_start>>>
> tag=aok stime=1337251363
> cmdline="echo "hello""
> contacts=""
> analysis=exit
> <<<test_output>>>
> hello
> <<<execution_status>>>
> initiation_status="ok"
> duration=0 termination_type=exited termination_id=0 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=donotexist stime=1337251363
> cmdline="donotexist"
> contacts=""
> analysis=exit
> <<<test_output>>>
> <<<execution_status>>>
> initiation_status="pan(17520): execvp of 'donotexist' (tag donotexist) failed. errno:2 No such file or directory"
> duration=0 termination_type=exited termination_id=2 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=exit_quickly stime=1337251363
> cmdline="exit 1"
> contacts=""
> analysis=exit
> <<<test_output>>>
> <<<execution_status>>>
> initiation_status="pan(17520): execvp of 'exit' (tag exit_quickly) failed. errn o:2 No such file or directory"
I suppose it would have worked, had this actually been a command and
not a shell built-in. Could you please replace 'exit 1' with 'false'?
...
Thanks!
-Garrett
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 4:39 ` Garrett Cooper
@ 2012-05-17 5:04 ` Peng Haitao
2012-05-17 5:52 ` Garrett Cooper
0 siblings, 1 reply; 10+ messages in thread
From: Peng Haitao @ 2012-05-17 5:04 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
Garrett Cooper said the following on 2012-5-17 12:39:
>> <<<test_start>>>
>> tag=exit_quickly stime=1337251363
>> cmdline="exit 1"
>> contacts=""
>> analysis=exit
>> <<<test_output>>>
>> <<<execution_status>>>
>> initiation_status="pan(17520): execvp of 'exit' (tag exit_quickly) failed. errn o:2 No such file or directory"
>
> I suppose it would have worked, had this actually been a command and
> not a shell built-in. Could you please replace 'exit 1' with 'false'?
>
The log is as follows:
<<<test_start>>>
tag=exit_quickly stime=1337259686
cmdline="false"
contacts=""
analysis=exit
<<<test_output>>>
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=0
<<<test_end>>>
# cat /opt/ltp/results/LTP_RUN_ON-2012_May_17-21h_01m_26s.log
Test Start Time: Thu May 17 21:01:26 2012
-----------------------------------------
Testcase Result Exit Value
-------- ------ ----------
aok PASS 0
donotexist FAIL 2
exit_quickly FAIL 1
true PASS 0
-----------------------------------------------
Total Tests: 4
Total Failures: 2
Kernel Version: 2.6.32-220.el6.x86_64
Machine Architecture: x86_64
Hostname: RHEL6U2-x86-64
Thanks.
--
Best Regards,
Peng Haitao
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 5:04 ` Peng Haitao
@ 2012-05-17 5:52 ` Garrett Cooper
2012-05-17 11:05 ` Cyril Hrubis
0 siblings, 1 reply; 10+ messages in thread
From: Garrett Cooper @ 2012-05-17 5:52 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On Wed, May 16, 2012 at 10:04 PM, Peng Haitao <penght@cn.fujitsu.com> wrote:
>
> Garrett Cooper said the following on 2012-5-17 12:39:
>>> <<<test_start>>>
>>> tag=exit_quickly stime=1337251363
>>> cmdline="exit 1"
>>> contacts=""
>>> analysis=exit
>>> <<<test_output>>>
>>> <<<execution_status>>>
>>> initiation_status="pan(17520): execvp of 'exit' (tag exit_quickly) failed. errn o:2 No such file or directory"
>>
>> I suppose it would have worked, had this actually been a command and
>> not a shell built-in. Could you please replace 'exit 1' with 'false'?
>>
>
> The log is as follows:
>
> <<<test_start>>>
> tag=exit_quickly stime=1337259686
> cmdline="false"
> contacts=""
> analysis=exit
> <<<test_output>>>
> <<<execution_status>>>
> initiation_status="ok"
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
LGTM!
Acked-by: Garrett Cooper <yanegomi@gmail.com>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH v2] ltp-pan.c: fix error of Total Tests
2012-05-17 5:52 ` Garrett Cooper
@ 2012-05-17 11:05 ` Cyril Hrubis
0 siblings, 0 replies; 10+ messages in thread
From: Cyril Hrubis @ 2012-05-17 11:05 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
Hi!
Commited, thanks everyone involved ;).
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-05-17 11:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4F2CE53D.9030908@cn.fujitsu.com>
2012-05-16 14:53 ` [LTP] [PATCH] ltp-pan.c: fix error of Total Tests Cyril Hrubis
[not found] ` <1337219962-5782-1-git-send-email-penght@cn.fujitsu.com>
[not found] ` <4FB45E98.3010506@cn.fujitsu.com>
2012-05-17 2:31 ` [LTP] [PATCH v2] " Garrett Cooper
2012-05-17 2:33 ` Wanlong Gao
2012-05-17 2:39 ` Garrett Cooper
2012-05-17 2:40 ` Garrett Cooper
2012-05-17 2:47 ` Peng Haitao
2012-05-17 4:39 ` Garrett Cooper
2012-05-17 5:04 ` Peng Haitao
2012-05-17 5:52 ` Garrett Cooper
2012-05-17 11:05 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox