Fix trailing whitespace, space before tab and empty lines at end of file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[Thomas: fix indent and alignment in test_acl.h and test_sched.c]
while i < history_size / 10:
# add 1 to prevent from parsing as octals
child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER)
- # the app will simply print out the number
+ # the app will simply print out the number
child.expect(str(i + 100000000), timeout=1)
i += 1
# scroll back history
sys.exit(1)
child.close()
sys.exit(0)
-
"Sequence" : CTRL_D*3,
"Result" : None},
]
-
.port_fwd_end = NULL,
.packet_fwd = pkt_burst_checksum_forward,
};
-
(rc = get_phys_map(va, pa, pg_num, pg_sz)) == 0) {
/*
- * Check that allocated size is big enough to hold elt_num
- * objects and a calcualte how many bytes are actually required.
+ * Check that allocated size is big enough to hold elt_num
+ * objects and a calcualte how many bytes are actually required.
*/
if ((usz = rte_mempool_xmem_usage(va, elt_num, total_size, pa,
{
uint8_t i;
- /*
- * Builds up the correct configuration for dcb+vt based on the vlan tags array
- * given above, and the number of traffic classes available for use.
- */
+ /*
+ * Builds up the correct configuration for dcb+vt based on the vlan tags array
+ * given above, and the number of traffic classes available for use.
+ */
if (dcb_conf->dcb_mode == DCB_VT_ENABLED) {
struct rte_eth_vmdq_dcb_conf vmdq_rx_conf;
struct rte_eth_vmdq_dcb_tx_conf vmdq_tx_conf;
runner.add_non_parallel_test_group(test_group)
runner.run_all_tests()
-
{
"Prefix": "group_1",
"Memory" : all_sockets(8),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Timer autotest",
"Command" : "debug_autotest",
"Func" : default_autotest,
"Report" : None,
- },
+ },
{
"Name" : "Errno autotest",
"Command" : "errno_autotest",
"Command" : "common_autotest",
"Func" : default_autotest,
"Report" : None,
- },
+ },
{
"Name" : "Dump log history",
"Command" : "dump_log_history",
{
"Prefix": "group_2",
"Memory" : "32",
- "Tests" :
+ "Tests" :
[
{
"Name" : "Memory autotest",
{
"Prefix": "group_3",
"Memory" : all_sockets(1024),
- "Tests" :
+ "Tests" :
[
{
"Name" : "LPM autotest",
{
"Prefix": "group_4",
"Memory" : all_sockets(128),
- "Tests" :
+ "Tests" :
[
{
"Name" : "PCI autotest",
{
"Prefix": "group_5",
"Memory" : "16",
- "Tests" :
+ "Tests" :
[
{
"Name" : "Spinlock autotest",
{
"Prefix": "group_6",
"Memory" : all_sockets(620),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Function reentrancy autotest",
{
"Prefix": "mempool_perf",
"Memory" : all_sockets(256),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Cycles autotest",
{
"Prefix": "memcpy_perf",
"Memory" : all_sockets(512),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Memcpy performance autotest",
{
"Prefix": "hash_perf",
"Memory" : all_sockets(512),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Hash performance autotest",
{
"Prefix": "timer_perf",
"Memory" : all_sockets(512),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Timer performance autotest",
},
]
},
-
+
#
# Please always make sure that ring_perf is the last test!
#
{
"Prefix": "ring_perf",
"Memory" : all_sockets(512),
- "Tests" :
+ "Tests" :
[
{
"Name" : "Ring performance autotest",
results.append(result)
# regardless of whether test has crashed, try quitting it
- try:
+ try:
child.sendline("quit")
child.close()
# if the test crashed, just do nothing instead
self.logfile = open(logfile, "w")
csvfile = open(csvfile, "w")
self.csvwriter = csv.writer(csvfile)
-
+
# prepare results table
self.csvwriter.writerow(["test_name","test_result","result_str"])
def add_non_parallel_test_group(self,test_group):
self.non_parallel_test_groups.append(test_group)
-
-
+
+
def __process_results(self, results):
# this iterates over individual test results
for i, result in enumerate(results):
-
+
# increase total number of tests that were run
# do not include "start" test
if i > 0:
# if test failed and it wasn't a "start" test
if test_result < 0 and not i == 0:
self.fails += 1
-
+
# collect logs
self.log_buffers.append(log)
-
+
# create report if it exists
if report:
try:
else:
with f:
f.write(report)
-
+
# write test result to CSV file
if i != 0:
self.csvwriter.writerow([test_name, test_result, result_str])
# dump tests are specified in full e.g. "Dump_mempool"
if "_autotest" in test_id:
test_id = test_id[:-len("_autotest")]
-
+
# filter out blacklisted/whitelisted tests
if self.blacklist and test_id in self.blacklist:
test_group["Tests"].remove(test)
# put the numbers backwards so that we start
# deleting from the end, not from the beginning
groups_to_remove.insert(0, i)
-
+
# remove test groups that need to be removed
for i in groups_to_remove:
del test_groups[i]
-
+
return test_groups
-
+
# iterate over test groups and run tests associated with them
self.__filter_groups(self.parallel_test_groups)
self.non_parallel_test_groups = \
self.__filter_groups(self.non_parallel_test_groups)
-
+
# create a pool of worker threads
pool = multiprocessing.Pool(processes=1)
-
+
results = []
-
+
# whatever happens, try to save as much logs as possible
try:
continue
res = group_result.get()
-
+
self.__process_results(res)
# remove result from results list once we're done with it
# run non_parallel tests. they are run one by one, synchronously
for test_group in self.non_parallel_test_groups:
group_result = run_test_group(self.__get_cmdline(test_group), test_group)
-
+
self.__process_results(group_result)
-
+
# get total run time
- cur_time = time.time()
+ cur_time = time.time()
total_time = int(cur_time - self.start)
# print out summary
# drop logs from all executions to a logfile
for buf in self.log_buffers:
self.logfile.write(buf.replace("\r",""))
-
- log_buffers = []
+ log_buffers = []
return -1, "Fail [Bad watermark]"
return 0, "Success"
-
/* make a copy of the arguments to be passed to exec */
for (i = 0; i < numargs; i++)
argv_cpy[i] = strdup(argv[i]);
- #ifdef RTE_LIBRTE_XEN_DOM0
- argv_cpy[i] = strdup("--xen-dom0");
- argv_cpy[i + 1] = NULL;
+#ifdef RTE_LIBRTE_XEN_DOM0
+ argv_cpy[i] = strdup("--xen-dom0");
+ argv_cpy[i + 1] = NULL;
num = numargs + 1;
- #else
+#else
argv_cpy[i] = NULL;
num = numargs;
- #endif
+#endif
/* close all open file descriptors, check /proc/self/fd to only
* call close on open fds. Exclude fds 0, 1 and 2*/
}
/* parent process does a wait */
while (wait(&status) != pid)
- ;
+ ;
return status;
}
#define TEST_ACL_H_
struct ipv4_7tuple {
- uint16_t vlan;
- uint16_t domain;
- uint8_t proto;
- uint32_t ip_src;
- uint32_t ip_dst;
- uint16_t port_src;
- uint16_t port_dst;
- uint32_t allow;
- uint32_t deny;
+ uint16_t vlan;
+ uint16_t domain;
+ uint8_t proto;
+ uint32_t ip_src;
+ uint32_t ip_dst;
+ uint16_t port_src;
+ uint16_t port_dst;
+ uint32_t allow;
+ uint32_t deny;
};
/* rules for invalid layout test */
#include <rte_sched.h>
-#define SUBPORT 0
-#define PIPE 1
-#define TC 2
-#define QUEUE 3
+#define SUBPORT 0
+#define PIPE 1
+#define TC 2
+#define QUEUE 3
static struct rte_sched_subport_params subport_param[] = {
{