[Interest] Behavioural change in QFile/QDir rename

Federico Buti fed.buti at gmail.com
Sat Jun 15 17:58:31 CEST 2019


Hi all.

Recently we successfully switched from Qt 5.6 to Qt 5.12.3 after some
struggles on win
<https://lists.qt-project.org/pipermail/interest/2019-May/033207.html>.
Very few unit tests failed out of hundreds. Among those one stood out as
quite strange and I'm looking for feedback on it.

We wrote a simple wrapper around inotify API to collect events in a target
directory for the set {IN_CREATE, IN_OPEN, IN_MODIFY, IN_CLOSE,
IN_MOVED_TO, IN_DELETE}. All the unit tests for those events pass correctly
on 5.12. All of them with the exception of the test for moved/renamed files
which fails miserably.
We gave strace a go and we noticed that 5.12 runtime acts differently for
rename/move operations (see attached compare screenshot). In particular, on
5.6 we have an actual rename whereas a link/unlink sequence happens on
5.12. That sequence is not detected by our code, generating the failure.

How can we handle this change? We should maybe pay attention to IN_ATTRIB
attributes for link, shouldn't we? Can someone point out the commit that
changes the behaviour?

Any advice is pretty much appreciated!
Thanks in advance
F.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190615/5d557be4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 59329574-79337a80-8cef-11e9-8275-5508b55641c2.png
Type: image/png
Size: 525719 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190615/5d557be4/attachment.png>


More information about the Interest mailing list