summaryrefslogtreecommitdiffstats
path: root/vlib
AgeCommit message (Collapse)AuthorFilesLines
2016-02-10Replace AC_PROG_LIBTOOL with LT_INITDave Barach1-1/+1
Change-Id: I642c4b8e83dd07708658a10ad46e9fd2c28a7f1f Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10Clean up gcc-5.2 warningsDave Barach1-1/+1
Change-Id: I7b0aa42a61607d4d30fe3627032d3837b2838982 Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-05Clean up per-thread elog track nomenclature.Dave Barach1-3/+5
Change-Id: I4b65b29f9291b3fd47e05576d9a0789af8912982 Signed-off-by: Dave Barach <dave@barachs.net>
2016-01-27CLI: If an error happens on the socket being polled, then the CLIOle Troan1-0/+2
does not close the socket. Resulting in the main thread being stuck in a tight infinite loop polling on the erronous socket. Change-Id: I630b84b97c059acce117d56e41cd201131db4cab Signed-off-by: Ole Troan <ot@cisco.com>
2016-02-04dpdk_buffer.c: Honor clone_count even when there isn't a freelist handlerKevin Paul Herbert1-4/+7
The DPDK glue did not support cloned packets which do not have a freelist handler. Add support for this case. Change-Id: I8f17cd4952df97989d90d3f3e39792bc3739705c Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
2016-02-02Tracing enhancements.Bud Grise3-5/+221
Limit buffer tracing to 50 in order to limit large output, unless the user over rides the max "sh trace max <number>". Add trace filtering, to be able to only trace packets that were processed by a specific node or exclude packets processed by a node. Example, only include packets processed by error-drop: # trace filter include error-drop 1 # trace add dpdk-input 1000000 <wait for packets, to come in> # show trace Change-Id: I5d9e15d2268ea55e6ef87b2b8756049c49b2791b Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-01-27Warnings be gone.Dave Barach2-3/+3
Change-Id: I53730fd2ccd78fb73e11af77f8ffff19d75ebd95 Signed-off-by: Dave Barach <dave@barachs.net>
2016-01-27dpdk_buffer.c: Ensure that the mbuf reference count is as expectedKevin Paul Herbert1-0/+3
Add some more ASSERTs to track down improper frees. Change-Id: I2bd4b69fb14f522c82e6006131b6ad982f6f7e6b Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
2016-01-27Print worker thread name as a c-string, not a vector. Otherwise, theDave Barach1-2/+2
output is certain to contain a NULL byte. Change-Id: Id80e1334d7a2cb6788f1db33cde142f84826db36 Signed-off-by: Dave Barach <dave@barachs.net>
2016-01-21PowerPC64-be arch support. Qemu ("qppc") platform support.Dave Barach5-11/+35
Change-Id: Ib0a05f9d1b08bacef09f6d7c101391737031ee0d Signed-off-by: Dave Barach <dave@barachs.net>
2015-12-22Fix to show trace output.Ed Warnicke1-4/+7
Change-Id: I0834eac9c17941d3d5b2aa5791d6deaabd8f6977 Signed-off-by: Ed Warnicke <eaw@cisco.com>
2015-12-18Fix warnings/errors reported by clangDamjan Marion4-3/+5
Change-Id: Ifb2de64347526e3218e22067452f249ff878fd32 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-17Remove redundant functionDamjan Marion1-18/+0
Change-Id: I30db8f678b14303a64ad3aaa16b5caf9081603d8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-17Store per-thread node error countersDamjan Marion2-15/+65
This fixed performance issue in muti-threaded setup due to sharing of the same cacheline between multiple threads Change-Id: I930ee44c17a83d4da350d15b4b97b8bb4633a9b0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-15Remove autotools generated productsDave Barach10-39304/+0
Change-Id: I7f23b8b8e5136cb56768bac3a7473e6df5ee4993 Signed-off-by: Dave Barach <dave@barachs.net>
2015-12-15replacing all vec_sort() invocations to vec_sort_with_function()Matus Fabian5-13/+52
Change-Id: I05895827ed52be292112484cee7d0a2591b67335 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke70-0/+63582
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>
n>( keep_alive_pipe=keep_alive_pipe, failed_pipe=failed_pipe, verbosity=verbose, failfast=failfast).run(suite).wasSuccessful() result_pipe.send(result) result_pipe.close() keep_alive_pipe.close() failed_pipe.close() class add_to_suite_callback: def __init__(self, suite): self.suite = suite def __call__(self, file_name, cls, method): suite.addTest(cls(method)) class Filter_by_class_list: def __init__(self, class_list): self.class_list = class_list def __call__(self, file_name, class_name, func_name): return class_name in self.class_list def suite_from_failed(suite, failed): filter_cb = Filter_by_class_list(failed) return VppTestRunner.filter_tests(suite, filter_cb) def run_forked(suite): keep_alive_parent_end, keep_alive_child_end = Pipe(duplex=False) result_parent_end, result_child_end = Pipe(duplex=False) failed_parent_end, failed_child_end = Pipe(duplex=False) child = Process(target=test_runner_wrapper, args=(suite, keep_alive_child_end, result_child_end, failed_child_end)) child.start() last_test_temp_dir = None last_test_vpp_binary = None last_test = None result = None failed = set() while result is None: readable = select.select([keep_alive_parent_end.fileno(), result_parent_end.fileno(), failed_parent_end.fileno(), ], [], [], test_timeout)[0] timeout = True if result_parent_end.fileno() in readable: result = result_parent_end.recv() timeout = False if keep_alive_parent_end.fileno() in readable: while keep_alive_parent_end.poll(): last_test, last_test_vpp_binary,\ last_test_temp_dir, vpp_pid = keep_alive_parent_end.recv() timeout = False if failed_parent_end.fileno() in readable: while failed_parent_end.poll(): failed_test = failed_parent_end.recv() failed.add(failed_test.__name__) timeout = False if timeout: global_logger.critical("Timeout while waiting for child test " "runner process (last test running was " "`%s' in `%s')!" % (last_test, last_test_temp_dir)) failed_dir = os.getenv('VPP_TEST_FAILED_DIR') lttd = last_test_temp_dir.split("/")[-1] link_path = '%s%s-FAILED' % (failed_dir, lttd) global_logger.error("Creating a link to the failed " + "test: %s -> %s" % (link_path, lttd)) os.symlink(last_test_temp_dir, link_path) api_post_mortem_path = "/tmp/api_post_mortem.%d" % vpp_pid if os.path.isfile(api_post_mortem_path): global_logger.error("Copying api_post_mortem.%d to %s" % (vpp_pid, last_test_temp_dir)) shutil.copy2(api_post_mortem_path, last_test_temp_dir) if last_test_temp_dir and last_test_vpp_binary: core_path = "%s/core" % last_test_temp_dir if os.path.isfile(core_path): global_logger.error("Core-file exists in test temporary " "directory: %s!" % core_path) if d and d.lower() == "core": spawn_gdb(last_test_vpp_binary, core_path, global_logger) child.terminate() result = -1 keep_alive_parent_end.close() result_parent_end.close() failed_parent_end.close() return result, failed if __name__ == '__main__': try: verbose = int(os.getenv("V", 0)) except: verbose = 0 default_test_timeout = 600 # 10 minutes try: test_timeout = int(os.getenv("TIMEOUT", default_test_timeout)) except: test_timeout = default_test_timeout try: debug = os.getenv("DEBUG") except: debug = None parser = argparse.ArgumentParser(description="VPP unit tests") parser.add_argument("-f", "--failfast", action='count', help="fast failure flag") parser.add_argument("-d", "--dir", action='append', type=str, help="directory containing test files " "(may be specified multiple times)") args = parser.parse_args() failfast = True if args.failfast == 1 else False suite = unittest.TestSuite() cb = add_to_suite_callback(suite) for d in args.dir: print("Adding tests from directory tree %s" % d) discover_tests(d, cb) try: retries = int(os.getenv("RETRIES")) except: retries = 0 if retries is None: retries = 0 attempts = retries + 1 if attempts > 1: print("Perform %s attempts to pass the suite..." % attempts) if debug is None or debug.lower() not in ["gdb", "gdbserver"]: while True: result, failed = run_forked(suite) attempts = attempts - 1 print("%s test(s) failed, %s attempt(s) left" % (len(failed), attempts)) if len(failed) > 0 and attempts > 0: suite = suite_from_failed(suite, failed) continue sys.exit(result) # don't fork if debugging.. sys.exit(not VppTestRunner(verbosity=verbose, failfast=failfast).run(suite).wasSuccessful())