New issue
Advanced search Search tips

Issue 875612 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Tast video tests fail with "Test data "/video.html" wasn't declared in definition passed to testing.AddTest"

Project Member Reported by derat@chromium.org, Aug 18

Issue description

The video.* tests have been failing recently:

2018/08/17 07:45:01 Started test video.PlayVP8
2018/08/17 07:45:01 [07:45:00.679] Restarting ui job
2018/08/17 07:45:02 [07:45:01.833] Waiting for org.chromium.SessionManager D-Bus service
2018/08/17 07:45:02 [07:45:01.846] Asking session_manager to enable Chrome testing
2018/08/17 07:45:02 [07:45:01.848] Waiting for Chrome to write its debugging port to /home/chronos/DevToolsActivePort
2018/08/17 07:45:03 [07:45:02.695] Removing cryptohome for testuser@gmail.com
2018/08/17 07:45:03 [07:45:02.759] Finding OOBE DevTools target
2018/08/17 07:45:03 [07:45:02.776] Connecting to Chrome at ws://127.0.0.1:55552/devtools/page/CC8CE7C3AC279D123919F71268B862E2
2018/08/17 07:45:03 [07:45:02.918] Waiting for OOBE
2018/08/17 07:45:05 [07:45:04.180] Logging in as user "testuser@gmail.com"
2018/08/17 07:45:05 [07:45:04.216] Waiting for cryptohome /home/user/1642ddab45c0d09938a0b983bd6bf1b407205b56
2018/08/17 07:45:06 [07:45:05.120] Waiting for OOBE to be dismissed
2018/08/17 07:45:07 [07:45:06.593] Creating new page with URL http://127.0.0.1:39120/video.html
2018/08/17 07:45:07 [07:45:06.620] Error at state.go:134: Test data "/video.html" wasn't declared in definition passed to testing.AddTest
2018/08/17 07:45:07 [07:45:06.620] Stack trace:
chromiumos/tast/testing.(*State).DataPath(0xc420202000, 0xc4202b4c44, 0xb, 0xc420053c18, 0x0)
	/build/tricky/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r138/work/tast-local-tests-cros-0.0.1/tast-base/src/chromiumos/tast/testing/state.go:134 +0x1e1
chromiumos/tast/local/bundles/cros/video/play.(*dataDir).Open(0xc420202000, 0xc4202b4c44, 0xb, 0xc420053c00, 0x7f260af6111f, 0xc4200d8800, 0xc42007f800)
	/build/tricky/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r138/work/tast-local-tests-cros-0.0.1/src/chromiumos/tast/local/bundles/cros/video/play/play.go:24 +0x41
net/http.serveFile(0x7f260b58ef60, 0xc42028a000, 0xc4203de000, 0x7f260b588200, 0xc420202000, 0xc4202b4c44, 0xb, 0xc420486e01)
	/usr/lib/go/x86_64-cros-linux-gnu/src/net/http/fs.go:551 +0xb7
net/http.(*fileHandler).ServeHTTP(0xc4202a2100, 0x7f260b58ef60, 0xc42028a000, 0xc4203de000)
	/usr/lib/go/x86_64-cros-linux-gnu/src/net/http/fs.go:715 +0xa3
net/http.serverHandler.ServeHTTP(0xc420322340, 0x7f260b58ef60, 0xc42028a000, 0xc4203de000)
	/usr/lib/go/x86_64-cros-linux-gnu/src/net/http/server.go:2694 +0xbe
net/http.(*conn).serve(0xc42001d9a0, 0x7f260b58f320, 0xc4202ce3c0)
	/usr/lib/go/x86_64-cros-linux-gnu/src/net/http/server.go:1830 +0x653
created by net/http.(*Server).Serve
	/usr/lib/go/x86_64-cros-linux-gnu/src/net/http/server.go:2795 +0x27d

I think that the problem is that the http.FileSystem interface's Open function can receive paths with a leading slash, which test.DataPath doesn't expect. I suspect that updating our Open implementation to strip the slash will fix this.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/759ad59af186b78565be0055102d54534c7bd0cb

commit 759ad59af186b78565be0055102d54534c7bd0cb
Author: Daniel Erat <derat@chromium.org>
Date: Wed Aug 22 02:27:47 2018

tast-tests: Avoid unregistered data paths in video tests.

test.DataPath recently started checking that paths passed to
it were previously registered as belonging to the test. The
"play" package (containing common playback code for local
video tests) implements http.FileSystem to serve files, and
it looks like absolute paths prefixed with a '/' are passed
to it. This change updates the package to strip leading
slashes from requested paths to avoid errors.

Also avoid errors caused when Chrome requests favicon.ico
files.

BUG= chromium:875612 
TEST=manual: video.PlayVP8 passes locally

Change-Id: I132b2975702668da27abef1cb31356c314d5dc64
Reviewed-on: https://chromium-review.googlesource.com/1180651
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/759ad59af186b78565be0055102d54534c7bd0cb/src/chromiumos/tast/local/bundles/cros/video/play/play.go

Status: Fixed (was: Started)

Sign in to add a comment