[Piglit] [PATCH] programs/run.py add file sync command line option

Atwood, Matthew S matthew.s.atwood at intel.com
Thu Aug 14 10:04:11 PDT 2014


Changed for version 2

-----Original Message-----
From: Dylan Baker [mailto:baker.dylan.c at gmail.com] 
Sent: Wednesday, August 13, 2014 3:48 PM
To: Atwood, Matthew S
Cc: Ilia Mirkin; piglit at lists.freedesktop.org
Subject: Re: [Piglit] [PATCH] programs/run.py add file sync command line option

[snip]
> 
> Also using os.fsync will bypass any data that's still buffered and not 
> sent out to the underlying API. You probably want a self.file.flush() 
> in there.
> 
> I'm also surprised this works at all. os.fsync should be expecting an 
> int, so you'd have to use self.file.fileno(). Perhaps there's some 
> magic that takes care of it somewhere (e.g. a __int__ override or
> something)
> 
The documentation (https://docs.python.org/2/library/os.html#os.fsync)
specifically says that, so yes, this should be changed.


More information about the Piglit mailing list