Options:
- # Session Start: Fri Sep 20 14:27:53 2013
- # Session Ident: #testing
- # [14:27] * Now talking in #testing
- # [14:27] <krijnh> jgraham: yep!
- # [14:27] <jgraham> darobin: also, 11:55 < jgraham> So, I wonder if there should be a single repo that contains both wptserve and web-platform-tests as submodules
- # [14:28] <jgraham> krijnh: Thanks!
- # [14:30] <tobie> jgraham: why not make it a submodule of web-platform-tests?
- # [14:30] <jgraham> tobie: Well making the server a submodule of w-p-t is another possibility, but then I will need to add (more?) rules so that you don't try and serve the server code
- # [14:31] <jgraham> I guess I need to exclude /tools anyway
- # [14:31] <tobie> hadn't thought about that.
- # [14:31] <tobie> but yeah, a config file with excluded repos sounds like a reasonable idea
- # [14:31] <tobie> s/repos/dirs/
- # [14:32] <jgraham> And if you want to have a single script that does "start the server with all the right config" in the root directory, that needs to be excluded too
- # [14:32] <jgraham> I guess this isn't an insurmountable problem. I hadn't realised that I would have to solve it anyway
- # [14:33] <jgraham> So I think I retract my suggestion
- # [14:34] <darobin> jgraham: yeah, I reckon that just putting wptserve inside wpt would make sense
- # [14:34] <darobin> the more self-contained the better
- # [14:36] <jgraham> OK, I will do that on the branch
- # [14:37] <jgraham> But first lunch
- # [15:00] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
- # [15:12] * Joins: gitbot (~gitbot@public.cloak)
- # [15:12] -gitbot:#testing- [web-platform-tests] hallvors pushed 1 new commit to hallvors/XHRbugFix3: https://github.com/w3c/web-platform-tests/commit/d8e47ea2f318d0f2f0fd6001f04d9f1d9aa6a3dd
- # [15:12] -gitbot:#testing- web-platform-tests/hallvors/XHRbugFix3 d8e47ea Hallvord R. M. Steen: dropping invalid tests for data: and about:blank, adding a data: URL that won't parse
- # [15:12] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
- # [15:41] <jgraham> So, more random thoughts:
- # [15:42] <jgraham> What if we only supported running the tests on some unpriviledged port, like 8000. Or rather 8000, 8001 and 4430, so something
- # [15:42] <jgraham> s/so/or/
- # [15:42] <darobin> the value being?
- # [15:42] <jgraham> YOu wouldn't need to sudo to get the "real" configuration
- # [15:43] <jgraham> Otherwise I think we need to support both and find some clever way to deal with tests that try to hardcode port numbers
- # [15:44] <jgraham> (going totally the other way, we could support running on *random* ports and have some magical substitution syntax so that tests could find out the ports in case they need to know
- # [15:44] <jgraham> )
- # [15:45] <AutomatedTester> is this for the webserver?
- # [15:45] <jgraham> Yes
- # [15:45] <AutomatedTester> the python one?
- # [15:45] <jgraham> Yes
- # [15:45] <AutomatedTester> ask the OS for a free port and then share that information to the tests
- # [15:45] <jgraham> That sounds good, but it's not that easy to do
- # [15:46] <AutomatedTester> which part is not easy?
- # [15:46] <jgraham> The second part
- # [15:47] <AutomatedTester> how are the tests started/loaded?
- # [15:47] <darobin> it may generally be useful to have the test be able to load configuration information from a reliable source
- # [15:47] <jgraham> HTTP GET to the test URL
- # [15:47] <darobin> e.g. for domains as well
- # [15:47] <jgraham> Well domains aren't so hard
- # [15:47] <darobin> jgraham: if we run this on the web on a common site I'd rather we did that on port 80
- # [15:48] <darobin> at least, I think I'd rather that
- # [15:48] * darobin thinks
- # [15:48] <jgraham> Because you always know that the domain that you loaded the test from is the "main" domain
- # [15:48] <jgraham> and there are subdomains
- # [15:48] <AutomatedTester> darobin: on a common site you would probably have a port forwarding mechansim like a loadbalancer or tables
- # [15:49] <jgraham> and then we are good right up to certificates and other such things
- # [15:49] <AutomatedTester> or wsgi
- # [15:49] <jgraham> AutomatedTester: That doesn't really help
- # [15:49] <jgraham> AFAICT
- # [15:49] <AutomatedTester> if wsgi?
- # [15:49] <jgraham> I guess one other problem is that ports 80 and 443 are blessed
- # [15:49] <AutomatedTester> helps if it MUST be on a common site for people to use
- # [15:50] <jgraham> So URL serialization happens differently there
- # [15:51] <jgraham> Which kind of suggests that you want to always run on those ports
- # [15:52] <jgraham> But I wouldn't be super happy making people run the server as root (and work out how to disable their other web server)
- # [15:52] <jgraham> And it might not even be allowed on automation
- # [15:52] <jgraham> AutomatedTester: ^?
- # [15:52] <darobin> AutomatedTester: on a normal site, yes, on this one I would really rather avoid fronting it with anything
- # [15:52] <darobin> we've had too many problems with servers rewriting stuff
- # [15:53] <AutomatedTester> jgraham: I dont think we can run on root on our test infra
- # [15:53] <AutomatedTester> jgraham: a number of things internally at Mozilla start the webserver on a random port and pass to the tests
- # [15:53] <darobin> I agree we need to support running on arbitrary ports; I'm just not sure that we want to enforce specific ones
- # [15:54] <jgraham> OK
- # [15:54] <jgraham> So
- # [15:54] <darobin> also, re running as root, can't you just grab the port and then drop privilege?
- # [15:54] <AutomatedTester> random port == port that we given by OS
- # [15:54] <AutomatedTester> not sure
- # [15:55] <jgraham> This doesn't solve the problem that location.href on port 80 looks very different from location.href for the same site on port 17890
- # [15:55] <jgraham> I *suppose* we can just expect the tests to deal with that
- # [15:56] <jgraham> It also doesn't suggest a good way of passing this port information to the tests
- # [15:56] <tobie> We should just document these assumptions
- # [15:56] <jgraham> I don't really fancy doing string substitution on every file we serve
- # [15:57] <tobie> no?
- # [15:57] <tobie> :D
- # [15:58] <jgraham> (but just doing some magic so that it is avaliable through js isn't always good enough e.g. a CSS file might use background-image with a different port url())
- # [15:58] <darobin> jgraham: I would hope the tests really deal with that, but if it's going to work they'll need someone to tell them what the port is, no?
- # [15:59] <jgraham> darobin: The questions are "who" and "how", I think
- # [15:59] <darobin> well for JS, just GET /config and receive some JSON with all you need
- # [15:59] <jgraham> (also means we can't *test* url serialization rules for default ports)
- # [15:59] <darobin> for CSS, well, that sucks
- # [15:59] <tobie> are there a valid use cases for CSS needing that info?
- # [16:00] <jgraham> tobie: 13:58 < jgraham> (but just doing some magic so that it is avaliable through js isn't always good enough e.g. a CSS file might use background-image with a different port url())
- # [16:00] <tobie> Is this currently an issue in the CSS WG?
- # [16:00] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
- # [16:01] * Joins: zcorpan (~zcorpan@public.cloak)
- # [16:01] <jgraham> I don't know. I don't know what setup they use
- # [16:01] <tobie> plinss: should be able to help here. He's due to write-up a set of reqs for this anyway.
- # [16:01] <jgraham> So the CSS problem we can solve
- # [16:02] <jgraham> at the cost that every file that wants to know the port has to be a .py file
- # [16:02] <jgraham> The "how do I test rules that depend on whether we are running on port 80 or not" problem strikes me an unsolvable without running on port 80
- # [16:03] <tobie> Curious if this is actually an issue for the CSS WG now.
- # [16:03] <AutomatedTester> if everything just used webdriver™
- # [16:03] <AutomatedTester> :P
- # [16:03] <jgraham> I don't see how this is related to WebDriver
- # [16:03] <tobie> nwither do I actually
- # [16:04] <jgraham> the problem is
- # [16:04] <AutomatedTester> the test setup in python could start the server and then get the port number
- # [16:05] <jgraham> AutomatedTester: That part isn't the problem
- # [16:05] <jgraham> I can fix that
- # [16:05] <jgraham> I can't write test(function() {assert_equals("http://server-name/foo", window.location.href)}
- # [16:05] <jgraham> Even if I know server-name
- # [16:05] <jgraham> I can only write
- # [16:06] <jgraham> test(function() {assert_equals("http://server-name:port/foo", window.location.href)}
- # [16:06] <jgraham> Except that's wrong if port is 80
- # [16:06] <jgraham> So I have to test a different codepath depending on whether the port is 80 or not
- # [16:06] <jgraham> i.e.
- # [16:07] <tobie> assert_url_equals
- # [16:07] <jgraham> test(function() {assert_equals(port === 80 ? "http://server-name/foo" : "http://server-name:port/foo", window.location.href)}
- # [16:07] <jgraham> Which is bad
- # [16:07] <jgraham> Because whether the test passes depends on which server you run it on
- # [16:08] * Quits: zcorpan (~zcorpan@public.cloak) (Ping timeout: 180 seconds)
- # [16:08] <tobie> Let me try to understand this better
- # [16:09] <tobie> Are you concerned with not being able to test that port 80 doesn't show in the window.location.href unless you're running on port 80?
- # [16:09] <jgraham> Yes
- # [16:11] <tobie> Well, that's a bit like running a reftest on a setup that can't take screenshots: you're screwed.
- # [16:11] <darobin> have I missed the bit where that's a part of the platform where we're worried about interop?
- # [16:11] <jgraham> I think the concern boils down to "not being on both port 80 and some other port makes it impossible to test some simple features. Worse, it makes it easy to write a test where the pass condition depends on the server"
- # [16:11] <darobin> I mean, sure, we want to test that
- # [16:11] <darobin> but maybe it shouldn't condition everything?
- # [16:11] <jgraham> darobin: You haven't been working on servo, I take it :)
- # [16:12] <darobin> (I guess there are places where it matters more though)
- # [16:12] <darobin> jgraham: heh, point taken
- # [16:12] * darobin would actually like to work on Servo, if he happened to be competent for that, which he isn't
- # [16:13] <tobie> I think I'm missing the big picture here.
- # [16:13] <tobie> For how many tests is this an issue?
- # [16:14] <jgraham> I have no idea
- # [16:15] <tobie> Well, what API's outside of window.loc are affected by this?
- # [16:15] <jgraham> Possibly URL?
- # [16:16] <tobie> Depending on how the tests are run, this is true
- # [16:17] <tobie> But that's really an implementation detail of the test, is it not?
- # [16:17] <jgraham> I don't understand the question
- # [16:18] <tobie> What I'm clumsily trying to get at is that there are two kinds of tests affected by this
- # [16:19] <tobie> 1) those that test whether :80 doesn't show up in URLs
- # [16:19] <tobie> for these, there are probably little we can do if not running on port 80.
- # [16:20] * Joins: mdas_ (~mdas@public.cloak)
- # [16:20] <tobie> 2) tests where we're not really concerned about :80 being implicit, but it so happens that we're relying on this behavior (somewhat accidentally)
- # [16:20] <jgraham> Yes, I agree
- # [16:20] <tobie> These tests should be fixed.
- # [16:20] <jgraham> So we can fix type 2 tests
- # [16:22] <jgraham> I guess I can add that yak to my shaving pile
- # [16:24] <tobie> re type 1 test I guess we should just not run the tests when not on port 80 (and report a NOTRUN)
- # [16:26] * Quits: mdas (~mdas@public.cloak) (Ping timeout: 180 seconds)
- # [16:27] <jgraham> Hmm, interesting idea
- # [16:28] <jgraham> But it doesn't help that much if only w3c-test.org uses port 80
- # [16:32] * Joins: zcorpan (~zcorpan@public.cloak)
- # [16:51] <jgraham> AutomatedTester: Do you have a good python function to find a free port somewhere? I can write a simple one ofc but there might be a better way
- # [16:53] <AutomatedTester> jgraham: https://code.google.com/p/selenium/source/browse/py/selenium/webdriver/common/utils.py#22
- # [16:55] <jgraham> So, wait, what? Binding to port 0 selects a free port?
- # [16:57] <jgraham> That seems to be the case
- # [16:58] <jgraham> Cool, I learnt my one thing for today
- # [16:58] <jgraham> Just need to make sure not to do it again
- # [17:01] <darobin> that's a pretty cool default
- # [17:16] * Joins: jhammel (~jhammel@public.cloak)
- # [17:51] <jgraham> So, anyone for websockets?
- # [17:52] <jgraham> I think we need to host our own clone of pywebsocket
- # [17:52] <jgraham> In git
- # [17:52] <jgraham> Then we can submodule it
- # [17:52] <jgraham> Then we can hope that it doesn't really care which port its on
- # [17:52] <jgraham> +'
- # [17:55] <AutomatedTester> yea, selecting port 0 means the OS will give you a free port
- # [17:56] <AutomatedTester> so you then disconnect and *hopefully* its still free
- # [17:56] <AutomatedTester> neat little trick :)
- # [17:57] <jgraham> Yeah, kind of obviously racy
- # [17:57] <jgraham> But good none-the-less
- # [17:58] <jgraham> (you presumably could pass the actual socket back if whatever you want to use the port for supported passing sockets in)
- # [17:58] <AutomatedTester> its Good Enough™
- # [17:58] <jgraham> (which typically they don't)
- # [17:58] * Quits: Lachy (~Lachy@public.cloak) ("My MacBook Pro has gone to sleep. ZZZzzz…")
- # [18:01] * darobin wonders if it's really intended that jgraham has the right to clone repos to the w3c org :)
- # [18:04] <jgraham> It does seem strange that I can't add a user to an existing repo, but I can add whole new repos
- # [18:04] <darobin> jgraham: wait... so you can fork an existing repo to w3c, but can't create a w3c repo from scract?
- # [18:04] <darobin> scratch
- # [18:04] <jgraham> I can create one from scratch
- # [18:05] <darobin> ah, I read that backwards
- # [18:05] <darobin> sorry
- # [18:05] <jgraham> I can't give others commit access to the existing repos
- # [18:06] <darobin> well, maybe we trust you to come into the sheep house but not to be discerning as to which wolves you invite in?
- # [18:06] <jgraham> (or, potentially, I can't work out how in the UI, but I don't think it's that)
- # [18:30] * Quits: darobin (rberjon@public.cloak) (Client closed connection)
- # [18:36] * Joins: scott_gonzalez (~scott_gonzalez@public.cloak)
- # [18:37] <tobie> jgraham: I checked: you have admin privileges on wpt
- # [18:37] <jgraham> tobie: Oh. OK
- # [18:37] <tobie> but that doesn't give you the right to invite folks
- # [18:37] <jgraham> Then I guess I just don't understand the github ui
- # [18:37] <jgraham> Oh
- # [18:37] <tobie> as that's an org level thing
- # [18:37] <tobie> (afaik)
- # [18:37] <jgraham> ThenI just don't understand the permissions model
- # [18:38] <tobie> yeah, it's funky
- # [18:39] * Joins: Automate_ (~AutomatedTester@public.cloak)
- # [18:39] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
- # [18:41] <andreastt> Automate_, jgraham: Did it use to be the default in Python that 0 did that?
- # [18:41] <andreastt> I distinctly remember some more complicated code (à la the Java implementation in Selenium) for doing that in Python.
- # [18:43] * Quits: tobie (tobie@public.cloak)
- # [18:45] * Quits: dom (dom@public.cloak) ("")
- # [18:58] <Automate_> andreastt: the selenium code uses 0 in python
- # [18:58] <Automate_> andreastt: its ~5 lines of code
- # [18:59] <Automate_> https://code.google.com/p/selenium/source/browse/py/selenium/webdriver/common/utils.py#22
- # [18:59] <andreastt> Certainly delegating it to the library is a neat trick.
- # [19:04] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
- # [19:06] * Joins: Lachy (~Lachy@public.cloak)
- # [19:08] * Joins: zcorpan (~zcorpan@public.cloak)
- # [19:08] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
- # [19:08] * Joins: zcorpan (~zcorpan@public.cloak)
- # [19:15] * Quits: zcorpan (~zcorpan@public.cloak) (Ping timeout: 180 seconds)
- # [19:15] * Joins: glenn (~gadams@public.cloak)
- # [19:39] * Joins: zcorpan (~zcorpan@public.cloak)
- # [20:16] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
- # [20:16] * Quits: Automate_ (~AutomatedTester@public.cloak) (Client closed connection)
- # [20:28] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
- # [20:28] * Joins: zcorpan (~zcorpan@public.cloak)
- # [21:08] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
- # [21:08] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
- # [21:49] * Quits: zcorpan (~zcorpan@public.cloak) (Client closed connection)
- # [21:49] * Joins: zcorpan (~zcorpan@public.cloak)
- # [21:56] * Quits: zcorpan (~zcorpan@public.cloak) (Ping timeout: 180 seconds)
- # [21:58] * Joins: zcorpan (~zcorpan@public.cloak)
- # [22:21] * Quits: glenn (~gadams@public.cloak) (Client closed connection)
- # [22:22] * Quits: ArtB (~abarsto@public.cloak) (Ping timeout: 180 seconds)
- # [22:51] * Joins: Automate_ (~AutomatedTester@public.cloak)
- # [22:51] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
- # [23:42] * Joins: tobie (tobie@public.cloak)
- # [23:48] * Joins: gitbot (~gitbot@public.cloak)
- # [23:48] -gitbot:#testing- [web-platform-tests] tobie pushed 2 new commits to master: https://github.com/w3c/web-platform-tests/compare/069ff216c8ba...a3fb594ee776
- # [23:48] -gitbot:#testing- web-platform-tests/master 691f05c Tobie Langel: Make the coverage tool rely on the specref db.
- # [23:48] -gitbot:#testing- web-platform-tests/master a3fb594 Tobie Langel: Merge pull request #344 from tobie/coverage-tool-updates...
- # [23:48] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
- # [23:57] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
- # [23:57] * Quits: Automate_ (~AutomatedTester@public.cloak) (Client closed connection)
- # Session Close: Sat Sep 21 00:00:00 2013
The end :)