> Hi, @brammool
> I ran into a problem where a test case was failing, it was always
> successful before, and suddenly one day it failed. I guess it has
> something to do with my system environment, but I can't be sure, and
> I'm not familiar with this test case.
> 
> My friend, can you assist me and give me some advice? Tell me why it
> might fail, that would be very much appreciated.
> 
> log:
> ```bash
> [  364s] Failures: 
> [  364s]      From test_terminal.vim:
> [  364s]      Found errors in Test_terminal_postponed_scrollback():
> [  364s]      Run 1:
> [  364s]      command line..script 
> /home/abuild/rpmbuild/BUILD/vim90/src/testdir/runtest.vim[464]..function 
> RunTheTest[44]..Test_terminal_postponed_scrollback[24]..VerifyScreenDump line 
> 63: See dump file difference: call 
> term_dumpdiff("testdir/failed/Test_terminal_scrollback_3.dump", 
> "testdir/dumps/Test_terminal_scrollback_3.dump"); difference in line 8: 
> ">o|n|e| |m|o|r|e| |l|i|n|e| @61"; difference in line 9: "@75"
> [  364s]      Run 2:
> [  364s]      command line..script 
> /home/abuild/rpmbuild/BUILD/vim90/src/testdir/runtest.vim[497]..function 
> RunTheTest[44]..Test_terminal_postponed_scrollback[24]..VerifyScreenDump line 
> 63: See dump file difference: call 
> term_dumpdiff("testdir/failed/Test_terminal_scrollback_3.dump", 
> "testdir/dumps/Test_terminal_scrollback_3.dump"); difference in line 8: 
> ">o|n|e| |m|o|r|e| |l|i|n|e| @61"; difference in line 9: "@75"
> [  364s]      Run 3:
> [  364s]      command line..script 
> /home/abuild/rpmbuild/BUILD/vim90/src/testdir/runtest.vim[497]..function 
> RunTheTest[44]..Test_terminal_postponed_scrollback[24]..VerifyScreenDump line 
> 63: See dump file difference: call 
> term_dumpdiff("testdir/failed/Test_terminal_scrollback_3.dump", 
> "testdir/dumps/Test_terminal_scrollback_3.dump"); difference in line 8: 
> ">o|n|e| |m|o|r|e| |l|i|n|e| @61"; difference in line 9: "@75"
> [  364s]      Flaky test failed too often, giving up
> [  364s] 
> [  364s] TEST FAILURE
> [  364s] make[2]: *** [Makefile:49: report] Error 1
> [  364s] make[2]: Leaving directory 
> '/home/abuild/rpmbuild/BUILD/vim90/src/testdir'
> [  364s] make[1]: *** [Makefile:2234: scripttests] Error 2
> [  364s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/vim90/src'
> [  364s] make: *** [Makefile:39: test] Error 2
> [  364s] error: Bad exit status from /var/tmp/rpm-tmp.4qiq8B (%check)
> ```

I have not seen this failure.  I also see no reason why this would
happen or why it would depend on the environment.  The difference is
only the cursor position, indicated by ">" in the screen dump file.

If it fails consistently, you could try adding some delay in between the
commands in the test function:
        sleep 2
        call TermWait(buf, 500)

You can change the "2" (two seconds) into "100m" (100 milli seconds) or
something else.  You can put this before and after the term_sendkeys()
calls.  Not sure if it makes any difference.

-- 
Bumper sticker: Honk if you love peace and quiet.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230517170605.2A9471C0571%40moolenaar.net.

Raspunde prin e-mail lui