Skip to content

vinyl/gh.test.lua does not check whether fibers are finished #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Totktonada opened this issue Mar 26, 2021 · 3 comments
Closed

vinyl/gh.test.lua does not check whether fibers are finished #106

Totktonada opened this issue Mar 26, 2021 · 3 comments
Assignees

Comments

@Totktonada
Copy link
Member

The test case was added in tarantool/tarantool@e576ca9

And became broken in tarantool/tarantool@42c64d0:

-while finished ~= 2 do fiber.sleep(0.01) end
+test_run:wait_cond(function() return finished ~= 2 end)

The condition was not reverted.

@Totktonada
Copy link
Member Author

I looked at the test, because I found the following line in logs:

2021-03-26 17:35:21.482 [23345] main/132/lua utils.c:1014 E> LuajitError: [string "_ = fiber.create(function() while cont do..."]:1: variable 'cont' is not declared

Despite the error the test passes.

(But I don't know why this situation occurs. The variable is declared before reading.)

I'm on Linux, tarantool is built in Debug mode.

@kyukhin kyukhin added the teamQ label Jun 18, 2021
@kyukhin kyukhin changed the title vinyl/gc.test.lua does not check whether fibers are finished vinyl/gh.test.lua does not check whether fibers are finished Jun 18, 2021
avtikhon added a commit to tarantool/tarantool that referenced this issue Jun 21, 2021
Found that in one previous commit

  42c64d0 ('test: fix hanging of vinyl/gh.test.lua')

Was mistakenly made such change:

  -while finished ~= 2 do fiber.sleep(0.01) end
  +test_run:wait_cond(function() return finished ~= 2 end)

And the logic of the check was broken. This patch fixes it.

Part of #5141
Fixes tarantool/test-run#261
Closes tarantool/tarantool-qa#106
avtikhon added a commit to tarantool/tarantool that referenced this issue Jun 21, 2021
Found that in one previous commit

  42c64d0 ('test: fix hanging of vinyl/gh.test.lua')

Was mistakenly made such change:

  -while finished ~= 2 do fiber.sleep(0.01) end
  +test_run:wait_cond(function() return finished ~= 2 end)

And the logic of the check was broken. This patch fixes it.

Part of #5141
Fixes tarantool/test-run#261
Part of tarantool/tarantool-qa#106
avtikhon added a commit to tarantool/tarantool that referenced this issue Jun 21, 2021
Found issue:

  2021-06-21 08:12:25.904 [2459810] main/125/lua utils.c:1014 E> LuajitError: [string "_ = fiber.create(function()     while cont do..."]:1: attempt to concatenate global 'cont' (a boolean value)

Corrected code to avoid of it - changed boolean to integer.

Closes tarantool/tarantool-qa#106
kyukhin pushed a commit to tarantool/tarantool that referenced this issue Jun 22, 2021
Found that in one previous commit

  42c64d0 ('test: fix hanging of vinyl/gh.test.lua')

Was mistakenly made such change:

  -while finished ~= 2 do fiber.sleep(0.01) end
  +test_run:wait_cond(function() return finished ~= 2 end)

And the logic of the check was broken. This patch fixes it.

Part of #5141
Fixes tarantool/test-run#261
Part of tarantool/tarantool-qa#106
kyukhin pushed a commit to tarantool/tarantool that referenced this issue Jun 22, 2021
Found that in one previous commit

  42c64d0 ('test: fix hanging of vinyl/gh.test.lua')

Was mistakenly made such change:

  -while finished ~= 2 do fiber.sleep(0.01) end
  +test_run:wait_cond(function() return finished ~= 2 end)

And the logic of the check was broken. This patch fixes it.

Part of #5141
Fixes tarantool/test-run#261
Part of tarantool/tarantool-qa#106

(cherry picked from commit e07b905)
kyukhin pushed a commit to tarantool/tarantool that referenced this issue Jun 22, 2021
Found that in one previous commit

  42c64d0 ('test: fix hanging of vinyl/gh.test.lua')

Was mistakenly made such change:

  -while finished ~= 2 do fiber.sleep(0.01) end
  +test_run:wait_cond(function() return finished ~= 2 end)

And the logic of the check was broken. This patch fixes it.

Part of #5141
Fixes tarantool/test-run#261
Part of tarantool/tarantool-qa#106

(cherry picked from commit e07b905)
@avtikhon
Copy link
Contributor

avtikhon commented Jun 24, 2021

I looked at the test, because I found the following line in logs:

2021-03-26 17:35:21.482 [23345] main/132/lua utils.c:1014 E> LuajitError: [string "_ = fiber.create(function() while cont do..."]:1: variable 'cont' is not declared

Despite the error the test passes.

(But I don't know why this situation occurs. The variable is declared before reading.)

I'm on Linux, tarantool is built in Debug mode.

Moved to separate issue to be able to close this one:
#131

@Totktonada
Copy link
Member Author

The main issue was fixed in tarantool/tarantool#6168.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants