tempesta-tech / tempesta-test

Test suite for Tempesta FW
10 stars 4 forks source link

./run_tests.py produce lots of traceback on Ctrl+C #100

Closed midenok closed 5 years ago

midenok commented 5 years ago

While errors are legit stack traces must not be shown. After pressing Ctrl+C during the process:

./run_tests.py 
Root privileges are required: need access to module loading on localhost.

----------------------------------------------------------------------
Running functional tests...
----------------------------------------------------------------------

EEEEEEEEEEEEEEEE^CEE
======================================================================
ERROR: test_filtered (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 108, in test_filtered
    self.check_sockets(allow_conns=False)
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 69, in check_sockets
    self.start_all()
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 54, in start_all
    self.tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_filtered (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 85, in tearDown
    stress.StressTest.tearDown(self)
  File "/root/tempesta-test/testers/stress.py", line 93, in tearDown
    raise Exception("Error during stopping tempesta")
Exception: Error during stopping tempesta

======================================================================
ERROR: test_not_started_server (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 140, in test_not_started_server
    self.tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_not_started_server (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 85, in tearDown
    stress.StressTest.tearDown(self)
  File "/root/tempesta-test/testers/stress.py", line 93, in tearDown
    raise Exception("Error during stopping tempesta")
Exception: Error during stopping tempesta

======================================================================
ERROR: test_reachable (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 98, in test_reachable
    self.check_sockets()
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 69, in check_sockets
    self.start_all()
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 54, in start_all
    self.tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_reachable (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 85, in tearDown
    stress.StressTest.tearDown(self)
  File "/root/tempesta-test/testers/stress.py", line 93, in tearDown
    raise Exception("Error during stopping tempesta")
Exception: Error during stopping tempesta

======================================================================
ERROR: test_reachable_then_closed (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 126, in test_reachable_then_closed
    self.start_all()
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 54, in start_all
    self.tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_reachable_then_closed (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 85, in tearDown
    stress.StressTest.tearDown(self)
  File "/root/tempesta-test/testers/stress.py", line 93, in tearDown
    raise Exception("Error during stopping tempesta")
Exception: Error during stopping tempesta

======================================================================
ERROR: test_sometimes_available (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 159, in test_sometimes_available
    self.start_all()
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 54, in start_all
    self.tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_sometimes_available (flacky_net.test_sockets.CloseOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/flacky_net/test_sockets.py", line 85, in tearDown
    stress.StressTest.tearDown(self)
  File "/root/tempesta-test/testers/stress.py", line 93, in tearDown
    raise Exception("Error during stopping tempesta")
Exception: Error during stopping tempesta

======================================================================
ERROR: test_connect (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 373, in test_connect
    self.routine(lua_connect)
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 294, in routine
    self.start_tempesta()
  File "/root/tempesta-test/framework/tester.py", line 164, in start_tempesta
    self.__tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_connect (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/framework/tester.py", line 202, in tearDown
    self.oops.update()
  File "/root/tempesta-test/helpers/dmesg.py", line 45, in update
    self.log, _ = self.node.run_cmd(cmd)
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Error running command 'journalctl -k --since=@1559587337.620370' on localhost, stdout = , stderr = /bin/sh: 1: journalctl: not found

======================================================================
ERROR: test_get_post (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 314, in test_get_post
    self.routine(lua_get_post)
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 294, in routine
    self.start_tempesta()
  File "/root/tempesta-test/framework/tester.py", line 164, in start_tempesta
    self.__tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_get_post (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/framework/tester.py", line 202, in tearDown
    self.oops.update()
  File "/root/tempesta-test/helpers/dmesg.py", line 45, in update
    self.log, _ = self.node.run_cmd(cmd)
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Error running command 'journalctl -k --since=@1559587340.866158' on localhost, stdout = , stderr = /bin/sh: 1: journalctl: not found

======================================================================
ERROR: test_head_get (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 317, in test_head_get
    self.routine(lua_head_get)
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 294, in routine
    self.start_tempesta()
  File "/root/tempesta-test/framework/tester.py", line 164, in start_tempesta
    self.__tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_head_get (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/framework/tester.py", line 202, in tearDown
    self.oops.update()
  File "/root/tempesta-test/helpers/dmesg.py", line 45, in update
    self.log, _ = self.node.run_cmd(cmd)
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Error running command 'journalctl -k --since=@1559587344.110080' on localhost, stdout = , stderr = /bin/sh: 1: journalctl: not found

======================================================================
ERROR: test_mixed (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 342, in test_mixed
    self.routine(lua_mixed)
  File "/root/tempesta-test/mixed_requests/test_mixed.py", line 294, in routine
    self.start_tempesta()
  File "/root/tempesta-test/framework/tester.py", line 164, in start_tempesta
    self.__tempesta.start()
  File "/root/tempesta-test/helpers/stateful.py", line 36, in start
    self.run_start()
  File "/root/tempesta-test/helpers/control.py", line 326, in run_start
    err_msg=(self.err_msg % 'start'))
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

======================================================================
ERROR: test_mixed (mixed_requests.test_mixed.MixedRequests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/tempesta-test/framework/tester.py", line 202, in tearDown
    self.oops.update()
  File "/root/tempesta-test/helpers/dmesg.py", line 45, in update
    self.log, _ = self.node.run_cmd(cmd)
  File "/root/tempesta-test/helpers/remote.py", line 84, in run_cmd
    (err_msg, stdout, stderr))
Exception: Remote error: Error running command 'journalctl -k --since=@1559587347.352075' on localhost, stdout = , stderr = /bin/sh: 1: journalctl: not found

----------------------------------------------------------------------
Ran 9 tests in 13.246s

FAILED (errors=18)
midenok commented 5 years ago

Also:

# ./run_tests.py
tee: tests_log.log: Read-only file system
Root privileges are required: need access to module loading on localhost.
Traceback (most recent call last):
  File "./run_tests.py", line 173, in <module>
    remote.connect()
  File "/root/tempesta-test/helpers/remote.py", line 292, in connect
    node.mkdir(node.workdir)
  File "/root/tempesta-test/helpers/remote.py", line 89, in mkdir
    os.makedirs(path)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/tmp/client'
vankoven commented 5 years ago

Why the trace backs are the issues? If a test fails you definitely want to know the reason, or at least the line which triggered the issue. The tests are fully automatic, no errors are legit.

vankoven commented 5 years ago
Exception: Remote error: Can't start TempestaFW on localhost, stdout = , stderr = /bin/sh: 1: /root/tempesta/scripts/tempesta.sh: not found

Configuration error. Please edit variable srcdir in Tempesta section in tests_config.ini file.

OSError: [Errno 30] Read-only file system: '/tmp/client'

Same here, need to edit variable workdir in Client section in tests_config.ini file.

krizhanovsky commented 5 years ago

@ikoveshnikov if you believe that there is no issue, feel free to close the task.