From 8ca735762d8df2227cacf64a6e99ddeb8328256f Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Fri, 12 Sep 2014 15:48:06 -0300 Subject: [PATCH] Fix tst_process on QNX when using spawn QNX posix_spawn() implementation actually allows for detecting whether a non-existent process has failed to start. Change-Id: Ic1bf8da0d4636f1d7d9b7b4cf6ad45376f6df0ed Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qprocess/tst_qprocess.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index a67d08da6f..412d9316e9 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -717,7 +717,7 @@ void tst_QProcess::waitForFinished() QCOMPARE(output.count("\n"), 10*1024); process.start("blurdybloop"); -#ifdef QPROCESS_USE_SPAWN +#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX) QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Abort); #endif QVERIFY(!process.waitForFinished()); @@ -1540,7 +1540,7 @@ void tst_QProcess::exitCodeTest() //----------------------------------------------------------------------------- void tst_QProcess::failToStart() { -#ifdef QPROCESS_USE_SPAWN +#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX) QSKIP("QProcess cannot detect failure to start when using posix_spawn()"); #endif qRegisterMetaType("QProcess::ProcessError"); @@ -1610,7 +1610,7 @@ void tst_QProcess::failToStart() //----------------------------------------------------------------------------- void tst_QProcess::failToStartWithWait() { -#ifdef QPROCESS_USE_SPAWN +#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX) QSKIP("QProcess cannot detect failure to start when using posix_spawn()"); #endif qRegisterMetaType("QProcess::ProcessError"); @@ -1640,7 +1640,7 @@ void tst_QProcess::failToStartWithWait() //----------------------------------------------------------------------------- void tst_QProcess::failToStartWithEventLoop() { -#ifdef QPROCESS_USE_SPAWN +#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX) QSKIP("QProcess cannot detect failure to start when using posix_spawn()"); #endif qRegisterMetaType("QProcess::ProcessError"); @@ -1891,7 +1891,7 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess() QVERIFY(!process.waitForReadyRead()); // used to crash process.start("doesntexist"); QVERIFY(!process.waitForReadyRead()); -#ifdef QPROCESS_USE_SPAWN +#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX) QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Abort); #endif QCOMPARE(errorSpy.count(), 1);