Skip to content
Snippets Groups Projects
  • Kamil Konieczny's avatar
    a7465d37
    runner: Parse results harder · a7465d37
    Kamil Konieczny authored
    
    Sometimes an error happens in kernel or in test that leaves
    output files in corrupted or incorrect state. While runner or
    resume will just move on to executing next test, when generating
    results it could end up with no results.json
    
      Try processing outputs a little more persistently and use any
    output file left there, even if only dmesg.txt. Also, when no
    useful output files were present, instead of breaking out add
    notrun.
    
      Inform about processing results for each test so a problem
    could be spotted more easily.
    
    v2: removed ')' from 'notrun\n)' (Kamil)
     using bool var, added more prints about errors (Ryszard)
    v3: reused open_for_reading, removed bool var (Krzysztof)
     closing only positive fds[] in close_outputs(), checking
     file sizes also if all opens succeeded (Kamil)
    v4: reverting to v2 and addresing review comments (Krzysztof)
     closing only already opened file, drop early return when empty
     output files as this changes run status (Kamil)
    v5: reverting to returning false after any out/err/dmesg output
     is missing, simplified later checks and printed logs, fixed
     closing outputs (Kamil)
    
    Cc: Ewelina Musial <ewelina.musial@intel.com>
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Cc: Krzysztof Karas <krzysztof.karas@intel.com>
    Cc: Ryszard Knop <ryszard.knop@intel.com>
    Cc: Petri Latvala <adrinael@adrinael.net>
    Signed-off-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
    Reviewed-by: default avatarSebastian Brzezinka <sebastian.brzezinka@intel.com>
    Reviewed-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
    a7465d37
    History
    runner: Parse results harder
    Kamil Konieczny authored
    
    Sometimes an error happens in kernel or in test that leaves
    output files in corrupted or incorrect state. While runner or
    resume will just move on to executing next test, when generating
    results it could end up with no results.json
    
      Try processing outputs a little more persistently and use any
    output file left there, even if only dmesg.txt. Also, when no
    useful output files were present, instead of breaking out add
    notrun.
    
      Inform about processing results for each test so a problem
    could be spotted more easily.
    
    v2: removed ')' from 'notrun\n)' (Kamil)
     using bool var, added more prints about errors (Ryszard)
    v3: reused open_for_reading, removed bool var (Krzysztof)
     closing only positive fds[] in close_outputs(), checking
     file sizes also if all opens succeeded (Kamil)
    v4: reverting to v2 and addresing review comments (Krzysztof)
     closing only already opened file, drop early return when empty
     output files as this changes run status (Kamil)
    v5: reverting to returning false after any out/err/dmesg output
     is missing, simplified later checks and printed logs, fixed
     closing outputs (Kamil)
    
    Cc: Ewelina Musial <ewelina.musial@intel.com>
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Cc: Krzysztof Karas <krzysztof.karas@intel.com>
    Cc: Ryszard Knop <ryszard.knop@intel.com>
    Cc: Petri Latvala <adrinael@adrinael.net>
    Signed-off-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
    Reviewed-by: default avatarSebastian Brzezinka <sebastian.brzezinka@intel.com>
    Reviewed-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>