diff --git a/test/box/lua.result b/test/box/lua.result index 77bb09f8ea5ada2fad9dc1f1c1131d25b8ea596f..d5b965cec0ac81c77b63fa9ec714a1ad8048d0d7 100644 --- a/test/box/lua.result +++ b/test/box/lua.result @@ -1365,3 +1365,172 @@ lua box.fiber.resume(f) --- error: 'fiber.resume(): the fiber is dead' ... +lua function r() box.fiber.yield(box.space[0]:insert(0, 0, 1)) box.fiber.yield(box.space[0]:select(0, 0)) box.fiber.yield(box.space[0]:truncate()) end +--- +... +lua f = box.fiber.create(r) +--- +... +lua box.fiber.resume(f) +--- + - 0: {0, 1} +... +lua box.fiber.resume(f) +--- + - 0: {0, 1} +... +lua box.fiber.resume(f) +--- +... +lua box.fiber.resume(f) +--- + - true +... +lua function r() return box.fiber.yield(box.fiber.create(r)) end +--- +... +lua f = r() +--- +... +lua f1 = box.fiber.resume(f) +--- +... +lua f2 = box.fiber.resume(f1) +--- +... +lua f3 = box.fiber.resume(f2) +--- +... +lua f4 = box.fiber.resume(f3) +--- +... +lua f5 = box.fiber.resume(f4) +--- +... +lua f6 = box.fiber.resume(f5) +--- +... +lua f7 = box.fiber.resume(f6) +--- +... +lua f8 = box.fiber.resume(f7) +--- +... +lua f9 = box.fiber.resume(f8) +--- +... +lua f10 = box.fiber.resume(f9) +--- +... +lua f11 = box.fiber.resume(f10) +--- +... +lua f12 = box.fiber.resume(f11) +--- +... +lua f13 = box.fiber.resume(f12) +--- +... +lua f14 = box.fiber.resume(f13) +--- +... +lua f15 = box.fiber.resume(f14) +--- +... +lua f16 = box.fiber.resume(f15) +--- +... +lua f17 = box.fiber.resume(f16) +--- +... +lua box.fiber.resume(f) +--- + - true +... +lua box.fiber.resume(f1) +--- + - true +... +lua box.fiber.resume(f2) +--- + - true +... +lua box.fiber.resume(f3) +--- + - true +... +lua box.fiber.resume(f4) +--- + - true +... +lua box.fiber.resume(f5) +--- + - true +... +lua box.fiber.resume(f6) +--- + - true +... +lua box.fiber.resume(f7) +--- + - true +... +lua box.fiber.resume(f8) +--- + - true +... +lua box.fiber.resume(f9) +--- + - true +... +lua box.fiber.resume(f10) +--- + - true +... +lua box.fiber.resume(f11) +--- + - true +... +lua box.fiber.resume(f12) +--- + - true +... +lua box.fiber.resume(f13) +--- + - true +... +lua box.fiber.resume(f14) +--- + - true +... +lua box.fiber.resume(f15) +--- + - true +... +lua box.fiber.resume(f16) +--- + - true +... +lua f17 = nil +--- +... +lua function r() box.fiber.detach() box.fiber.sleep(1000) end +--- +... +lua f = box.fiber.create(r) +--- +... +lua box.fiber.resume(f) +--- +... +lua box.fiber.resume(f) +--- +error: 'fiber.resume(): can''t resume a detached fiber' +... +lua box.fiber.cancel(f) +--- +... +lua box.fiber.resume(f) +--- +error: 'fiber.resume(): the fiber is dead' +...