Subject: Re: bug#26716: Test nginx configuration

From: Christopher Allan Webber <[email-masked]>
Date: Sun, 30 Apr 2017 14:56:38 -0500

Julien Lepiller writes:

>> So is the goal here that it will raise an exception if it doesn't
>> exist, like so?
>> 
>>   ERROR: In procedure lstat: No such file or directory:
>> "/tmp/no-such-file"
>> 
>> That does seem like useful information to spit out.
>> 
>> Maybe add a comment before the lstat explaining the call?  If I didn't
>> know that's why lstat was being used here I would have been confused.
> exactly, I added a comment.

Great!

>> Oh, that's interesting.  So in my experience earlier, it was proably
>> *trying* to log some information, and failing I guess.
>> 
>> It would be even nicer if they wrote to the same file by default, but
>> I guess this probably isn't easy to do without actually patching nginx
>> itself, which isn't likely worth it... is that right?
> I tried using the -g option to give it some configuration options
> (including error_log), but it doesn't seem to change that behaviour, so
> I think we'll have to fix nginx to use the same configuration file.
>
> Of course it would be better to fail at reconfigure when the generated
> configuration is not correct. That's what I'm trying to do with the
> first patch, but that's only one possible mistake.

Cool... yes I agree it's only one possible mistake. :)

Looks good.  I assume you've tried testing building with it?  Assuming
all builds and things also error out right now in the new and expected
ways when the configuration needs updating, I say push it!