[nSLUG] Improving QA of Linux distributions

D G Teed donald.teed at gmail.com
Fri Jun 24 20:32:33 ADT 2011


On Fri, Jun 24, 2011 at 5:56 PM, Peter Dobcsanyi <petrus at ftml.net> wrote:

> On Fri, Jun 24, 2011 at 04:51:48PM -0300, D G Teed wrote:
> > On Fri, Jun 24, 2011 at 4:30 PM, Peter Dobcsanyi <petrus at ftml.net>
> wrote:
> >
> > > On Fri, Jun 24, 2011 at 12:36:54PM -0300, D G Teed wrote:
> > > > I would think everyone who is writing code (say at Redhat, in this
> case
> > > > of not testing for a file before opening) is aware of things they
> teach
> > > in
> > >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > > a first year programming course.
> > >
> > > Could you, please, explain what kind of "testing" you have in mind and
> > > why that would be beneficial.
> > >
> > >
> > I checked my email history and my memory was slightly off.
> > In the problem I encountered, the file existed, but it was empty.
> ...
> > This could have been recovered more gracefully by testing
> > for error after a read from the file.
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> So we can conclude that, in general, there is no point to testing
> anything *before* opening a file. No to mention the time window between
> a test (whatever it would be) and the actual open operation.
>

I was talking about a specific bug I encountered which could have
been assisted by better error checking on the read.  One could
also have a check on the file system to ensure the file was there
or non-zero size, or whatever.  There should be error checking
on any connections external to the program.   I'm not sure
what you are getting at.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/mailman/private/nslug/attachments/20110624/50c86262/attachment-0002.html>


More information about the nSLUG mailing list