Commit c64141e4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent dca9770a
......@@ -528,7 +528,6 @@ class tFile:
@func
def assertBlk(t, blk, dataok, pinokByWLink=None):
#print('assertBlk #%d' % blk)
# XXX -> assertCtx('blk #%d' % blk)
def _():
assertCtx = 'blk #%d' % blk
......@@ -613,8 +612,8 @@ class tFile:
# XXX hack - wlinks are notified and emit events simultaneously - we
# check only that events begin and end with read pre/post and that pins
# are inside. Better do explicit check in tracetest style.
assert ev[0] == 'read pre'
assert ev[-1] == 'read ' + dataok[0]
assert ev[0] == 'read pre', ev
assert ev[-1] == 'read ' + dataok[0], ev
ev = ev[1:-1]
if not shouldPin:
assert ev == []
......@@ -1015,14 +1014,20 @@ def doCheckingPin(f, pinokByWLink, pinfunc=None): # -> []event(str)
for wlink, (zf, pinok) in pinokByWLink.items():
def _(ctx, wlink):
pinv = wlink._expectPin(ctx, zf, pinok)
ev.append('pin rx') # XXX + zf, pin details?
tdelay() # increase probability to receive erroneous extra pins
if pinfunc is not None:
if len(pinv) > 0:
ev.append('pin rx') # XXX + zf, pin details?
# increase probability to receive erroneous extra pins
tdelay()
if len(pinv) > 0:
if pinfunc is not None:
for p in pinv:
pinfunc(wlink, p.foid, p.blk, p.at)
ev.append('pin ack pre') # XXX +details?
for p in pinv:
pinfunc(wlink, p.foid, p.blk, p.at)
ev.append('pin ack pre') # XXX +details?
for p in pinv:
p.reply(b"ack")
p.reply(b"ack")
# check that we don't get extra pins before f completes
try:
req = wlink.recvReq(ctx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment