summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfile
Commit message (Collapse)AuthorAgeFilesLines
* tests: allow unstable tests to be marked with CONFIG+=insignificant_testSergio Ahumada2011-12-282-0/+3
| | | | | | | | | | Marking a test with CONFIG+=insignificant_test will cause the exit code of the test to be discarded during `make check'. This is intended to be used for tests which are valuable to run, but are known to be unstable and are not feasible to immediately fix. Change-Id: Id7b2407d0a13c8de19a58badb78fa7c018c9b50a Reviewed-by: Jo Asplin
* Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-7/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * Merge remote branch 'origin/4.8' into qa-review-masterRohan McGovern2011-05-151-3/+8
| |\ | | | | | | | | | | | | | | | Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| * | Remove Q_ASSERT's from large file autotest.Jason McDonald2011-05-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | These assertions were made obsolete by the previous change to this test. Change-Id: I3156b273a727f753a6c093c8fc7453b694c777ee Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
| * | Fix logic error in large file autotestJason McDonald2011-04-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function generating data blocks was filling the block to 16 bytes short of the blockSize, then appending three 8 byte values, causing the block to grow 8 bytes beyond blockSize and then truncating it back to blockSize. This commit makes the code fill the block to 24 bytes short of the blockSize, so that the block will always end up at the correct size and truncation is not needed. Change-Id: I9fe6e6d6cf7bc445513b53e0a910d205c4c8002f Reviewed-by: Rohan McGovern
| * | Update copyright year to 2011.Jason McDonald2011-01-103-3/+3
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-133-51/+51
| |/ |/| | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Fix qfile autotest hanging in CI systemShane Kearns2011-04-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | The test machine is configured to pop up dialogs in case of CRT assertion failures. The CRT has a debug assert whenever an invalid file handle is used, while the test is expecting to get the EBADF return code. Due to some behaviour change in windows 7 (maybe SP1), we need to call _CrtSetReportMode in addition to setting an error handler. Reviewed-By: mread
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-173-3/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-103-3/+3
| | | | | | | | Reviewed-by: Trust Me
* | Fix link error on MacOSShane Kearns2011-01-041-3/+3
| |
* | Fix qfile test crash with glibcShane Kearns2010-12-221-6/+9
| | | | | | | | | | | | | | | | | | | | The test was using a FILE* after closing it (which was a pointer to deleted memory). glibc detects and asserts on this. If the test failed, then file could be closed twice too, so I fixed that at the same time. (would have caused a double free) Reviewed-by: joao
* | Fix qfile test errorsShane Kearns2010-12-211-3/+39
| | | | | | | | | | | | | | | | | | Fix compile error for non symbian targets Fix MSVCRT assertion failure Test file.handle() returns the right thing before and after file is closed. Reviewed-by: joao
* | Add autotests for AutoCloseHandle / DontCloseHandle and RFile adoptionShane Kearns2010-12-202-10/+141
| | | | | | | | | | | | | | | | | | | | Extended the existing tests which open a file from a handle to use symbian RFile as well (when testing on symbian). Added a new test to check the file handle is open/closed after closing a QFile, based on whether the file was opened with AutoCloseHandle or not. Reviewed-by: mread
* | Fix spelling in commentsJoão Abecasis2010-12-051-2/+2
| |
* | Fix tst_QFile::caseSensitivity test on MacJoão Abecasis2010-11-301-1/+1
| | | | | | | | | | Mac's default file system is case-preserving, but case-insensitive, otherwise.
* | Fix typo in QFile testJoão Abecasis2010-11-301-1/+1
| | | | | | | | | | If file system isn't case sensitive, open succeeds as should reading, with the read data matching testData.
* | Add symbian platform security and case sensitivity test casesShane Kearns2010-11-301-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On symbian, check that opening files in protected locations either succeeds or fails cleanly as expected by the capabilities the test is compiled with. This acts as a regression test for opening files in /resource, and also checks the other locations behave as expected. On all platforms, check file created with a mixed case filename can be accessed by it's aliases that differ only in case (or not) depending on the OS case sensitivity. For Windows/Symbian, file should be accessible by altered case aliases For other OS, it should not (other OS supported by Qt are unix like) Reviewed-by: mread
* | Fix link() autotest on WindowsPrasanth Ullattil2010-11-261-1/+1
| | | | | | | | | | | | This was missed from the previous commit. Reviewed-by: Joao
* | Flagging some more tests as parallelizableJoão Abecasis2010-11-252-0/+3
| | | | | | | | | | | | | | These tests have no GUI nor do they depend on network, so let's see what breaks if they're parallelized :-) Reviewed-by: Olivier Goffart
* | Fix QFile::link unit testJoão Abecasis2010-11-251-4/+10
| | | | | | | | | | | | | | Absolute path for the link target can contain "../" elements and so needs to be cleaned. Really depends on the definition for SRCDIR. Reviewed-by: Prasanth Ullattil
* | Merge remote branch 'qt/master' into file-engine-refactorJoão Abecasis2010-11-231-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/corelib/io/io.pri src/corelib/io/qfsfileengine.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtDeclarativeu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtDeclarativeu.def src/s60installs/eabi/QtGuiu.def tests/auto/qapplication/test/test.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qdiriterator/qdiriterator.pro tests/auto/qsound/qsound.pro
| * | Align .pro with qmake: s/\.sources/.files/.Miikka Heikkinen2010-10-081-2/+2
| |/ | | | | | | | | | | | | | | | | | | Complement previous commit by aligning Qt itself to use .files consistently for DEPLOYMENT as well as INSTALLS. This excludes changes to webkit. Task-number: QTBUG-3216 Reviewed-by: axis
* | Fix QFile autotest for out-of-source buildsJoão Abecasis2010-11-221-2/+2
| |
* | Test coverage: test more of QFile APIShane Kearns2010-11-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Adding tests for these functions: symLinkTarget / readLink (static & non static) permissions (static) constructors which take a QObject parent After this, all function of QFile API are tested except encoding/decoding functions and some QT3_SUPPORT inlines in the header. Reviewed-by: joao
* | Test coverage: test QFile::resizeShane Kearns2010-11-161-0/+26
| | | | | | | | Reviewed-By: joao
* | Re-enable emulated QFile::map on symbianShane Kearns2010-10-291-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Memory mapping of RFile handles is not supported in current symbian OS versions. However the "open C" libraries provide an emulated mmap() implementation which was used by QFile::map in Qt 4.6 release. To avoid breaking applications which rely on this function, QFile::map will now open the file with open C as well in order to use that handle to call mmap(). When symbian implements a file mapping API, we can switch the implementation to use that for RFile handles. Reviewed-By: joao
* | Autotest for seeking beyond end of file and then writingShane Kearns2010-10-191-0/+31
| | | | | | | | | | | | | | | | | | | | | | File engine refactor caused a regression in the TIFF image codec, as QFile::seek() previously worked like lseek() / fseek() in posix. But on symbian the native RFile::Seek api clamps to the end of the file if you attempt to seek beyond there. This test checks seek behaviour in the appropriate place, the QFile auto test. Reviewed-By: joao
* | Fix deployment for examples and testsShane Kearns2010-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Due to the change from default deployment in symbian from being hardcoded in qmake to being in default_deployment.prf the .pro files needed to be changed. Specifically, "DEPLOYMENT = foo" needs to be "DEPLOYMENT += foo" otherwise the default deployment lines are not added and the test won't install. Reviewed-By: Miikka Heikkinen
* | Change handle related tests in tst_qfile for symbianShane Kearns2010-09-151-2/+9
| | | | | | | | | | | | | | Getting a posix file handle from a natively opened QFile isn't supported so that part of the test is skipped. Reviewed-By: joao
* | Disable symlink and memory mapped files tests on symbianShane Kearns2010-09-151-0/+22
|/ | | | Reviewed-By: joao
* Fix duplicate binary names issues in Symbian autotestsMiikka Heikkinen2010-08-061-1/+1
| | | | | | | | | | In Symbian each binary name must be unique as all binaries are stored in the same directory on the device. Some autotests created helper binaries that had same names on different tests, which caused build and installation issues when building entire autotest project tree. Reviewed-by: Shane Kearns
* Various fixes to autotests when using the symbian/linux-armcc mkspec.axis2010-06-291-1/+1
|
* escape backslashesOswald Buddenhagen2010-05-261-4/+4
| | | | this makes windows-style path specs *ugly*. that's intentional. :-P
* Skip tst_LargeFile::mapOffsetOverflow on MacJoão Abecasis2010-05-041-0/+4
| | | | | | | | | | On this platform mmap'ing beyond EOF may succeed, even beyond filesystem capabilities, but generate Bus Errors on access. Skipping this failing test and accepting the underlying undefined behavior is the right thing to do, until QFile offers proper guarantees. Reviewed-by: Thiago Macieira
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-121-3/+3
|\ | | | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/gui/image/qimage.cpp src/openvg/qwindowsurface_vgegl.cpp
| * Autotest: Use the file in the non-writeable areaThiago Macieira2010-04-111-3/+3
| |
* | _close(fd) closes the associated handle and not the other way aroundJoão Abecasis2010-03-231-0/+47
|/ | | | | | | | | | ... according to the online MSDN documentation. Hid the cachedFd member in private data under WinCE, since it's never used there. Task-number: QTBUG-9085 Reviewed-by: Zeno Albisser
* Fix bugs evidenced by change to keep flush errors on QFile::closeJoão Abecasis2010-01-071-1/+3
| | | | | | | | | | | | | | | | When closing a file, the contents of the write buffer should be emptied even in the case where flush fails, so it doesn't leak to subsequent files opened through the same instance. This is inline with what would happen with native close on a buffered device. Also changed the resource file engine to succeed on flush. Since all writes fail there, logically it's write buffer is empty and flush should succeed. This keeps auto-tests happy :-) tst_QFile::fullDisk auto-test extended to ensure re-opening QFile does not keep the write buffer alive. Reviewed-by: Thiago Macieira
* QIODevice: Fix readAll()Markus Goetz2010-01-061-0/+34
| | | | | | | | | My patch from yesterday did not have any effect: Instead of really using what was in the buffer, it used it but then read it from the underlying device anyway. Thanks Ritt Konstantin and Joao. Reviewed-by: joao
* Update copyright year to 2010Jason McDonald2010-01-063-3/+3
| | | | Reviewed-by: Trust Me
* Small optimization in QIODevice::readAll()Markus Goetz2010-01-051-0/+41
| | | | | | .. and more testcases Reviewed-by: joao
* Test fixed for Windows CE.ninerider2009-12-141-13/+62
| | | | | | | | Some test very corrected, the low level file descriptor tests mostly skipped as well as the multiple memory mapping of a file, which resulted in the file handle not beeign properly released. Reviewed-by: thartman
* Unix: Avoid stat() when opening a fileMarkus Goetz2009-11-301-1/+12
| | | | | | | | | The open() syscall can open directories for reading, which we in QFile and file engines don't support. However, there is no need for stat() to find out if it is a directory if we open() with a write flag because then the syscall will fail anyway. Reviewed-by: joao
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-11-181-1/+1
|\ | | | | | | | | Conflicts: configure.exe
| * Fix tst_qfile, disable largefile for symbian.Liang Qi2009-11-131-1/+1
| | | | | | | | RevBy: TrustMe
* | Removing unnecessary chunking and stat'ing when reading QIODeviceJoão Abecasis2009-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chunk size increased to QIODEVICE_BUFFERSIZE (currently 16k) where chunking is still needed. Namely, on sequential devices and when QByteArray is unable to allocate a large enough buffer. This is necessary for backward compatibility Improved validation and prevention of overflow in maxSize argument. Updated autotest that relied on a null QByteArray when no data was available and no errors were found. The only guarantee we should be providing in this case is an empty result -- even though that behavior is preserved for the time being. Affected functions: * QIODevice::read(qint64 maxSize) Chunking will still happen for large maxSize (i.e., QByteArray resize fails), where it could be used as a synonym for QIODevice::readAll(). No stat'ing performed. Read from device continues for as long as it is successful. Stops if an error occurs or if we get less data than requested. * QIODevice::readAll() Chunking is performed for sequential devices where total size wouldn't be known beforehand. For sequential devices, reading continues as long as data is returned, even if less than requested. Non-sequential devices will be stat'ed once. If QIODevice::size returns 0, this is taken to mean unknown size and chunking is performed. Otherwise, a single read request is made for the specified size. On failure to resize QByteArray, nothing is returned. * QIODevice::readLine(qint64 maxSize) Chunking is performed for maxSize == 0, or if we can't allocate a large enough buffer. No stat'ing performed at this level. Read from device continues until EOL is found, as long as we get all requested data. Task-number: QT-2347 Reviewed-by: Thiago Macieira Reviewed-by: Miikka Heikkinen
* | Improve reliability of QFile test readAllStdinJoão Abecasis2009-11-171-0/+1
| | | | | | | | ... by catching failure to launch separate process earlier.
* | Fix regression introduced in c08e708037d33271825ce6a6a1ac640e96b70c36João Abecasis2009-11-171-0/+12
|/ | | | | | | | | | | When writing nothing to a file, not actually writing anything is not an error. Also, from a change introduced in the same commit, there is no point in checking for EOF when writing. Task-number: QTBUG-5847 Reviewed-by: Olivier Goffart
* Merge commit 'origin/4.6' into 4.6-ceJoerg Bornemann2009-11-111-31/+135
|\