[PATCH] KConfig: Rewrite globals only if modified

David Faure faure at kde.org
Tue Feb 26 09:51:45 GMT 2008

On Tuesday 26 February 2008, Oswald Buddenhagen wrote:
> On Tue, Feb 26, 2008 at 01:19:36AM +0100, Chusslove Illich wrote:
> > > [: David Faure :]
> > > [...] I was wondering if it was possible to actively test for what the
> > > patch is fixing - I guess that means "testing that the global config isn't
> > > rewritten when not necessary, by comparing its timestamp from before and
> > > after the write operation" [...]
> > 
> > How about this?
> > 
> if you use two separate configs, you can parallelize the tests and thus
> cut away one second of delay.
> fwiw, on fat16 the resolution would be two seconds, on any modern fs
> qdatetime's millisecond field *should* be usable (assuming qt actually
> does that ...). you *could* detect it by setting arbitrary stamps and
> bisecting. ok, that's sorta overkill ... ;)

In other tests I used a simpler solution: touching the file into the past,
and then making the change that is not supposed to change the file's mtime.
No delay needed.

Look for "utime" in kdelibs/kio/tests/kiotesthelper.h  (unix-only, of course).

David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list