Re: KDirWatch vs QFileSystemWatcher
On Sunday 27 October 2013 22:02:18 Sune Vuorela wrote: Seems to still consistently failing here on windows :/ Good, consistency is good, we can debug that :) Can you apply this patch and try again, so I get more debug output? http://www.davidfaure.fr/2013/kcoreaddons_debug.diff Yes. lines are truncated and messed up. thanks cmd.exe. I'm told Console2.exe is a good replacement. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: KDirWatch vs QFileSystemWatcher
On 2013-10-28, David Faure fa...@kde.org wrote: On Sunday 27 October 2013 22:02:18 Sune Vuorela wrote: Seems to still consistently failing here on windows :/ Good, consistency is good, we can debug that :) Can you apply this patch and try again, so I get more debug output? http://www.davidfaure.fr/2013/kcoreaddons_debug.diff It definitely made it more verbose, but most of your debug changes wasn't even reached. 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Added Dir C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa for [KDirWatch-11] 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() fsWatcher-addPath C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Added File C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo for [KDirWatch-11] 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() fsWatcher-addPath C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() C:/Users/Administrator/AppData/Local/Temp/2/newdir-kObaaa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Waited 300 ms so that now 2013-10-28T09:29:38 is 2013-10-28T09:29:37 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Overwrite file1 with tempfile 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() waiting for dirty signal 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() e-m_ctime= 1382948973 09:29:33 stat_buf.st_ctime= 1382948954 e-m_nlink= 1 stat_buf.st_nlink= 1 e-m_ino= 0 stat_buf.st_ino= 0 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() scanEntry for C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa says 1 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() 1 C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 1 clients 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() e-m_ctime= 1382948978 09:29:38 stat_buf.st_ctime= 1382948954 e-m_nlink= 1 stat_buf.st_nlink= 1 e-m_ino= 0 stat_buf.st_ino= 0 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() scanEntry for C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa says 1 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() 1 C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 1 clients 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() e-m_ctime= 1382948978 09:29:38 stat_buf.st_ctime= 1382948954 e-m_nlink= 1 stat_buf.st_nlink= 1 e-m_ino= 0 stat_buf.st_ino= 0 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() scanEntry for C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa says 1 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() 1 C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 1 clients 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() e-m_ctime= 1382948977 09:29:37 stat_buf.st_ctime= 1382948977 e-m_nlink= 1 stat_buf.st_nlink= 1 e-m_ino= 0 stat_buf.st_ino= 0 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() scanEntry for C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo says 1 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() 1 C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo 1 clients 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() waiting for dirty signal 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() KDirWatch-11 emitting dirty C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() KDirWatch-11 emitting dirty C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() KDirWatch-11 emitting dirty C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() KDirWatch-11 emitting dirty C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() got 4 dirty signals 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() got C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Waited 0 ms so that now 2013-10-28T09:29:39 is 2013-10-28T09:29:38 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() waiting for dirty signal 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unittest-Pa/moveTo 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() e-m_ctime= 1382948978 09:29:38 stat_buf.st_ctime= 1382948977 e-m_nlink= 1 stat_buf.st_nlink= 1 e-m_ino= 0 stat_buf.st_ino= 0 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() scanEntry for
Re: KDirWatch vs QFileSystemWatcher
On Thursday 24 October 2013 21:54:42 Sune Vuorela wrote: If your KDirWatch backend is QFileSystemWatcher, one of the testcases fails. The last QVERIFY in testMoveTo never receives the signal dirty-signal it is looking for. Strange, here I'm getting a failure in removeAndReAdd (every time), but testMoveTo passes most of the time (finally got a failure after 10 runs or so)... In KDE4 I also get removeAndReAdd failing everytime (with KDIRWATCHTEST_METHOD=QFSWatch), and couldn't get testMoveTo to fail. Apparantly, the watch.removeFile apparantly somehow turns off the QFSW to not do any further notifications for what happens in the directory that it also is supposed to be watching. I haven't yet fully understood what's going on here, but if someone is up for it, fixing it would be nice. Among others, it is the only backend available on windows. This dirty patch seems to ensure that QFSW is used on your platform: With the changes I just pushed, a better way to change the backend for KDirWatch is: KDIRWATCH_METHOD=QFSWatch ./kdirwatch_unittest -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: KDirWatch vs QFileSystemWatcher
On Sunday 27 October 2013 12:00:04 David Faure wrote: On Thursday 24 October 2013 21:54:42 Sune Vuorela wrote: If your KDirWatch backend is QFileSystemWatcher, one of the testcases fails. The last QVERIFY in testMoveTo never receives the signal dirty-signal it is looking for. Strange, here I'm getting a failure in removeAndReAdd (every time) Fixed (in 4.x and frameworks), actual bug in KDirWatch. testMoveTo passes most of the time (finally got a failure after 10 runs or so)... Fixed as well (9c6cc615676a5bb) (not a real bug, a unittest bug). -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: KDirWatch vs QFileSystemWatcher
On 2013-10-27, David Faure fa...@kde.org wrote: testMoveTo passes most of the time (finally got a failure after 10 runs or so)... Fixed as well (9c6cc615676a5bb) (not a real bug, a unittest bug). 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Added Dir C:/Users/Administrator/A ppData/Local/Temp/2/kdirwatch_unittest-1Xeaaa for [KDirWatch-11] 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() fsWatcher-addPath C:/Users/Admini strator/AppData/Local/Temp/2/kdirwatch_unittest-1Xeaaa 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Added File C:/Users/Administrator/ AppData/Local/Temp/2/kdirwatch_unittest-1Xeaaa/moveTo for [KDirWatch-11] 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() fsWatcher-addPath C:/Users/Admini strator/AppData/Local/Temp/2/kdirwatch_unittest-1Xeaaa/moveTo 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Waited 0 ms so that now 2013-10-27 T22:58:58 is 2013-10-27T22:58:57 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Overwrite file1 with tempfile 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Waited 700 ms so that now 2013-10- 27T22:58:59 is 2013-10-27T22:58:58 4: QDEBUG : KDirWatch_UnitTest::testMoveTo() Waited 0 ms so that now 2013-10-27 T22:58:59 is 2013-10-27T22:58:58 4: QWARN : KDirWatch_UnitTest::testMoveTo() Timeout waiting for KDirWatch signa l dirty(QString) ( C:/Users/Administrator/AppData/Local/Temp/2/kdirwatch_unit test-1Xeaaa/ ) 4: FAIL! : KDirWatch_UnitTest::testMoveTo() 'waitForOneSignal(watch, SIGNAL(dir ty(QString)), m_path)' returned FALSE. () Seems to still consistently failing here on windows :/ Yes. lines are truncated and messed up. thanks cmd.exe. /Sune ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
Re: KDirWatch vs QFileSystemWatcher
On Thursday 24 October 2013 21:54:42 Sune Vuorela wrote: Hi If your KDirWatch backend is QFileSystemWatcher, one of the testcases fails. The last QVERIFY in testMoveTo never receives the signal dirty-signal it is looking for. Apparantly, the watch.removeFile apparantly somehow turns off the QFSW to not do any further notifications for what happens in the directory that it also is supposed to be watching. I haven't yet fully understood what's going on here, but if someone is up for it, fixing it would be nice. Among others, it is the only backend available on windows. This dirty patch seems to ensure that QFSW is used on your platform: diff --git a/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp b/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp index 2a89372..8bc9d9b 100644 --- a/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp +++ b/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp @@ -103,12 +103,7 @@ static KDirWatch::Method methodFromString(const QString method) { } else if (method == QLatin1String(QFSWatch)) { return KDirWatch::QFSWatch; } else { -#ifdef Q_OS_LINUX -// inotify supports delete+recreate+modify, which QFSWatch doesn't support -return KDirWatch::INotify; -#else return KDirWatch::QFSWatch; -#endif } } Anyone looking into it would be nice. Please add that as a task on the cleanups page of the wiki if you don't plan to work on it. Here it'll likely be lost at some point. Cheers! -- Kévin Ottens, http://ervin.ipsquad.net Sponsored by KDAB to work on KDE Frameworks KDAB - proud supporter of KDE, http://www.kdab.com signature.asc Description: This is a digitally signed message part. ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
KDirWatch vs QFileSystemWatcher
Hi If your KDirWatch backend is QFileSystemWatcher, one of the testcases fails. The last QVERIFY in testMoveTo never receives the signal dirty-signal it is looking for. Apparantly, the watch.removeFile apparantly somehow turns off the QFSW to not do any further notifications for what happens in the directory that it also is supposed to be watching. I haven't yet fully understood what's going on here, but if someone is up for it, fixing it would be nice. Among others, it is the only backend available on windows. This dirty patch seems to ensure that QFSW is used on your platform: diff --git a/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp b/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp index 2a89372..8bc9d9b 100644 --- a/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp +++ b/tier1/kcoreaddons/src/lib/io/kdirwatch.cpp @@ -103,12 +103,7 @@ static KDirWatch::Method methodFromString(const QString method) { } else if (method == QLatin1String(QFSWatch)) { return KDirWatch::QFSWatch; } else { -#ifdef Q_OS_LINUX -// inotify supports delete+recreate+modify, which QFSWatch doesn't support -return KDirWatch::INotify; -#else return KDirWatch::QFSWatch; -#endif } } Anyone looking into it would be nice. /Sune ___ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel