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
[email protected]
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list