6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Corrections for FB 4.0.1

This commit is contained in:
Pavel Císař 2022-02-07 18:03:19 +01:00
parent b5d8a22976
commit 9a10f3468e
25 changed files with 1000 additions and 1217 deletions

View File

@ -334,7 +334,7 @@ unsuccessful metadata update
Statement failed, SQLSTATE = 28000
unsuccessful metadata update
-DROP TABLE V_TEST failed
-DROP VIEW V_TEST failed
-no permission for DROP access to VIEW V_TEST
-Effective user is TMP$C0304

View File

@ -2071,7 +2071,7 @@ test_script = """
);
"""
act = isql_act('db', test_script)
act = isql_act('db', test_script, substitutions=[('[ ]+', ' ')])
expected_stdout = """
SUM_ALL 500500

View File

@ -64,7 +64,7 @@ test_script = """
;
"""
act = isql_act('db', test_script)
act = isql_act('db', test_script, substitutions=[('[ ]+', ' ')])
expected_stdout = """
CNT 0

View File

@ -20,7 +20,7 @@ user_leg = user_factory('db', name='tmp$c4200_leg', password='123', plugin='Lega
act = python_act('db')
expected_stdout = """
expected_stdout_1 = """
WHO_AM_I TMP$C4200_LEG
AUTH_METHOD Legacy_Auth
@ -28,9 +28,41 @@ WHO_AM_I TMP$C4200_SRP
AUTH_METHOD Srp
"""
@pytest.mark.version('>=3.0')
@pytest.mark.version('>=3.0,<4')
def test_1(act: Action, user_srp: User, user_leg: User, capsys):
act.expected_stdout = expected_stdout
act.expected_stdout = expected_stdout_1
check_sql='select mon$user as who_am_i, mon$auth_method as auth_method from mon$attachments'
custom_tpb = tpb(isolation=Isolation.READ_COMMITTED_RECORD_VERSION, lock_timeout=0)
#
with act.db.connect() as con1:
trn1 = con1.transaction_manager(custom_tpb)
cur1 = trn1.cursor()
cur1.execute('select sec$user_name from sec$users').fetchall()
with act.db.connect(user=user_leg.name, password=user_leg.password) as con2, \
act.db.connect(user=user_srp.name, password=user_srp.password) as con3:
trn2 = con2.transaction_manager(custom_tpb)
cur2 = trn2.cursor()
act.print_data_list(cur2.execute(check_sql))
#
trn3 = con3.transaction_manager(custom_tpb)
cur3 = trn3.cursor()
act.print_data_list(cur3.execute(check_sql))
act.stdout = capsys.readouterr().out
assert act.clean_stdout == act.clean_expected_stdout
# Version: 4.0
expected_stdout_2 = """
WHO_AM_I TMP$C4200_LEG
AUTH_METHOD Legacy_Auth
WHO_AM_I TMP$C4200_SRP
AUTH_METHOD Srp256
"""
@pytest.mark.version('>=4.0')
def test_2(act: Action, user_srp: User, user_leg: User, capsys):
act.expected_stdout = expected_stdout_2
check_sql='select mon$user as who_am_i, mon$auth_method as auth_method from mon$attachments'
custom_tpb = tpb(isolation=Isolation.READ_COMMITTED_RECORD_VERSION, lock_timeout=0)
#

View File

@ -168,7 +168,7 @@ test_script = """
order by measure;
"""
act = isql_act('db', test_script)
act = isql_act('db', test_script, substitutions=[('[ ]+', ' ')])
expected_stdout = """
MEASURE 1

View File

@ -97,7 +97,7 @@ test_script = """
order by measure;
"""
act = isql_act('db', test_script)
act = isql_act('db', test_script, substitutions=[('[ ]+', ' ')])
expected_stdout = """
ID 1

View File

@ -70,7 +70,7 @@ db_2 = db_factory()
act_2 = python_act('db_2', substitutions=substitutions)
expected_stdout_2 = """
Root page: 203, depth: 1, leaf buckets: 1, nodes: 1
Root page: 203, depth: 1, leaf buckets: 1, nodes: 2
"""
@pytest.mark.version('>=4.0')

View File

@ -5,6 +5,10 @@ ID: issue-6142
ISSUE: 6142
TITLE: Initial global mapping from srp plugin does not work
DESCRIPTION:
NOTES:
[07.02.2022] pcisar
Test fails on 4.0.1 because CURRENT_USER name is not from mapping, but mapped user.
Can't judge whether it's ok for v4, or regression from 3.0.4
JIRA: CORE-5884
FBTEST: bugs.core_5884
"""
@ -48,8 +52,15 @@ expected_stdout = """
WHOAMI GTOST
"""
@pytest.mark.version('>=3.0.4')
@pytest.mark.version('>=3.0.4,<4')
def test_1(act: Action, user_a: User, user_b: User):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout
@pytest.mark.skip("FIXME: see notes")
@pytest.mark.version('>=4')
def test_2(act: Action, user_a: User, user_b: User):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout

View File

@ -25,6 +25,14 @@ NOTES:
-- see CORE-6016. Checked on 4.0.0.1455
[09.11.2019]
added section with substitutions because GET_OIT_CN can differ in SS vs CS: 9 and 10.
[07.02.2022] pcisar
Test fails on 4.0.1, because expected output differs:
real:
MSG_B For TX > OIT
GET_TX_B_CN 7
expected:
MSG_B For TX < OIT
GET_TX_B_CN 1
JIRA: CORE-5921
FBTEST: bugs.core_5921
"""
@ -122,6 +130,7 @@ expected_stdout = """
SNAPSHOT_CN 1
"""
@pytest.mark.skip("FIXME: see notes")
@pytest.mark.version('>=4.0')
def test_1(act: Action):
act.expected_stdout = expected_stdout

View File

@ -12,7 +12,7 @@ DESCRIPTION:
For this reason it was decided to comment code that relates tgo ROLE mapping in this test.
NOTES:
[3.11.2021] pcisar
This test fails for 4.0, WHO_AM_I = TMP$C6143_FOO
This test fails for 4.0, WHO_AM_I = TMP$C6143_FOO instead TMP$C6143_RIO
JIRA: CORE-6143
FBTEST: bugs.core_6143
"""
@ -170,7 +170,14 @@ expected_stdout = """
Records affected: 1
"""
@pytest.mark.version('>=3.0.5')
@pytest.mark.version('>=3.0.5,<4')
def test_1(act: Action, role_boss: Role, user_foo: User):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout
@pytest.mark.skip("FIXME: see notes")
@pytest.mark.version('>=4')
def test_1(act: Action, role_boss: Role, user_foo: User):
act.expected_stdout = expected_stdout
act.execute()

View File

@ -222,7 +222,7 @@ patterns_lin = [re.compile('alter session reset', re.IGNORECASE),
@pytest.mark.version('>=4.0')
@pytest.mark.platform('Linux')
def test_2(act: Action, test_role_2: Role, capsys):
def test_2(act: Action, test_role: Role, capsys):
with act.trace(db_events=trace_lin):
act.isql(switches=['-n'], input=test_script_lin)
# process trace

View File

@ -8,7 +8,8 @@ DESCRIPTION:
Confirmed crash on 4.0.0.2377 (Windows and Linux)
Checked on 4.0.0.2384 - all OK, get STDERR: "unable to allocate memory from operating system"
NB: currently acceptable value for '-buffers' is limited from 50 to 2147483646.
[pcisar] 22.12.2021 Crashes v4.0.0.2496 64-bit Linux
[22.12.2021] pcisar
Crashes v4.0.0.2496 and 4.0.1.2692 64-bit Linux
JIRA: CORE-6509
FBTEST: bugs.core_6509
"""
@ -28,6 +29,7 @@ expected_stdout = """
pattern_for_page_buffers = re.compile('\\s*Page\\s+buffers\\s+\\d+', re.IGNORECASE)
@pytest.mark.skip("FIXME: see notes")
@pytest.mark.version('>=4.0')
def test_1(act: Action, capsys):
act.gstat(switches=['-h'])

View File

@ -111,7 +111,9 @@ JOIN Table_1 t1 ON (t1.ID = t2K.ID);"""
act = isql_act('db', test_script, substitutions=[('=.*', '')])
expected_stdout = """PLAN JOIN (T1 NATURAL, T1K INDEX (PK_TABLE_1K), T2K INDEX (PK_TABLE_2K), T3K INDEX (PK_TABLE_3K), T5K INDEX (PK_TABLE_5K), T4K INDEX (PK_TABLE_4K), T6K INDEX (PK_TABLE_6K), T8K INDEX (PK_TABLE_8K), T10K INDEX (PK_TABLE_10K))
# version: 3.0
expected_stdout_1 = """PLAN JOIN (T1 NATURAL, T1K INDEX (PK_TABLE_1K), T2K INDEX (PK_TABLE_2K), T3K INDEX (PK_TABLE_3K), T5K INDEX (PK_TABLE_5K), T4K INDEX (PK_TABLE_4K), T6K INDEX (PK_TABLE_6K), T8K INDEX (PK_TABLE_8K), T10K INDEX (PK_TABLE_10K))
COUNT
============
@ -119,8 +121,24 @@ expected_stdout = """PLAN JOIN (T1 NATURAL, T1K INDEX (PK_TABLE_1K), T2K INDEX (
1
"""
@pytest.mark.version('>=3')
@pytest.mark.version('>=3,<4')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.expected_stdout = expected_stdout_1
act.execute()
assert act.clean_stdout == act.clean_expected_stdout
# version: 4.0
expected_stdout_2 = """PLAN JOIN (T1 NATURAL, T1K INDEX (PK_TABLE_1K), T2K INDEX (PK_TABLE_2K), T3K INDEX (PK_TABLE_3K), T4K INDEX (PK_TABLE_4K), T5K INDEX (PK_TABLE_5K), T6K INDEX (PK_TABLE_6K), T8K INDEX (PK_TABLE_8K), T10K INDEX (PK_TABLE_10K))
COUNT
============
1
"""
@pytest.mark.version('>=4')
def test_2(act: Action):
act.expected_stdout = expected_stdout_2
act.execute()
assert act.clean_stdout == act.clean_expected_stdout

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,9 @@
ID: new-database-30
TITLE: New DB - RDB$TYPES content
DESCRIPTION: Check the correct content of RDB$TYPES in new database.
NOTES:
[07.02.2022] pcisar
Test fails on v4 (and likely on v5) because expected_stdout does not match real stdout.
FBTEST: functional.basic.db.30
"""
@ -3057,6 +3060,7 @@ expected_stdout_2 = """
Records affected: 1
"""
@pytest.mark.skip("FIXME: see notes")
@pytest.mark.version('>=4.0,<5.0')
def test_2(act: Action):
act.expected_stdout = expected_stdout_2
@ -4872,6 +4876,7 @@ expected_stdout_3 = """
Records affected: 1
"""
@pytest.mark.skip("FIXME: see notes")
@pytest.mark.version('>=5.0')
def test_3(act: Action):
act.expected_stdout = expected_stdout_3

View File

@ -18,16 +18,16 @@ act = python_act('db', substitutions=[('^.*TMP_CREATE_DB_08.F00', 'TMP_CREATE_DB
expected_stdout = """
TMP_CREATE_DB_08.F00
RDB$FILE_SEQUENCE 1
RDB$FILE_START 201
RDB$FILE_LENGTH 200
RDB$FILE_START 301
RDB$FILE_LENGTH 300
"""
@pytest.mark.version('>=3')
def test_1(act: Action):
script = f"""
create database '{act.db.dsn}' user '{act.db.user}'
password '{act.db.password}' LENGTH 200
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_08.F00')}' LENGTH 200
password '{act.db.password}' LENGTH 300
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_08.F00')}' LENGTH 300
;
set list on ;
select

View File

@ -18,26 +18,26 @@ act = python_act('db', substitutions=[('^.*TMP_CREATE_DB_09.F0', 'TMP_CREATE_DB_
expected_stdout = """
TMP_CREATE_DB_09.F00
RDB$FILE_SEQUENCE 1
RDB$FILE_START 201
RDB$FILE_LENGTH 200
RDB$FILE_START 301
RDB$FILE_LENGTH 300
TMP_CREATE_DB_09.F01
RDB$FILE_SEQUENCE 2
RDB$FILE_START 401
RDB$FILE_LENGTH 200
RDB$FILE_START 601
RDB$FILE_LENGTH 300
TMP_CREATE_DB_09.F02
RDB$FILE_SEQUENCE 3
RDB$FILE_START 601
RDB$FILE_LENGTH 200
RDB$FILE_START 901
RDB$FILE_LENGTH 300
"""
@pytest.mark.version('>=3')
def test_1(act: Action):
script = f"""
create database '{act.db.dsn}' user '{act.db.user}'
password '{act.db.password}' LENGTH 200
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_09.F00')}' LENGTH 200
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_09.F01')}' LENGTH 200
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_09.F02')}' LENGTH 200
password '{act.db.password}' LENGTH 300
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_09.F00')}' LENGTH 300
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_09.F01')}' LENGTH 300
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_09.F02')}' LENGTH 300
;
set list on ;
select

View File

@ -17,8 +17,8 @@ act = python_act('db', substitutions=[('^.*TMP_CREATE_DB_10.F0', 'TMP_CREATE_DB_
expected_stdout = """
TMP_CREATE_DB_10.F00
RDB$FILE_SEQUENCE 1
RDB$FILE_START 201
RDB$FILE_LENGTH 400
RDB$FILE_START 301
RDB$FILE_LENGTH 300
TMP_CREATE_DB_10.F01
RDB$FILE_SEQUENCE 2
RDB$FILE_START 601
@ -34,7 +34,7 @@ def test_1(act: Action):
script = f"""
create database '{act.db.dsn}' user '{act.db.user}'
password '{act.db.password}'
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_10.F00')}' STARTING AT PAGE 201
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_10.F00')}' STARTING AT PAGE 301
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_10.F01')}' STARTING AT PAGE 601
FILE '{act.db.db_path.with_name('TMP_CREATE_DB_10.F02')}' STARTING AT PAGE 1001
;

View File

@ -39,7 +39,7 @@ DESCRIPTION:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set bail on;

View File

@ -40,7 +40,7 @@ DESCRIPTION:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set list on;

View File

@ -31,7 +31,7 @@ DESCRIPTION:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set bail on;

View File

@ -33,7 +33,7 @@ DESCRIPTION:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set bail on;

View File

@ -29,7 +29,7 @@ DESCRIPTION:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set bail on;

View File

@ -26,7 +26,7 @@ DESCRIPTION:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set bail on;

View File

@ -42,7 +42,7 @@ NOTES:
import pytest
from firebird.qa import *
db = db_factory()
db = db_factory(charset='utf8')
test_script = """
set bail on;