<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, May 30, 2019 at 5:11 PM Caspar Zhang <<a href="mailto:caspar@linux.alibaba.com">caspar@linux.alibaba.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">We don't want the test reporting TCONF if at least one TPASS existed<br>
during testing. And this is also true in shell tests. So fix it.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">PATCH 3/3 makes sense to me.</div><br></div><div class="gmail_default" style="font-size:small">Reviewed-by: Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>></div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Signed-off-by: Caspar Zhang <<a href="mailto:caspar@linux.alibaba.com" target="_blank">caspar@linux.alibaba.com</a>><br>
---<br>
testcases/lib/test.sh | 9 +++++++++<br>
testcases/lib/tst_test.sh | 2 +-<br>
2 files changed, 10 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh<br>
index ade8fcdff..7cc3bb2fe 100644<br>
--- a/testcases/lib/test.sh<br>
+++ b/testcases/lib/test.sh<br>
@@ -23,6 +23,7 @@<br>
<br>
export LTP_RET_VAL=0<br>
export TST_COUNT=1<br>
+export TST_PASS_COUNT=0<br>
export TST_LIB_LOADED=1<br>
export TST_TMPDIR_RHOST=0<br>
<br>
@@ -60,6 +61,10 @@ tst_resm()<br>
case "$ret" in<br>
TPASS|TFAIL|TCONF) TST_COUNT=$((TST_COUNT+1));;<br>
esac<br>
+<br>
+ if [ "$ret" = TPASS ]; then<br>
+ TST_PASS_COUNT=$((TST_PASS_COUNT+1))<br>
+ fi<br>
}<br>
<br>
tst_brkm()<br>
@@ -111,6 +116,10 @@ tst_exit()<br>
rm -f "$LTP_IPC_PATH"<br>
fi<br>
<br>
+ # Mask out TCONF if no TFAIL/TBROK/TWARN but has TPASS<br>
+ if [ $((LTP_RET_VAL & 7)) -eq 0 -a $TST_PASS_COUNT -gt 0 ]; then<br>
+ LTP_RET_VAL=$((LTP_RET_VAL & ~32))<br>
+ fi<br>
# Mask out TINFO<br>
exit $((LTP_RET_VAL & ~16))<br>
}<br>
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh<br>
index 512732315..bf725fdde 100644<br>
--- a/testcases/lib/tst_test.sh<br>
+++ b/testcases/lib/tst_test.sh<br>
@@ -78,7 +78,7 @@ _tst_do_exit()<br>
ret=$((ret|4))<br>
fi<br>
<br>
- if [ $TST_CONF -gt 0 ]; then<br>
+ if [ $TST_CONF -gt 0 -a $TST_PASS -eq 0 ]; then<br>
ret=$((ret|32))<br>
fi<br>
<br>
-- <br>
2.21.0<br>
<br>
<br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/listinfo/ltp</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>