From 74839e86d7b34195b03b4dc49a1418144d67a22e Mon Sep 17 00:00:00 2001 From: "ulan@chromium.org" Date: Tue, 9 Apr 2013 08:39:01 +0000 Subject: [PATCH] Modifications to tests and test tools for Native Client V8. BUG=2614 Review URL: https://chromiumcodereview.appspot.com/13638013 Patch from Brad Chen . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/cctest/cctest.status | 13 +++++++++++++ test/cctest/testcfg.py | 4 ++++ test/message/testcfg.py | 8 +++++++- test/mjsunit/mjsunit.status | 31 +++++++++++++++++++++++++++++++ tools/run-tests.py | 6 +++++- tools/testrunner/local/statusfile.py | 2 +- 6 files changed, 61 insertions(+), 3 deletions(-) diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status index b457ef2..616f712 100644 --- a/test/cctest/cctest.status +++ b/test/cctest/cctest.status @@ -90,3 +90,16 @@ test-platform-tls/FastTLS: SKIP # This test times out. test-threads/ThreadJoinSelf: SKIP + +############################################################################## +[ $arch == nacl_ia32 || $arch == nacl_x64 ] + +# These tests fail as there is no /tmp directory in Native Client. +test-log/LogAccessorCallbacks: SKIP +test-log/LogCallbacks: SKIP +test-log/ProfLazyMode: SKIP + +# Native Client doesn't support sockets. +test-debug/DebuggerAgent: SKIP +test-debug/DebuggerAgentProtocolOverflowHeader: SKIP +test-sockets/Socket: SKIP diff --git a/test/cctest/testcfg.py b/test/cctest/testcfg.py index 86dc740..4c2cd23 100644 --- a/test/cctest/testcfg.py +++ b/test/cctest/testcfg.py @@ -57,6 +57,10 @@ class CcTestSuite(testsuite.TestSuite): return [] tests = [] for test_desc in output.stdout.strip().split(): + if test_desc.find('<') < 0: + # Native Client output can contain a few non-test arguments + # before the tests. Skip these. + continue raw_test, dependency = test_desc.split('<') if dependency != '': dependency = raw_test.split('/')[0] + '/' + dependency diff --git a/test/message/testcfg.py b/test/message/testcfg.py index 1b788d5..dba65a9 100644 --- a/test/message/testcfg.py +++ b/test/message/testcfg.py @@ -74,7 +74,13 @@ class MessageTestSuite(testsuite.TestSuite): """Ignore empty lines, valgrind output and Android output.""" if not string: return True return (string.startswith("==") or string.startswith("**") or - string.startswith("ANDROID")) + string.startswith("ANDROID") or + # These five patterns appear in normal Native Client output. + string.startswith("DEBUG MODE ENABLED") or + string.startswith("tools/nacl-run.py") or + string.find("BYPASSING ALL ACL CHECKS") > 0 or + string.find("Native Client module will be loaded") > 0 or + string.find("NaClHostDescOpen:") > 0) def IsFailureOutput(self, output, testpath): expected_path = os.path.join(self.root, testpath + ".out") diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status index 7fa9b72..09097db 100644 --- a/test/mjsunit/mjsunit.status +++ b/test/mjsunit/mjsunit.status @@ -202,3 +202,34 @@ debug-liveedit-stack-padding: SKIP debug-liveedit-restart-frame: SKIP debug-liveedit-double-call: SKIP +############################################################################## +# Native Client uses the ARM simulator so will behave similarly to arm +# on mjsunit tests. +# TODO(bradchen): enable more tests for NaCl V8 when it stops using +# the ARM simulator. +############################################################################## +[ $arch == nacl_ia32 || $arch == nacl_x64 ] +# There is no /tmp directory for NaCl runs +d8-os: SKIP + +# Stack manipulations in LiveEdit is not implemented for this arch. +debug-liveedit-check-stack: SKIP +debug-liveedit-stack-padding: SKIP +debug-liveedit-restart-frame: SKIP +debug-liveedit-double-call: SKIP + +# This test dumps core for arm.debug, so no reason to expect it to work +# for NaCl. The other three fuzz-natives tests seem to run fine. +# As noted above none of them are run in the arm.debug case. +fuzz-natives-part4: SKIP + +# Requires bigger stack size in the Genesis and if stack size is increased, +# the test requires too much time to run. However, the problem test covers +# should be platform-independent. +regress/regress-1132: SKIP + +# Poor performance for NaCl V8 causes an assertion failure for this test. +regress/regress-165637: SKIP + +# Skip long running test that times out in debug mode and goes OOM on NaCl. +regress/regress-crbug-160010: SKIP diff --git a/tools/run-tests.py b/tools/run-tests.py index cb64b45..5d3e0d6 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -68,12 +68,16 @@ SUPPORTED_ARCHS = ["android_arm", "arm", "ia32", "mipsel", + "nacl_ia32", + "nacl_x64", "x64"] # Double the timeout for these: SLOW_ARCHS = ["android_arm", "android_ia32", "arm", - "mipsel"] + "mipsel", + "nacl_ia32", + "nacl_x64"] def BuildOptions(): diff --git a/tools/testrunner/local/statusfile.py b/tools/testrunner/local/statusfile.py index bf1de45..634fe6a 100644 --- a/tools/testrunner/local/statusfile.py +++ b/tools/testrunner/local/statusfile.py @@ -59,7 +59,7 @@ DEFS = {FAIL_OK: [FAIL, OKAY], # Support arches, modes to be written as keywords instead of strings. VARIABLES = {ALWAYS: True} for var in ["debug", "release", "android_arm", "android_ia32", "arm", "ia32", - "mipsel", "x64"]: + "mipsel", "x64", "nacl_ia32", "nacl_x64"]: VARIABLES[var] = var -- 2.7.4