Bug 477248

Summary: KProcessTest::test_inheritance failed on OpenBSD
Product: [Frameworks and Libraries] frameworks-kcoreaddons Reporter: Rafael Sadowski <rafael>
Component: generalAssignee: Michael Pyne <mpyne>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 5.112.0   
Target Milestone: ---   
Platform: Other   
OS: OpenBSD   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Rafael Sadowski 2023-11-19 19:32:24 UTC
I'm trying to improve the KDE framwork support on OpenBSD and I ran into a wired issue.
Why is /bin/true expected and not /bin/sh. In KProcess::setShellCommand we set QProcess::setProgram(shell) and before we return arguments() we add "argv.prepend(QProcess::program());". I would like to fix this but don't understand it and would appreciate any tips.

./kprocesstest
********* Start testing of KProcessTest *********
Config: Using QtTest library 5.15.11, Qt 5.15.11 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 16.0.6 ), unknown unknown
PASS   : KProcessTest::initTestCase()
PASS   : KProcessTest::test_channels()
PASS   : KProcessTest::test_setShellCommand()
FAIL!  : KProcessTest::test_inheritance() Compared values are not the same
   Actual   (qproc->program())           : "/bin/sh"
   Expected (QStringLiteral("/bin/true")): "/bin/true"
   Loc: [/usr/ports/pobj/kcoreaddons-5.111.0/kcoreaddons-5.111.0/autotests/kprocesstest.cpp(112)]
PASS   : KProcessTest::cleanupTestCase()
Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 62ms
********* Finished testing of KProcessTest *********