Skip to content

Commit

Permalink
changes to osd-initiator python test scripts to bring up to OSD2r04
Browse files Browse the repository at this point in the history
  • Loading branch information
joc02012 committed Jun 4, 2012
1 parent f2eb804 commit f680ba2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions osd-initiator/python/target-cdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def ccap_verify(ccap, len, pid, oid):
assert len == CCAP_TOTAL_LEN
assert ntohl(ccap[0:4]) == CUR_CMD_ATTR_PG
assert ntohl(ccap[4:8]) == len - 8
assert ntohll(ccap[32:40]) == pid
assert ntohll(ccap[40:48]) == oid + 5 - 1
assert ntohll(ccap[48:56]) == 0
assert ntohll(ccap[44:52]) == pid
assert ntohll(ccap[52:60]) == oid + 5 - 1
assert ntohll(ccap[60:68]) == 0

def test_partition():
# create partition + empty getpage_setlist
Expand Down
6 changes: 3 additions & 3 deletions osd-initiator/python/target-osd.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def test_osd_get_ccap(pid, oid):
assert attr.outlen == CCAP_TOTAL_LEN
assert ntohl(attr.val[0:4]) == CUR_CMD_ATTR_PG
assert ntohl(attr.val[4:8]) == CCAP_TOTAL_LEN - 8
assert ntohll(attr.val[32:40]) == pid
assert ntohll(attr.val[40:48]) == oid
assert ntohll(attr.val[48:56]) == 0
assert ntohll(attr.val[44:52]) == pid
assert ntohll(attr.val[52:60]) == oid
assert ntohll(attr.val[60:68]) == 0

def ntoh_time(buf):
return (ntohs(buf[0:2]) << 32) | ntohl(buf[2:6])
Expand Down

0 comments on commit f680ba2

Please sign in to comment.