Skip to content
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

test: test-run reports wrong source of error #6134

Open
tsafin opened this issue Jun 8, 2021 · 0 comments
Open

test: test-run reports wrong source of error #6134

tsafin opened this issue Jun 8, 2021 · 0 comments
Assignees
Labels
bug Something isn't working qa Issues related to tests or testing subsystem

Comments

@tsafin
Copy link
Contributor

tsafin commented Jun 8, 2021

It always was a problem that reported source line was not
pointing to the actual callee line number, but rather to
the start of file, i.e. we have seen:

    [001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
    [001] not ok 22 - 4.3 #
    [001] Traceback:
    [001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
    [001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
    [001]
    [001] not ok 23 - 4.4 #
    [001] Traceback:
    [001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
    [001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>

(see the :0 part)

Instead of a correct line numbers:

    [001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
    [001] not ok 22 - 4.3 #
    [001] Traceback:
    [001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
    [001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:242>
    [001]
    [001] not ok 23 - 4.4 #
    [001] Traceback:
    [001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
    [001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:252>

The problem was due to debug.getinfo .linedefined used, instead of source line in .currentline.

@tsafin tsafin added the qa Issues related to tests or testing subsystem label Jun 8, 2021
@tsafin tsafin self-assigned this Jun 8, 2021
@tsafin tsafin added 1sp bug Something isn't working labels Jun 8, 2021
tsafin added a commit to tsafin/tarantool that referenced this issue Jun 8, 2021
It always was a problem that reported source line was not
pointing to the actual callee line number, but rather to
the start of file, i.e. we have seen:
```
[001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
[001] not ok 22 - 4.3 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
[001]
[001] not ok 23 - 4.4 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
```
(see the :0 part)
Instead of correct line numbers:
```
[001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
[001] not ok 22 - 4.3 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:242>
[001]
[001] not ok 23 - 4.4 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:252>
```

The problem was due to `.linedefined` used, instead of source line in `.currentline`.

Closes tarantool#6134
tsafin added a commit to tsafin/tarantool that referenced this issue Jun 11, 2021
It always was a problem that reported source line was not
pointing to the actual callee line number, but rather to
the start of file, i.e. we have seen:
```
[001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
[001] not ok 22 - 4.3 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
[001]
[001] not ok 23 - 4.4 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
```
(see the :0 part)
Instead of correct line numbers:
```
[001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
[001] not ok 22 - 4.3 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:242>
[001]
[001] not ok 23 - 4.4 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:252>
```

The problem was due to `.linedefined` used, instead of source line in `.currentline`.

Closes tarantool#6134
tsafin added a commit to tsafin/tarantool that referenced this issue Jun 16, 2021
It always was a problem that reported source line was not
pointing to the actual callee line number, but rather to
the start of file, i.e. we have seen:
```
[001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
[001] not ok 22 - 4.3 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
[001]
[001] not ok 23 - 4.4 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:123>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:0>
```
(see the :0 part)
Instead of correct line numbers:
```
[001] sql-tap/tkt-9a8b09f8e6.test.lua                 memtx
[001] not ok 22 - 4.3 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:242>
[001]
[001] not ok 23 - 4.4 #
[001] Traceback:
[001] [Lua ] function 'do_catchsql_test' at </home/tsafin/tarantool/test/var/001_sql-tap/sqltester.lua:142>
[001] [main] at </home/tsafin/tarantool/test/sql-tap/tkt-9a8b09f8e6.test.lua:252>
```

The problem was due to `.linedefined` used, instead of source line in `.currentline`.

Closes tarantool#6134
@TarantoolBot TarantoolBot removed the 1sp label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qa Issues related to tests or testing subsystem
Projects
None yet
Development

No branches or pull requests

2 participants