Skip to content
  • Pavan Naik's avatar
    e57a6e4d
    BUG#27591319: MESSAGE FROM LAST --ECHO IS NOT FLUSHED BEFORE TIMING · e57a6e4d
    Pavan Naik authored
                  OUT ON SET DEBUG_SYNC
    
    Issue:
    ------
    SET DEBUG_SYNC = 'now WAIT_FOR something' statement in a test cases
    test time out, because something is never triggered, then the most
    recent '--echo' command is not reflected in the log file.
    
    bash> echo sample.test
    --echo one
    --echo two
    --echo three
    SET DEBUG_SYNC = 'now WAIT_FOR ever';
    
    bash> ./mtr main.sample --testcase-timeout=1
    
    This obviously will timeout, since we never trigger signal named
    'ever'. But, the strange thing is that log file contains only:
    
    bash> cat var/log/main.sample/sample.log
    one
    two
    
    The last echo statement output is not written to the log file.
    
    Fix:
    ----
    1. Flush the the contents in output buffer to file after writing the
       them.
    
    2. Created 'include/analyze-timeout.test' file.
    
    Change-Id: Id5449a3893958123a1ed555e57ed757643200abd
    e57a6e4d
    BUG#27591319: MESSAGE FROM LAST --ECHO IS NOT FLUSHED BEFORE TIMING
    Pavan Naik authored
                  OUT ON SET DEBUG_SYNC
    
    Issue:
    ------
    SET DEBUG_SYNC = 'now WAIT_FOR something' statement in a test cases
    test time out, because something is never triggered, then the most
    recent '--echo' command is not reflected in the log file.
    
    bash> echo sample.test
    --echo one
    --echo two
    --echo three
    SET DEBUG_SYNC = 'now WAIT_FOR ever';
    
    bash> ./mtr main.sample --testcase-timeout=1
    
    This obviously will timeout, since we never trigger signal named
    'ever'. But, the strange thing is that log file contains only:
    
    bash> cat var/log/main.sample/sample.log
    one
    two
    
    The last echo statement output is not written to the log file.
    
    Fix:
    ----
    1. Flush the the contents in output buffer to file after writing the
       them.
    
    2. Created 'include/analyze-timeout.test' file.
    
    Change-Id: Id5449a3893958123a1ed555e57ed757643200abd
Loading