llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Multiple failing tests

Open marxin opened this issue 8 years ago • 6 comments

Bugzilla Link 36597
Resolution INVALID
Resolved on Apr 27, 2018 06:58
Version unspecified
OS Linux
Attachments Log file
CC @cmatthew,@cddouma-arm,@MatzeB

Extended Description

For current trunk, I see following failing tests:

Failing Tests (10): LNT :: lnttool/checkformat.shtest LNT :: lnttool/submit.shtest LNT :: lnttool/submit_badurl.shtest LNT :: lnttool/test_importreport.py LNT :: runtest/test_suite-fail-exec.shtest LNT :: runtest/test_suite.shtest LNT :: server/db/CreateV4TestSuiteInstance.py LNT :: server/ui/V4Pages.py LNT :: server/ui/change_processing.py LNT :: server/ui/test_api.py

Apart from that 'requests' package is required just in requirements.server.txt, but should it be also required in requirements.client.txt? If it's not installed I see one another test failing.

marxin avatar Mar 05 '18 08:03 marxin

I can confirm it works for me. Reason is probably that I use the lnt folder to server a real LNT web server. Is it possible? Or I have some smashed python2 and python3 in the virtualenv.

marxin avatar Apr 27 '18 13:04 marxin

To get on the same page, this is how I run the tests:

  1. Build llvm (or get binaries) to get llvm testing tools. You need at least the following: llvm-lit, FileCheck, not
  2. Create a python virtualenv with lnt/requirements.server.txt installed and lnt setup.py executed.
  3. Run the tests like this: (replace LNTENV, LLVMBUILD as apropriate)

$ cd lnt/tests $ PATH="$LNTENV/bin:$LLVMBUILD/bin:$PATH" llvm-lit .

MatzeB avatar Apr 24 '18 16:04 MatzeB

There's some debugging I did:

  1. lnttool/submit_badurl.shtest I see:

Traceback (most recent call last): File "/tmp/mysandbox/bin/lnt", line 11, in load_entry_point('LNT', 'console_scripts', 'lnt')() File "/tmp/mysandbox/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 722, in call return self.main(*args, **kwargs) File "/tmp/mysandbox/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 697, in main rv = self.invoke(ctx) File "/tmp/mysandbox/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/tmp/mysandbox/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/tmp/mysandbox/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/lnttool/main.py", line 192, in action_submit merge_run=merge) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/util/ServerUtil.py", line 97, in submitFiles merge_run=merge_run) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/util/ServerUtil.py", line 86, in submitFile result = submitFileToServer(url, file, select_machine, merge_run) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/util/ServerUtil.py", line 43, in submitFileToServer response = urllib2.urlopen(urllib2.Request(url, data, headers=headers)) File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib64/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 1228, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib64/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

Which is valid result, just needs to be added to 'CHECK: ' pattern. Am I right?

  1. FAIL: LNT :: lnttool/checkformat.shtest

/home/marxin/Programming/lnt/tests/lnttool/checkformat.shtest:47:12: error: expected string not found in input

MINIMAL: Import succeeded.

Output:

Import Failed: import failure: start_time

Traceback (most recent call last): File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/util/ImportData.py", line 99, in import_and_report merge_run=merge_run) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/server/db/testsuitedb.py", line 1057, in importDataFromDict run = self._getOrCreateRun(session, data['run'], machine, merge_run) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/server/db/testsuitedb.py", line 980, in _getOrCreateRun start_time = aniso8601.parse_datetime(run_data['start_time']) KeyError: 'start_time'

  1. FAIL: LNT :: runtest/test_suite-fail-exec.shtest (28 of 71)

Command Output (stdout):

CMAKE_C_COMPILER:FILEPATH=/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang-r154331 CMAKE_CXX_COMPILER:FILEPATH=/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang++-r154331 CMAKE_C_COMPILER_TARGET:STRING= CMAKE_BUILD_TYPE:STRING=RelWithDebInfo CMAKE_C_FLAGS:STRING=-O0 CMAKE_CXX_FLAGS:STRING= CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g Import succeeded.

-- Command Output (stderr):

