Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 862594 - kde-apps/konsole-22.04.3: TerminalInterfaceTest fails with zsh
Summary: kde-apps/konsole-22.04.3: TerminalInterfaceTest fails with zsh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2022-07-31 20:58 UTC by Alfred Persson
Modified: 2023-08-02 05:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
LastTest.log (LastTest.log,48.46 KB, text/plain)
2022-07-31 20:58 UTC, Alfred Persson
Details
emerge --info konsole (emerge--info.txt,9.59 KB, text/plain)
2022-07-31 20:59 UTC, Alfred Persson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfred Persson 2022-07-31 20:58:30 UTC
Created attachment 796255 [details]
LastTest.log

Hi, when running 'ebuild konsole-22.04.3 clean test' with the user shell set to zsh, the TerminalInterfaceTest will fail. I have tested it on my laptop and desktop, as well as on both glibc and musl.

It acts very weirdly. This is the code snippet from autotests/TerminalInterfaceTest.cpp that fails. It changes directory to /tmp and looks for a state change. 

>currentDirectory = QStringLiteral("/tmp");
>terminal->sendInput(QStringLiteral("cd ") + currentDirectory + QLatin1Char('\n'));
>stateSpy.wait(2000);
>QCOMPARE(stateSpy.count(), 1);

The weird thing is that it acts completely like there would be some kind of junk text before "cd /tmp", because doing 

>currentDirectory = QStringLiteral("/tmp");
>terminal->sendInput(QStringLiteral("\ncd ") + currentDirectory + QLatin1Char('\n'));
>stateSpy.wait(2000);
>QCOMPARE(stateSpy.count(), 1);

or

>terminal->sendInput(QStringLiteral(";cd ") + currentDirectory + QLatin1Char('\n'));

or

>terminal->sendInput(QStringLiteral("\b\b\b\b\b\b\b\b\b\b\b\bcd ") + currentDirectory + QLatin1Char('\n'));

works just fine! :O

Seems similar to bug #662756 but I think this is different.
Comment 1 Alfred Persson 2022-07-31 20:59:24 UTC
Created attachment 796258 [details]
emerge --info konsole
Comment 2 Alfred Persson 2022-07-31 21:17:43 UTC
Note that the test only fails when ran with zsh. Emerging with FEATURES=test, or running 'ebuild konsole-22.04.3 clean test' with any user not having login shell set as zsh (ex. bash) works.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-17 23:00:29 UTC
This test has failed for me again on arm64 without zsh. I think we should just skip it, it's clearly flaky, and I don't have enough information to report it upstream properly.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-02 05:45:56 UTC
Hit this again without zsh at all:

Config: Using QtTest library 5.15.10, Qt 5.15.10 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 12.3.1 20230526), gentoo 2.13
PASS   : Konsole::TerminalInterfaceTest::initTestCase()
PASS   : Konsole::TerminalInterfaceTest::testTerminalInterfaceNoShell()
QWARN  : Konsole::TerminalInterfaceTest::testTerminalInterface() Program to run not set.
FAIL!  : Konsole::TerminalInterfaceTest::testTerminalInterface() Compared values are not the same
   Actual   (stateSpy.count()): 0
   Expected (1)               : 1
   Loc: [/var/tmp/portage/kde-apps/konsole-23.04.3/work/konsole-23.04.3/src/autotests/TerminalInterfaceTest.cpp(146)]
PASS   : Konsole::TerminalInterfaceTest::testTerminalInterfaceV2()
PASS   : Konsole::TerminalInterfaceTest::cleanupTestCase()
Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 5073ms
********* Finished testing of Konsole::TerminalInterfaceTest *********

I'm fed up of this silly test, I'm going to skip it.
Comment 5 Larry the Git Cow gentoo-dev 2023-08-02 05:47:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fab3b7be08f643076c426d63537b6728c35bba3

commit 2fab3b7be08f643076c426d63537b6728c35bba3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-02 05:47:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-02 05:47:33 +0000

    kde-apps/konsole: skip extremely flaky TerminalInterfaceTest test
    
    Closes: https://bugs.gentoo.org/862594
    Closes: https://bugs.gentoo.org/662756
    Signed-off-by: Sam James <sam@gentoo.org>

 kde-apps/konsole/konsole-23.04.3.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2023-08-02 05:48:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=7dd55c74bcf8fa7d3b47b31e083567be2f7b7030

commit 7dd55c74bcf8fa7d3b47b31e083567be2f7b7030
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-02 05:47:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-02 05:48:09 +0000

    kde-apps/konsole: skip extremely flaky TerminalInterfaceTest test
    
    Closes: https://bugs.gentoo.org/862594
    Closes: https://bugs.gentoo.org/662756
    Signed-off-by: Sam James <sam@gentoo.org>

 kde-apps/konsole/konsole-9999.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)