diff options
author | Arvid Ephraim Picciani <arvid.picciani@nokia.com> | 2010-08-31 11:58:01 (GMT) |
---|---|---|
committer | Arvid Ephraim Picciani <arvid.picciani@nokia.com> | 2010-08-31 12:15:42 (GMT) |
commit | af2b8878ba7bd153876a5531a8119a4bdbc6b257 (patch) | |
tree | 0f12033d6dcd95cefaa76f2702670d9baf780262 /tests/auto | |
parent | b3da295dc3a4e72d185f9eb767dfe1f518fb0b8a (diff) | |
download | Qt-af2b8878ba7bd153876a5531a8119a4bdbc6b257.zip Qt-af2b8878ba7bd153876a5531a8119a4bdbc6b257.tar.gz Qt-af2b8878ba7bd153876a5531a8119a4bdbc6b257.tar.bz2 |
revert 3c2a43f91e0225bde8d6e6d6076dfe2cddbc2f8e
to pass CI again after mystical failure
Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qpluginloader/elftest/.gitattributes | 10 | ||||
-rwxr-xr-x | tests/auto/qpluginloader/elftest/corrupt1.elf64.so | bin | 239745 -> 0 bytes | |||
-rwxr-xr-x | tests/auto/qpluginloader/elftest/corrupt2.elf64.so | bin | 240097 -> 0 bytes | |||
-rwxr-xr-x | tests/auto/qpluginloader/elftest/corrupt3.elf64.so | bin | 240097 -> 0 bytes | |||
-rw-r--r-- | tests/auto/qpluginloader/elftest/debugobj.so | bin | 507232 -> 0 bytes | |||
-rw-r--r-- | tests/auto/qpluginloader/elftest/garbage1.so | 4 | ||||
-rw-r--r-- | tests/auto/qpluginloader/elftest/garbage2.so | 1 | ||||
-rw-r--r-- | tests/auto/qpluginloader/elftest/garbage3.so | 1 | ||||
-rw-r--r-- | tests/auto/qpluginloader/elftest/garbage4.so | 1 | ||||
-rw-r--r-- | tests/auto/qpluginloader/elftest/garbage5.so | 2 | ||||
-rw-r--r-- | tests/auto/qpluginloader/tst_qpluginloader.cpp | 81 |
11 files changed, 1 insertions, 99 deletions
diff --git a/tests/auto/qpluginloader/elftest/.gitattributes b/tests/auto/qpluginloader/elftest/.gitattributes deleted file mode 100644 index 891192c..0000000 --- a/tests/auto/qpluginloader/elftest/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -corrupt1.elf64.so set -crlf -diff -corrupt2.elf64.so set -crlf -diff -corrupt3.elf64.so set -crlf -diff -debugobj.so set -crlf -diff -garbage1.so set -crlf -diff -garbage2.so set -crlf -diff -garbage3.so set -crlf -diff -garbage4.so set -crlf -diff -garbage5.so set -crlf -diff - diff --git a/tests/auto/qpluginloader/elftest/corrupt1.elf64.so b/tests/auto/qpluginloader/elftest/corrupt1.elf64.so Binary files differdeleted file mode 100755 index 12ce736..0000000 --- a/tests/auto/qpluginloader/elftest/corrupt1.elf64.so +++ /dev/null diff --git a/tests/auto/qpluginloader/elftest/corrupt2.elf64.so b/tests/auto/qpluginloader/elftest/corrupt2.elf64.so Binary files differdeleted file mode 100755 index 11fdc2c..0000000 --- a/tests/auto/qpluginloader/elftest/corrupt2.elf64.so +++ /dev/null diff --git a/tests/auto/qpluginloader/elftest/corrupt3.elf64.so b/tests/auto/qpluginloader/elftest/corrupt3.elf64.so Binary files differdeleted file mode 100755 index 94a2bc3..0000000 --- a/tests/auto/qpluginloader/elftest/corrupt3.elf64.so +++ /dev/null diff --git a/tests/auto/qpluginloader/elftest/debugobj.so b/tests/auto/qpluginloader/elftest/debugobj.so Binary files differdeleted file mode 100644 index f0ee056..0000000 --- a/tests/auto/qpluginloader/elftest/debugobj.so +++ /dev/null diff --git a/tests/auto/qpluginloader/elftest/garbage1.so b/tests/auto/qpluginloader/elftest/garbage1.so deleted file mode 100644 index 0c74530..0000000 --- a/tests/auto/qpluginloader/elftest/garbage1.so +++ /dev/null @@ -1,4 +0,0 @@ -pcdL+&&e= -oÒʎIٝmg]!Z -L')t -N(eP)Y8G 6-y"Zk4?^n5$Y=#y
\ No newline at end of file diff --git a/tests/auto/qpluginloader/elftest/garbage2.so b/tests/auto/qpluginloader/elftest/garbage2.so deleted file mode 100644 index c06338e..0000000 --- a/tests/auto/qpluginloader/elftest/garbage2.so +++ /dev/null @@ -1 +0,0 @@ -v.YtKW3
\ No newline at end of file diff --git a/tests/auto/qpluginloader/elftest/garbage3.so b/tests/auto/qpluginloader/elftest/garbage3.so deleted file mode 100644 index a24c523..0000000 --- a/tests/auto/qpluginloader/elftest/garbage3.so +++ /dev/null @@ -1 +0,0 @@ -ȂT-ڥ 쾜i8_xIx=4@[BKS$
\ No newline at end of file diff --git a/tests/auto/qpluginloader/elftest/garbage4.so b/tests/auto/qpluginloader/elftest/garbage4.so deleted file mode 100644 index 4f45cf5..0000000 --- a/tests/auto/qpluginloader/elftest/garbage4.so +++ /dev/null @@ -1 +0,0 @@ -!\~Uu:9T+91QEǚxng5zh^t'mm*ˈdXH;vw+G
9L0!
\ No newline at end of file diff --git a/tests/auto/qpluginloader/elftest/garbage5.so b/tests/auto/qpluginloader/elftest/garbage5.so deleted file mode 100644 index f8c0a1d..0000000 --- a/tests/auto/qpluginloader/elftest/garbage5.so +++ /dev/null @@ -1,2 +0,0 @@ -Q --9
\ No newline at end of file diff --git a/tests/auto/qpluginloader/tst_qpluginloader.cpp b/tests/auto/qpluginloader/tst_qpluginloader.cpp index 9374dd0..1e382b8 100644 --- a/tests/auto/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/qpluginloader/tst_qpluginloader.cpp @@ -100,14 +100,6 @@ # define PREFIX "lib" #endif -#ifdef QT_NO_DEBUG -# define QLIBRARY_AS_DEBUG false -#else -# define QLIBRARY_AS_DEBUG true -#endif - -// #define SHOW_ERRORS 1 - static QString sys_qualifiedLibraryName(const QString &fileName) { QString currDir = QDir::currentPath(); @@ -127,14 +119,10 @@ public: virtual ~tst_QPluginLoader(); private slots: - void clearPluginCache(); void errorString(); void loadHints(); void deleteinstanceOnUnload(); void checkingStubsFromDifferentDrives(); - void loadDebugObj(); - void loadCorruptElf(); - void loadGarbage(); }; tst_QPluginLoader::tst_QPluginLoader() @@ -146,25 +134,7 @@ tst_QPluginLoader::~tst_QPluginLoader() { } -void tst_QPluginLoader::clearPluginCache() -{ - QString regkey = QString::fromLatin1("Qt Plugin Cache %1.%2.%3") - .arg((QT_VERSION & 0xff0000) >> 16) - .arg((QT_VERSION & 0xff00) >> 8) - .arg(QLIBRARY_AS_DEBUG ? QLatin1String("debug") : QLatin1String("false")); -#ifdef Q_WS_MAC -#if defined(__x86_64__) - regkey += QLatin1String("-x86_64"); -#elif defined(__i386__) - regkey += QLatin1String("-i386"); -#elif defined(__ppc64__) - regkey += QLatin1String("-ppc64"); -#elif defined(__ppc__) - regkey += QLatin1String("-ppc"); -#endif -#endif // Q_WS_MAC - QSettings(QSettings::UserScope, QLatin1String("Trolltech")).remove(regkey); -} +//#define SHOW_ERRORS 1 void tst_QPluginLoader::errorString() { @@ -380,54 +350,5 @@ void tst_QPluginLoader::checkingStubsFromDifferentDrives() #endif//Q_OS_SYMBIAN } -void tst_QPluginLoader::loadDebugObj() -{ -#if defined (__ELF__) - QVERIFY(QFile::exists(SRCDIR "elftest/debugobj.so")); - QPluginLoader lib1(SRCDIR "elftest/debugobj.so"); - QCOMPARE(lib1.load(), false); -#endif -} - -void tst_QPluginLoader::loadCorruptElf() -{ -#if defined (__ELF__) -if (sizeof(void*) == 8) { - QVERIFY(QFile::exists(SRCDIR "elftest/corrupt1.elf64.so")); - - QPluginLoader lib1(SRCDIR "elftest/corrupt1.elf64.so"); - QCOMPARE(lib1.load(), false); - QVERIFY(lib1.errorString().contains("not an ELF object")); - - QPluginLoader lib2(SRCDIR "elftest/corrupt2.elf64.so"); - QCOMPARE(lib2.load(), false); - QVERIFY(lib2.errorString().contains("invalid")); - - QPluginLoader lib3(SRCDIR "elftest/corrupt3.elf64.so"); - QCOMPARE(lib3.load(), false); - QVERIFY(lib3.errorString().contains("invalid")); -} else if (sizeof(void*) == 4) { - QPluginLoader libW(SRCDIR "elftest/corrupt3.elf64.so"); - QCOMPARE(libW.load(), false); - QVERIFY(libW.errorString().contains("architecture")); -} else { - QFAIL("Please port QElfParser to this platform or blacklist this test."); -} -#endif -} - -void tst_QPluginLoader::loadGarbage() -{ -#if defined (Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) - for (int i=0; i<5; i++) { - QPluginLoader lib(QString(SRCDIR "elftest/garbage%1.so").arg(i)); - QCOMPARE(lib.load(), false); -#ifdef SHOW_ERRORS - qDebug() << lib.errorString(); -#endif - } -#endif -} - QTEST_APPLESS_MAIN(tst_QPluginLoader) #include "tst_qpluginloader.moc" |