public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Cui Bixuan <cuibixuan@huawei.com>
Cc: zhuyanpeng@huawei.com, ltp-list@lists.sourceforge.net,
	zhanyongming@huawei.com
Subject: Re: [LTP] [PATCH v4 1/2] syscalls/utimensat01: Use test.sh library for test case
Date: Wed, 22 Apr 2015 16:04:05 +0200	[thread overview]
Message-ID: <20150422140404.GA32660@rei> (raw)
In-Reply-To: <552D1041.9010103@huawei.com>

>  echo "Total tests: $test_num; passed: $passed_cnt; failed: $failed_cnt"
>  if test $failed_cnt -gt 0; then
>      echo "Failed tests: $failed_list"
> -    exit -1
> +    tst_resm TFAIL "test failed"
>  fi
> 
> -exit
> +tst_resm TPASS "test pass"

The tst_resm TPASS should be in the else part of the if above, otherwise
the test will print both failure and success in case that failed_cnt is
greater than zero.

And changing the check_result() to call tst_resm TFAIL/TPASS directly
would be even better. In that case this part will call only tst_exit as
the pass/fail status will be saved by the test library.

> +tst_exit
> -- 1.6.0.2

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2015-04-22 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  3:16 [LTP] [PATCH] syscalls/utimensat01: "chattr" command error cuibixuan
2015-04-01 14:33 ` Cyril Hrubis
     [not found]   ` <551CB5CD.5030903@huawei.com>
2015-04-02  8:33     ` [LTP] [PATCH v2] " Cyril Hrubis
     [not found]       ` <552D1041.9010103@huawei.com>
2015-04-22 14:04         ` Cyril Hrubis [this message]
     [not found]           ` <55399C3A.70800@huawei.com>
2015-04-28 12:39             ` [LTP] [PATCH v5 1/2] syscalls/utimensat01: Use test.sh library for test case Cyril Hrubis
     [not found]       ` <552D112E.4040104@huawei.com>
2015-04-22 14:06         ` [LTP] [PATCH v4 2/2] syscalls/utimensat01: "chattr" command error Cyril Hrubis
     [not found]           ` <55399C8E.40608@huawei.com>
2015-04-28 12:39             ` [LTP] [PATCH v5 " Cyril Hrubis
     [not found]               ` <55402B94.9010407@huawei.com>
2015-05-04 11:35                 ` [LTP] [PATCH v6 " Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150422140404.GA32660@rei \
    --to=chrubis@suse.cz \
    --cc=cuibixuan@huawei.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=zhanyongming@huawei.com \
    --cc=zhuyanpeng@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox