Bug 75712 - NRWT mysteriously exits when Apache returns an error code
Summary: NRWT mysteriously exits when Apache returns an error code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-06 09:39 PST by Adam Roben (:aroben)
Modified: 2012-01-09 10:39 PST (History)
5 users (show)

See Also:


Attachments
Print an error message when NRWT can't run Apache (4.10 KB, patch)
2012-01-06 10:04 PST, Adam Roben (:aroben)
dpranke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2012-01-06 09:39:45 PST
To reproduce:

1. mv /usr/sbin/httpd{,.bak}
2. cat > /usr/sbin/httpd
#!/bin/sh
exit 1
^D
3. chmod +x /usr/sbin/httpd
4. new-run-webkit-tests http
5. sudo mv /usr/sbin/httpd{.bak,}

(Obviously these steps are just a way of simulating Apache returning an error code.)

You'll see this output in step 4:

 % new-run-webkit-tests http     
Checking system dependencies ...%

Not very helpful!
Comment 1 Adam Roben (:aroben) 2012-01-06 10:04:21 PST
Created attachment 121444 [details]
Print an error message when NRWT can't run Apache
Comment 2 Dirk Pranke 2012-01-06 10:12:40 PST
Comment on attachment 121444 [details]
Print an error message when NRWT can't run Apache

View in context: https://bugs.webkit.org/attachment.cgi?id=121444&action=review

> Tools/Scripts/webkitpy/layout_tests/port/base.py:240
> +                _log.error("httpd returned an error code. Cannot run http tests.")

Nit: can you rephrase this to give a little context to what we were doing? something like "checking if httpd works failed (httpd returned an error code). Cannot run http tests".
Comment 3 Adam Roben (:aroben) 2012-01-06 12:51:56 PST
Comment on attachment 121444 [details]
Print an error message when NRWT can't run Apache

View in context: https://bugs.webkit.org/attachment.cgi?id=121444&action=review

>> Tools/Scripts/webkitpy/layout_tests/port/base.py:240
>> +                _log.error("httpd returned an error code. Cannot run http tests.")
> 
> Nit: can you rephrase this to give a little context to what we were doing? something like "checking if httpd works failed (httpd returned an error code). Cannot run http tests".

I'm having a hard time coming up with a way of phrasing this in a clear way. What value does the extra context contribute? The user tried to run http tests, and httpd failed, so we can't run them. It seems pretty clear even if you don't know that we were just trying to see if httpd exists.
Comment 4 Dirk Pranke 2012-01-06 13:05:05 PST
(In reply to comment #3)
> (From update of attachment 121444 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=121444&action=review
> 
> >> Tools/Scripts/webkitpy/layout_tests/port/base.py:240
> >> +                _log.error("httpd returned an error code. Cannot run http tests.")
> > 
> > Nit: can you rephrase this to give a little context to what we were doing? something like "checking if httpd works failed (httpd returned an error code). Cannot run http tests".
> 
> I'm having a hard time coming up with a way of phrasing this in a clear way. What value does the extra context contribute? The user tried to run http tests, and httpd failed, so we can't run them. It seems pretty clear even if you don't know that we were just trying to see if httpd exists.

The problem (confusion?) I'm seeing is that the user isn't actually trying to run http tests at that point (we're still checking system dependencies), and may not have actually specified anything specific about http (could just be running all tests).

How about "httpd seems broken. Cannot run system tests."? "seems broken" seems a little more informative to me than "returned an error code", in that it's saying there's something very wrong (it's not like httpd -v should normally fail).
Comment 5 Adam Roben (:aroben) 2012-01-09 10:39:08 PST
Committed r104463: <http://trac.webkit.org/changeset/104463>