From: Peng Yuan <yuan.peng@intel.com>
To: dts@dpdk.org
Cc: Peng Yuan <yuan.peng@intel.com>
Subject: [dts] [PATCH]tests: change function check_hash_different
Date: Tue, 13 Apr 2021 02:17:11 +0000 [thread overview]
Message-ID: <20210413021711.39473-1-yuan.peng@intel.com> (raw)
adapt to the scenario that there are two or more hash values in the hashes list.
Signed-off-by: Peng Yuan <yuan.peng@intel.com>
--
v1
diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index e0a378f3..d8443d3b 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -728,17 +728,19 @@ class RssProcessing(object):
def check_hash_different(self, out, key='', port_id=0):
hashes, rss_distribute = self.get_hash_verify_rss_distribute(out, port_id)
if len(key) == 0:
- if hashes == self.current_saved_hash:
- error_msg = 'hash value {} should be different ' \
- 'with current saved hash {}'.format(hashes, self.current_saved_hash)
- self.logger.error(error_msg)
- self.error_msgs.append(error_msg)
+ for item in hashes:
+ if item in self.current_saved_hash:
+ error_msg = 'hash value {} should be different ' \
+ 'with current saved hash {}'.format(item, self.current_saved_hash)
+ self.logger.error(error_msg)
+ self.error_msgs.append(error_msg)
else:
- if hashes == self.hash_records[key]:
- error_msg = 'hash value {} should be different ' \
- 'with {} {}'.format(hashes, key, self.hash_records[key])
- self.logger.error(error_msg)
- self.error_msgs.append(error_msg)
+ for item in hashes:
+ if item in self.hash_records[key]:
+ error_msg = 'hash value {} should be different ' \
+ 'with {} {}'.format(item, key, self.hash_records[key])
+ self.logger.error(error_msg)
+ self.error_msgs.append(error_msg)
if not rss_distribute:
error_msg = 'the packet do not distribute by rss'
self.logger.error(error_msg)
--
2.17.1
next reply other threads:[~2021-04-13 9:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 2:17 Peng Yuan [this message]
2021-05-07 3:20 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210413021711.39473-1-yuan.peng@intel.com \
--to=yuan.peng@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).