[ofa-general] [PATCH] ibutils: pkey test - check generated pkeys

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Dec 19 03:14:44 PST 2007


Make sure that generated pkeys are not the same.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 ibmgtsim/tests/pkey.sim.tcl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ibmgtsim/tests/pkey.sim.tcl b/ibmgtsim/tests/pkey.sim.tcl
index 69689cc..0f90696 100644
--- a/ibmgtsim/tests/pkey.sim.tcl
+++ b/ibmgtsim/tests/pkey.sim.tcl
@@ -120,8 +120,12 @@ proc setAllHcaPortsPKeyTable {fabric} {
    global PORT_PKEY_GROUP PORT_GROUP_PKEY_IDX
    global GROUP_PKEY

+   # while setting pkeys, make sure that they are not equal
    set pkey1 [getFullMemberPkey]
-   set pkey2 [getFullMemberPkey]
+   set pkey2 $pkey1
+   while {$pkey2 == $pkey1} {
+      set pkey2 [getFullMemberPkey]
+   }
    set pkey3 [getPartialMemberPkey]

    set G1 [list $pkey1 $pkey3]
-- 
1.5.1.4




More information about the general mailing list