2018-03-06 12:58:48 INFO: Inferred C++ compiler under test as: '/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang++-r154331' 2018-03-06 12:58:48 INFO: Configuring with { 2018-03-06 12:58:48 INFO: CMAKE_CXX_COMPILER:FILEPATH: '/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang++-r154331' 2018-03-06 12:58:48 INFO: CMAKE_C_COMPILER:FILEPATH: '/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang-r154331' 2018-03-06 12:58:48 INFO: } 2018-03-06 12:58:48 INFO: Execute: /home/marxin/Programming/lnt/tests/runtest/Inputs/test-suite-cmake/fake-cmake -DCMAKE_CXX_COMPILER:FILEPATH=/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang++-r154331 -DCMAKE_C_COMPILER:FILEPATH=/home/marxin/Programming/lnt/tests/SharedInputs/FakeCompilers/clang-r154331 /home/marxin/Programming/lnt/tests/runtest/Inputs/test-suite-cmake 2018-03-06 12:58:48 INFO: (In /home/marxin/Programming/lnt/test_run_tmp/runtest/Output/test_suite-fail-exec.shtest.tmp.SANDBOX/build) 2018-03-06 12:58:48 INFO: Execute: /home/marxin/Programming/lnt/tests/runtest/Inputs/test-suite-cmake/fake-make clean 2018-03-06 12:58:48 INFO: (In /home/marxin/Programming/lnt/test_run_tmp/runtest/Output/test_suite-fail-exec.shtest.tmp.SANDBOX/build) 2018-03-06 12:58:48 INFO: Execute: /home/marxin/Programming/lnt/tests/runtest/Inputs/test-suite-cmake/fake-cmake -LAH -N /home/marxin/Programming/lnt/test_run_tmp/runtest/Output/test_suite-fail-exec.shtest.tmp.SANDBOX/build 2018-03-06 12:58:48 INFO: Using nickname: 'marxinbox__clang_DEV__' 2018-03-06 12:58:48 INFO: Building... 2018-03-06 12:58:48 INFO: Execute: /home/marxin/Programming/lnt/tests/runtest/Inputs/test-suite-cmake/fake-make -k -j 1 VERBOSE=1 all 2018-03-06 12:58:48 INFO: (In /home/marxin/Programming/lnt/test_run_tmp/runtest/Output/test_suite-fail-exec.shtest.tmp.SANDBOX/build) 2018-03-06 12:58:48 INFO: Testing... 2018-03-06 12:58:48 INFO: Execute: /home/marxin/Programming/lnt/tests/runtest/Inputs/test-suite-cmake/fake-lit-fails-exec -v -j 1 /home/marxin/Programming/lnt/test_run_tmp/runtest/Output/test_suite-fail-exec.shtest.tmp.SANDBOX/build -o /home/marxin/Programming/lnt/test_run_tmp/runtest/Output/test_suite-fail-exec.shtest.tmp.SANDBOX/build/outputYXv6cI.json 2018-03-06 12:58:48 INFO: Running process cleanup. /home/marxin/Programming/lnt/tests/runtest/test_suite-fail-exec.shtest:15:28: error: expected string not found in input

CHECK-RESULTS-FAIL-EXEC: "Name": "nts.baz.exec.status"

                       ^

:27:20: note: scanning from here "run_order": "123", ^ :38:2: note: possible intended match here "Name": "nts.baz.exec" ^

--

  1. FAIL: LNT :: server/db/CreateV4TestSuiteInstance.py (1 of 1)

This one is really strange, because if I run it in strace: [pid 25628] execve("/tmp/mysandbox/bin/python", ["python", "/home/marxin/Programming/lnt/tests/server/db/CreateV4TestSuiteInstance.py", "/home/marxin/Programming/lnt/test_run_tmp/server/db/Output/CreateV4TestSuiteInstance.py.tmp.db"], 0x5555558601a0 /* 12 vars */) = 0

And if I run it manually it works fine. Any idea how is that possible? Very similar error is repeating for multiple tests and I guess it's causing another failure.

marxin avatar Mar 06 '18 12:03 marxin

Scratch that. It is not happing in click.

The failure I am looking at is:

FAIL: LNT :: lnttool/test_importreport.py (7 of 71) ******************** TEST 'LNT :: lnttool/test_importreport.py' FAILED ******************** Script:

echo "foo.exec 10" > input echo "bar.exec 20" >> input echo "foo.hash d7" >> input echo "bar.profile Xz6/" >> input lnt importreport --testsuite nts --order 123 --machine foo input output.json cat output.json

Exit Code: 1

Command Output (stderr):

Traceback (most recent call last): File "/tmp/mysandbox2/bin/lnt", line 11, in load_entry_point('LNT', 'console_scripts', 'lnt')() File "/tmp/mysandbox2/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 722, in call return self.main(*args, **kwargs) File "/tmp/mysandbox2/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 697, in main rv = self.invoke(ctx) File "/tmp/mysandbox2/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/tmp/mysandbox2/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/tmp/mysandbox2/lib/python2.7/site-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/lnttool/import_report.py", line 44, in action_importreport test = lnt.testing.TestSamples(suite + "." + key, [val]) File "/home/marxin/Programming/lnt/build/lib.linux-x86_64-2.7/lnt/testing/init.py", line 166, in init self.data = map(conv_f, data) ValueError: could not convert string to float: d7

--

cmatthew avatar Mar 06 '18 00:03 cmatthew

It is not really even a server requirement, it is a test-suite requirement.

We have had a lot of issues adding new package requirements, so for testing only packages I leave them out of the requirements file.

The click error in the log is strange. It is almost as if click is parsing the results file.

cmatthew avatar Mar 06 '18 00:03 cmatthew

The testsuite tests server and client. It is not split and therefore needs requirements.server.txt installed.

You can also take a look at how we test at this jenkins job: http://lab.llvm.org:8080/green/job/LNT_Tests/

MatzeB avatar Mar 05 '18 16:03 MatzeB