Re: Review Request 117995: [screenlocker] Add a unit test for KSldApp
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/#review57919 --- This review has been submitted with commit 4325433cb3be75567d41fda4027ead5e8263350b by Martin Gräßlin to branch master. - Commit Hook On May 9, 2014, 6:26 a.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- (Updated May 9, 2014, 6:26 a.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. As the test is using doUnlock() from KSldApp, the implementation is changed to use xcb for ungrab pointer/keyboard. With XLib the test would have needed an XSync which would have required to either add the XLib call to the test or doUnlock or implement the sync using xcb. REVIEW: 117995 Diffs - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h fafe894ee2068910f2f42584a1f30303036619da ksmserver/screenlocker/ksldapp.cpp 007eb2a7032d3f3210ce6a211ae9b4562dba1508 Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117995: [screenlocker] Add a unit test for KSldApp
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- (Updated May 14, 2014, 12:01 p.m.) Status -- This change has been marked as submitted. Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. As the test is using doUnlock() from KSldApp, the implementation is changed to use xcb for ungrab pointer/keyboard. With XLib the test would have needed an XSync which would have required to either add the XLib call to the test or doUnlock or implement the sync using xcb. REVIEW: 117995 Diffs - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h fafe894ee2068910f2f42584a1f30303036619da ksmserver/screenlocker/ksldapp.cpp 007eb2a7032d3f3210ce6a211ae9b4562dba1508 Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117995: [screenlocker] Add a unit test for KSldApp
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/#review57877 --- Ship it! Ship It! - David Edmundson On May 9, 2014, 6:26 a.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- (Updated May 9, 2014, 6:26 a.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. As the test is using doUnlock() from KSldApp, the implementation is changed to use xcb for ungrab pointer/keyboard. With XLib the test would have needed an XSync which would have required to either add the XLib call to the test or doUnlock or implement the sync using xcb. REVIEW: 117995 Diffs - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h fafe894ee2068910f2f42584a1f30303036619da ksmserver/screenlocker/ksldapp.cpp 007eb2a7032d3f3210ce6a211ae9b4562dba1508 Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117995: [screenlocker] Add a unit test for KSldApp
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- (Updated May 9, 2014, 8:26 a.m.) Review request for Plasma and David Edmundson. Changes --- changed as suggested to use doUnlock, but this is changed to use xcb. Repository: plasma-workspace Description (updated) --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. As the test is using doUnlock() from KSldApp, the implementation is changed to use xcb for ungrab pointer/keyboard. With XLib the test would have needed an XSync which would have required to either add the XLib call to the test or doUnlock or implement the sync using xcb. REVIEW: 117995 Diffs (updated) - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h fafe894ee2068910f2f42584a1f30303036619da ksmserver/screenlocker/ksldapp.cpp 007eb2a7032d3f3210ce6a211ae9b4562dba1508 Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117995: [screenlocker] Add a unit test for KSldApp
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/#review57591 --- ksmserver/screenlocker/autotests/CMakeLists.txt https://git.reviewboard.kde.org/r/117995/#comment40055 does running ctest in the build directory try to run this? We don't want that to happen. Same for pointer grabber. ksmserver/screenlocker/autotests/keyboardgrabber.cpp https://git.reviewboard.kde.org/r/117995/#comment40056 add something like /* This app grabs the keyboard from X. It is used from ksldtest to verify wereport if grabbing failed when the lock is held by an external application. */ ksmserver/screenlocker/autotests/ksldtest.cpp https://git.reviewboard.kde.org/r/117995/#comment40054 I'm not sure this is a good test to manipulate the internal state of the app we're testing. ksld.doUnlock(); would be better as we get to test that part of ksld too. It might need the grab part splitting out. ksmserver/screenlocker/autotests/ksldtest.cpp https://git.reviewboard.kde.org/r/117995/#comment40053 again? - David Edmundson On May 5, 2014, 11:32 a.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- (Updated May 5, 2014, 11:32 a.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. Diffs - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117995: [screenlocker] Add a unit test for KSldApp
On May 8, 2014, 5:21 p.m., David Edmundson wrote: ksmserver/screenlocker/autotests/CMakeLists.txt, line 30 https://git.reviewboard.kde.org/r/117995/diff/1/?file=271561#file271561line30 does running ctest in the build directory try to run this? We don't want that to happen. Same for pointer grabber. no, ecm_mark_as_test only marks the binary that it is a test application. But it's not added as a test. - Martin --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/#review57591 --- On May 5, 2014, 1:32 p.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- (Updated May 5, 2014, 1:32 p.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. Diffs - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Review Request 117995: [screenlocker] Add a unit test for KSldApp
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117995/ --- Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Add a unit test for KSldApp The unit test so far only tests establishGrab. This is a little bit tricky as we need a different X Client which grabs pointer or keyboard to make establishGrab fail. For that two small helper applications are included which do nothing else than connecting to X and the one grabbing keyboard the other grabbing pointer. The applications are started from the test to get the keyboard/pointer grabbed which results in ::establishGrab to return false. What this test is not yet able to test is handling the sleep between two grab attemps. Diffs - ksmserver/screenlocker/autotests/CMakeLists.txt ff95d9d031cdac32085e358e30b95a9e9a6fb7dc ksmserver/screenlocker/autotests/keyboardgrabber.cpp PRE-CREATION ksmserver/screenlocker/autotests/ksldtest.cpp PRE-CREATION ksmserver/screenlocker/autotests/pointergrabber.cpp PRE-CREATION ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be Diff: https://git.reviewboard.kde.org/r/117995/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel