zdtm.py --keep-going output

Submitted by Adrian Reber on March 20, 2018, 4:02 p.m.

Details

Message ID 20180320160236.GB29842@lisas.de
State New
Series "zdtm.py --keep-going output"
Headers show

Commit Message

Adrian Reber March 20, 2018, 4:02 p.m.
Hello Andrei,

I just saw that the --keep-going output has switched back to printing

 * testname(unkown)

instead of:

     ################### 2 TEST(S) FAILED (TOTAL 297/SKIPPED 34) ####################
      * zdtm/static/sched_policy00(ns)
      * zdtm/static/cgroup02(h)
     ##################################### FAIL #####################################

This is caused by your commit:

commit 5785dbd93dec20f56a89245b94f6fde28cd098ac
Author: Andrei Vagin <avagin@virtuozzo.com>
Date:   Thu Oct 26 00:27:43 2017 +0300

    zdtm.py: fix decode_flav()
    
    Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>


decode_flav was already changed from the working code with commit

commit c9ca83f05ae30810bd90e092dfc98fa7afe310b9
Author: Andrei Vagin <avagin@openvz.org>
Date:   Mon Oct 23 09:57:48 2017 -0700


The get() method requires a key and now we are using an index. That
will never work correctly as it is now.

Any reasons for your change? Or could we change it back?

		Adrian

Patch hide | download patch | download mbox

diff --git a/test/zdtm.py b/test/zdtm.py
index efed134..d3e0c9a 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -293,7 +293,7 @@  def encode_flav(f):
 
 
 def decode_flav(i):
-       return flavors.keys().get([i - 128], "unknown")
+       return flavors.get(i - 128, "unknown")
 
 
 def tail(path):