diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2022-12-19 13:36:47 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-12-19 16:31:27 +0000 |
commit | 366bc6cd08e09bcd9fac78b6efc839f641669834 (patch) | |
tree | 1dbb2bc43919f38fac3ff65aa7e3e81f59a751cf /tests | |
parent | 4e0ca1bf7323fffc39a35712454d00e9eba38cd1 (diff) |
Autoclose a FILE* if we open it
Task-number: QTBUG-105736
Change-Id: I2bc10b54b77436cad914ec21fd85678c54de4305
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f7559904d0e8f7966e726fd04801cb58a1bd4a2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 81924b3d10..e7446941f2 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -2614,7 +2614,7 @@ static void unixPipe_helper(int pipes[2]) QFile f; if (useStdio) { FILE *fh = fdopen(pipes[0], "rb"); - QVERIFY(f.open(fh, QIODevice::ReadOnly | QIODevice::Unbuffered)); + QVERIFY(f.open(fh, QIODevice::ReadOnly | QIODevice::Unbuffered, QFileDevice::AutoCloseHandle)); } else { QVERIFY(f.open(pipes[0], QIODevice::ReadOnly | QIODevice::Unbuffered)); } @@ -2638,10 +2638,6 @@ void tst_QFile::unixPipe_data() void tst_QFile::unixPipe() { -#ifdef Q_OS_ANDROID - if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31) - QSKIP("Crashes on Android 12 (QTBUG-105736)"); -#endif int pipes[2] = { -1, -1 }; QVERIFY2(pipe(pipes) == 0, qPrintable(qt_error_string())); unixPipe_helper(pipes); @@ -2651,10 +2647,6 @@ void tst_QFile::unixPipe() void tst_QFile::socketPair() { -#ifdef Q_OS_ANDROID - if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31) - QSKIP("Crashes on Android 12 (QTBUG-105736)"); -#endif int pipes[2] = { -1, -1 }; QVERIFY2(socketpair(AF_UNIX, SOCK_STREAM, 0, pipes) == 0, qPrintable(qt_error_string())); unixPipe_helper(pipes); |