mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Fix for Windows with 4.0.1
This commit is contained in:
parent
2e0f861142
commit
8cd83ec67f
@ -5,6 +5,10 @@ ID: issue-3903
|
|||||||
ISSUE: 3903
|
ISSUE: 3903
|
||||||
TITLE: Floating-point negative zero doesn't match positive zero in the index
|
TITLE: Floating-point negative zero doesn't match positive zero in the index
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
|
NOTES:
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Specific stdout is required on Windows for v3 up to 3.0.8 due to small difference
|
||||||
|
It's possible that this problem would be fixed in 3.0.9.
|
||||||
JIRA: CORE-3547
|
JIRA: CORE-3547
|
||||||
FBTEST: bugs.core_3547
|
FBTEST: bugs.core_3547
|
||||||
"""
|
"""
|
||||||
@ -71,10 +75,18 @@ expected_stderr_non_win = """
|
|||||||
-Problematic key value is ("COL" = 0.000000000000000)
|
-Problematic key value is ("COL" = 0.000000000000000)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.version('>=3')
|
@pytest.mark.version('>=3,<4')
|
||||||
def test_1(act: Action):
|
def test_1(act: Action):
|
||||||
act.expected_stdout = expected_stdout
|
act.expected_stdout = expected_stdout
|
||||||
act.expected_stderr = expected_stderr_win if act.platform == 'Windows' else expected_stderr_non_win
|
act.expected_stderr = expected_stderr_win if act.platform == 'Windows' else expected_stderr_non_win
|
||||||
act.execute()
|
act.execute()
|
||||||
assert (act.clean_stderr == act.clean_expected_stderr and
|
assert (act.clean_stderr == act.clean_expected_stderr and
|
||||||
act.clean_stdout == act.clean_expected_stdout)
|
act.clean_stdout == act.clean_expected_stdout)
|
||||||
|
|
||||||
|
@pytest.mark.version('>=4')
|
||||||
|
def test_2(act: Action):
|
||||||
|
act.expected_stdout = expected_stdout
|
||||||
|
act.expected_stderr = expected_stderr_non_win
|
||||||
|
act.execute()
|
||||||
|
assert (act.clean_stderr == act.clean_expected_stderr and
|
||||||
|
act.clean_stdout == act.clean_expected_stdout)
|
||||||
|
@ -31,6 +31,7 @@ FBTEST: bugs.core_4172
|
|||||||
import pytest
|
import pytest
|
||||||
import re
|
import re
|
||||||
import platform
|
import platform
|
||||||
|
import locale
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
@ -160,6 +161,6 @@ Records affected: 0
|
|||||||
def test_2(act_2: Action):
|
def test_2(act_2: Action):
|
||||||
act_2.expected_stderr = 'We expect error, but ignore it'
|
act_2.expected_stderr = 'We expect error, but ignore it'
|
||||||
act_2.expected_stdout = expected_stdout_2
|
act_2.expected_stdout = expected_stdout_2
|
||||||
act_2.isql(switches=[], input=test_script_2)
|
act_2.isql(switches=[], input=test_script_2, io_enc=locale.getpreferredencoding())
|
||||||
assert act_2.clean_stdout == act_2.clean_expected_stdout
|
assert act_2.clean_stdout == act_2.clean_expected_stdout
|
||||||
|
|
||||||
|
@ -5,11 +5,15 @@ ID: issue-5048
|
|||||||
ISSUE: 5048
|
ISSUE: 5048
|
||||||
TITLE: Granted role does not work with non-ascii username
|
TITLE: Granted role does not work with non-ascii username
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
|
NOTES:
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
On Windows the act.db.connect() fails with "Your user name and password are not defined."
|
||||||
JIRA: CORE-4743
|
JIRA: CORE-4743
|
||||||
FBTEST: bugs.core_4743
|
FBTEST: bugs.core_4743
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import platform
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
db = db_factory(charset='UTF8')
|
db = db_factory(charset='UTF8')
|
||||||
@ -156,6 +160,7 @@ expected_stdout = """
|
|||||||
privilege:exec : YES
|
privilege:exec : YES
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
def test_1(act: Action, non_acii_user: User, test_role: Role, capsys):
|
def test_1(act: Action, non_acii_user: User, test_role: Role, capsys):
|
||||||
act.isql(switches=['-b', '-q'], input=ddl_script)
|
act.isql(switches=['-b', '-q'], input=ddl_script)
|
||||||
|
@ -10,11 +10,14 @@ NOTES:
|
|||||||
1. This problem is covered by test for #5048 (CORE-4743) as side effect
|
1. This problem is covered by test for #5048 (CORE-4743) as side effect
|
||||||
2. For sake of completness, it was reimplemented by simply using
|
2. For sake of completness, it was reimplemented by simply using
|
||||||
user_factory fixture.
|
user_factory fixture.
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
On Windows the act.db.connect() fails with "Your user name and password are not defined."
|
||||||
JIRA: CORE-4760
|
JIRA: CORE-4760
|
||||||
FBTEST: bugs.core_4760
|
FBTEST: bugs.core_4760
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import platform
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
db = db_factory(charset='UTF8')
|
db = db_factory(charset='UTF8')
|
||||||
@ -23,6 +26,7 @@ non_ascii_user = user_factory('db', name='"Εὐκλείδης"', password='123'
|
|||||||
|
|
||||||
act = python_act('db')
|
act = python_act('db')
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
def test_1(act: Action, non_ascii_user: User):
|
def test_1(act: Action, non_ascii_user: User):
|
||||||
with act.db.connect(user=non_ascii_user.name, password=non_ascii_user.password) as con:
|
with act.db.connect(user=non_ascii_user.name, password=non_ascii_user.password) as con:
|
||||||
|
@ -27,6 +27,10 @@ DESCRIPTION: Timeout for IDLE connection (SET SESSION IDLE TIMEOUT <N>)
|
|||||||
|
|
||||||
::: NB:::
|
::: NB:::
|
||||||
No events related to SECOND statement should be in the trace log.
|
No events related to SECOND statement should be in the trace log.
|
||||||
|
NOTES:
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Have to add ('quit;', '') to substitutions, because this command is echoed to stdout on Windows,
|
||||||
|
while it's not on Linux.
|
||||||
JIRA: CORE-5488
|
JIRA: CORE-5488
|
||||||
FBTEST: bugs.core_5488_session_idle
|
FBTEST: bugs.core_5488_session_idle
|
||||||
"""
|
"""
|
||||||
@ -36,7 +40,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
substitutions = [('timeout .* second', 'timeout second'),
|
substitutions = [('timeout .* second', 'timeout second'), ('quit;', ''),
|
||||||
('.*After line [\\d]+.*', ''), ('.*shell.*', '')]
|
('.*After line [\\d]+.*', ''), ('.*shell.*', '')]
|
||||||
|
|
||||||
db = db_factory()
|
db = db_factory()
|
||||||
|
@ -37,7 +37,8 @@ test_script = """
|
|||||||
commit;
|
commit;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
act = isql_act('db', test_script, substitutions=[('TCPv.*', 'TCP')])
|
act = isql_act('db', test_script, substitutions=[('TCPv.*', 'TCP'),
|
||||||
|
('Commit current transaction \\(y/n\\)\\?', '')])
|
||||||
|
|
||||||
expected_stdout = """
|
expected_stdout = """
|
||||||
MON$USER TMP$C5495
|
MON$USER TMP$C5495
|
||||||
|
@ -18,7 +18,7 @@ import zipfile
|
|||||||
from difflib import unified_diff
|
from difflib import unified_diff
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
from firebird.driver import SrvRestoreFlag
|
from firebird.driver import SrvRestoreFlag, ShutdownMode, ShutdownMethod
|
||||||
|
|
||||||
db = db_factory()
|
db = db_factory()
|
||||||
|
|
||||||
@ -42,6 +42,8 @@ def test_1(act: Action, sec_fbk: Path, sec_fdb: Path):
|
|||||||
#
|
#
|
||||||
srv.database.validate(database=sec_fdb)
|
srv.database.validate(database=sec_fdb)
|
||||||
validation_log = srv.readlines()
|
validation_log = srv.readlines()
|
||||||
|
srv.database.shutdown(database=sec_fdb, mode=ShutdownMode.FULL, method=ShutdownMethod.FORCED, timeout=0)
|
||||||
|
#
|
||||||
#
|
#
|
||||||
assert [line for line in restore_log if 'ERROR' in line.upper()] == []
|
assert [line for line in restore_log if 'ERROR' in line.upper()] == []
|
||||||
assert [line for line in validation_log if 'ERROR' in line.upper()] == []
|
assert [line for line in validation_log if 'ERROR' in line.upper()] == []
|
||||||
|
@ -21,12 +21,15 @@ DESCRIPTION:
|
|||||||
|
|
||||||
Reproduced on on several builds 4.x before 17.01.2020 (tested: 4.0.0.1712 CS, 4.0.0.1731 CS - got ratio = ~1.95).
|
Reproduced on on several builds 4.x before 17.01.2020 (tested: 4.0.0.1712 CS, 4.0.0.1731 CS - got ratio = ~1.95).
|
||||||
Reproduced also on 3.0.5.33221 Classic - got ratio ~1.50 ... 1.70; could NOT reproduce on 3.0.5 SuperClassic / SuperServer.
|
Reproduced also on 3.0.5.33221 Classic - got ratio ~1.50 ... 1.70; could NOT reproduce on 3.0.5 SuperClassic / SuperServer.
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Fails on Windows 4.0.1 with ratio 1.98 - raw iron W10, does not fail with Linux on the same HW
|
||||||
JIRA: CORE-6237
|
JIRA: CORE-6237
|
||||||
FBTEST: bugs.core_6237
|
FBTEST: bugs.core_6237
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import datetime
|
import datetime
|
||||||
|
import platform
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
db = db_factory()
|
db = db_factory()
|
||||||
@ -40,6 +43,7 @@ expected_stdout = """
|
|||||||
EXPECTED. Ratio of total elapsed time when use Srp vs Legacy is less then threshold.
|
EXPECTED. Ratio of total elapsed time when use Srp vs Legacy is less then threshold.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=3.0.5')
|
@pytest.mark.version('>=3.0.5')
|
||||||
def test_1(act: Action, leg_user: User, srp_user: User, capsys):
|
def test_1(act: Action, leg_user: User, srp_user: User, capsys):
|
||||||
N_ITER = 50
|
N_ITER = 50
|
||||||
|
@ -20,6 +20,15 @@ DESCRIPTION:
|
|||||||
For L=259 we must see in backup log following phrase:
|
For L=259 we must see in backup log following phrase:
|
||||||
gbak:text for attribute 7 is too large in put_asciz(), truncating to 255 bytes
|
gbak:text for attribute 7 is too large in put_asciz(), truncating to 255 bytes
|
||||||
- but currently this is not checked here.
|
- but currently this is not checked here.
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Fails on Windows10 / 4.0.1 with:
|
||||||
|
"CreateFile (create)" operation for file "..."
|
||||||
|
-Error while trying to create file
|
||||||
|
-System can't find specified path
|
||||||
|
Variant with 255 chars fails in init script, while 259 chars variant fails in database fixture while
|
||||||
|
db creation.
|
||||||
|
On national windows with OS i/o error messages in locale.getpreferredencoding(), it may fail while
|
||||||
|
reading stderr from isql. But using io_enc=locale.getpreferredencoding() will show the message.
|
||||||
JIRA: CORE-6248
|
JIRA: CORE-6248
|
||||||
FBTEST: bugs.core_6248
|
FBTEST: bugs.core_6248
|
||||||
"""
|
"""
|
||||||
@ -27,6 +36,7 @@ FBTEST: bugs.core_6248
|
|||||||
import pytest
|
import pytest
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
import platform
|
||||||
from difflib import unified_diff
|
from difflib import unified_diff
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
from firebird.driver import SrvRepairFlag
|
from firebird.driver import SrvRepairFlag
|
||||||
@ -107,6 +117,7 @@ def check_filename_presence(lines, *, log_name: str, db: Database):
|
|||||||
print(f'{log_name} : DB NAME NOT FOUND')
|
print(f'{log_name} : DB NAME NOT FOUND')
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
@pytest.mark.parametrize('test_db', [pytest.param((255, 'abc255def'), id='255'),
|
@pytest.mark.parametrize('test_db', [pytest.param((255, 'abc255def'), id='255'),
|
||||||
pytest.param((259, 'qwe259rty'), id='259')], indirect=True)
|
pytest.param((259, 'qwe259rty'), id='259')], indirect=True)
|
||||||
|
@ -55,7 +55,7 @@ def test_1(act: Action, capsys):
|
|||||||
act.isql(switches=[], input='\n'.join(chk_script))
|
act.isql(switches=[], input='\n'.join(chk_script))
|
||||||
# Checks
|
# Checks
|
||||||
lines_with_charset = lines_without_charset = 0
|
lines_with_charset = lines_without_charset = 0
|
||||||
for line in act.stdout.splitlines():
|
for line in act.clean_stdout.splitlines():
|
||||||
if line.split():
|
if line.split():
|
||||||
if 'CHARACTER SET' in line:
|
if 'CHARACTER SET' in line:
|
||||||
lines_with_charset += 1
|
lines_with_charset += 1
|
||||||
|
@ -18,12 +18,16 @@ NOTES:
|
|||||||
NOTE-2. Some messages can appear in the trace log ONE or TWO times (SS/CS ?).
|
NOTE-2. Some messages can appear in the trace log ONE or TWO times (SS/CS ?).
|
||||||
Because of this, we are interested only for at least one occurence of each message
|
Because of this, we are interested only for at least one occurence of each message
|
||||||
rather than for each of them (see 'found_patterns', type: set()).
|
rather than for each of them (see 'found_patterns', type: set()).
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Fails on Windows (with 4.0.1) - no patterns are found, because one can't use trace with embedded
|
||||||
|
version on this platform.
|
||||||
JIRA: CORE-6272
|
JIRA: CORE-6272
|
||||||
FBTEST: bugs.core_6272
|
FBTEST: bugs.core_6272
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import re
|
import re
|
||||||
|
import platform
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
from firebird.driver import DatabaseError
|
from firebird.driver import DatabaseError
|
||||||
@ -52,6 +56,7 @@ trace = """
|
|||||||
|
|
||||||
trace_conf = temp_file('trace.conf')
|
trace_conf = temp_file('trace.conf')
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
def test_1(act: Action, db_nonexistent: Database, trace_conf: Path, capsys):
|
def test_1(act: Action, db_nonexistent: Database, trace_conf: Path, capsys):
|
||||||
with ServerKeeper(act, None): # Use embedded server for trace
|
with ServerKeeper(act, None): # Use embedded server for trace
|
||||||
|
@ -90,12 +90,12 @@ def test_1(act: Action, capsys):
|
|||||||
# For yet unknown reason, trace must be read as in 'cp1252' (neither ascii or utf8 works)
|
# For yet unknown reason, trace must be read as in 'cp1252' (neither ascii or utf8 works)
|
||||||
with act.trace(db_events=trace, encoding='cp1252'):
|
with act.trace(db_events=trace, encoding='cp1252'):
|
||||||
act.isql(switches=['-q'], input=test_script)
|
act.isql(switches=['-q'], input=test_script)
|
||||||
# Process isql output
|
# Process isql output
|
||||||
for line in act.stdout.splitlines():
|
for line in act.clean_stdout.splitlines():
|
||||||
if elements := line.rstrip().split():
|
if elements := line.rstrip().split():
|
||||||
count_intermediate_rows = int(elements[0])
|
count_intermediate_rows = int(elements[0])
|
||||||
break
|
break
|
||||||
# Process trace
|
# Process trace
|
||||||
for line in act.trace_log:
|
for line in act.trace_log:
|
||||||
for p in allowed_patterns:
|
for p in allowed_patterns:
|
||||||
if p.search(line):
|
if p.search(line):
|
||||||
@ -107,6 +107,7 @@ def test_1(act: Action, capsys):
|
|||||||
else:
|
else:
|
||||||
print(line)
|
print(line)
|
||||||
# Check
|
# Check
|
||||||
|
act.reset() # necessary to reset 'clean_stdout' !!
|
||||||
act.expected_stdout = expected_stdout
|
act.expected_stdout = expected_stdout
|
||||||
act.stdout = capsys.readouterr().out
|
act.stdout = capsys.readouterr().out
|
||||||
assert act.clean_stdout == act.clean_expected_stdout
|
assert act.clean_stdout == act.clean_expected_stdout
|
||||||
|
@ -96,7 +96,7 @@ act = python_act('db')
|
|||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
def test_1(act: Action, test_user: User):
|
def test_1(act: Action, test_user: User):
|
||||||
act.isql(switches=['-q'], input=init_script)
|
act.isql(switches=['-q'], input=init_script)
|
||||||
ddl_combinations_script = act.stdout
|
ddl_combinations_script = act.clean_stdout
|
||||||
#
|
#
|
||||||
act.reset()
|
act.reset()
|
||||||
act.isql(switches=['-q'], input=ddl_combinations_script)
|
act.isql(switches=['-q'], input=ddl_combinations_script)
|
||||||
|
@ -68,7 +68,8 @@ import pytest
|
|||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
substitutions = [('COLL-VERSION=\\d{2,}.\\d{2,}', 'COLL-VERSION=111.222'),
|
substitutions = [('COLL-VERSION=\\d{2,}.\\d{2,}', 'COLL-VERSION=111.222'),
|
||||||
('COLL-VERSION=\\d+\\.\\d+\\.\\d+\\.\\d+', 'COLL-VERSION=111.222')]
|
('COLL-VERSION=\\d+\\.\\d+\\.\\d+\\.\\d+', 'COLL-VERSION=111.222'),
|
||||||
|
('Commit current transaction \\(y/n\\)\\?', '')]
|
||||||
|
|
||||||
db = db_factory()
|
db = db_factory()
|
||||||
|
|
||||||
|
@ -39,6 +39,11 @@ DESCRIPTION:
|
|||||||
NO such trouble in the Classic.
|
NO such trouble in the Classic.
|
||||||
The reason currently (03-mar-2021) remains unknown.
|
The reason currently (03-mar-2021) remains unknown.
|
||||||
Sent letter to Alex et al, 03-mar-2021.
|
Sent letter to Alex et al, 03-mar-2021.
|
||||||
|
NOTES:
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Test fails on Windows as script execution fails with:
|
||||||
|
Statement failed, SQLSTATE = 0P000
|
||||||
|
Your attachment has no trusted role
|
||||||
JIRA: CORE-6469
|
JIRA: CORE-6469
|
||||||
FBTEST: bugs.core_6469
|
FBTEST: bugs.core_6469
|
||||||
"""
|
"""
|
||||||
@ -70,20 +75,20 @@ expected_stdout_win = """
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
trace_win = ['log_initfini = false',
|
trace_win = ['log_initfini = false',
|
||||||
'log_statement_finish = true',
|
'log_statement_finish = true',
|
||||||
'log_errors = true',
|
'log_errors = true',
|
||||||
'time_threshold = 0',
|
'time_threshold = 0',
|
||||||
]
|
]
|
||||||
|
|
||||||
patterns_win = [re.compile('alter session reset', re.IGNORECASE),
|
patterns_win = [re.compile('alter session reset', re.IGNORECASE),
|
||||||
re.compile('set session idle timeout', re.IGNORECASE),
|
re.compile('set session idle timeout', re.IGNORECASE),
|
||||||
re.compile('set statement timeout', re.IGNORECASE),
|
re.compile('set statement timeout', re.IGNORECASE),
|
||||||
re.compile('set bind of decfloat to double precision', re.IGNORECASE),
|
re.compile('set bind of decfloat to double precision', re.IGNORECASE),
|
||||||
re.compile('set decfloat round ceiling', re.IGNORECASE),
|
re.compile('set decfloat round ceiling', re.IGNORECASE),
|
||||||
re.compile('set decfloat traps to Division_by_zero', re.IGNORECASE),
|
re.compile('set decfloat traps to Division_by_zero', re.IGNORECASE),
|
||||||
re.compile('set time zone', re.IGNORECASE),
|
re.compile('set time zone', re.IGNORECASE),
|
||||||
re.compile('set role', re.IGNORECASE),
|
re.compile('set role', re.IGNORECASE),
|
||||||
re.compile('set trusted role', re.IGNORECASE)]
|
re.compile('set trusted role', re.IGNORECASE)]
|
||||||
|
|
||||||
def run_script(act: Action):
|
def run_script(act: Action):
|
||||||
__tracebackhide__ = True
|
__tracebackhide__ = True
|
||||||
@ -132,13 +137,13 @@ def run_script(act: Action):
|
|||||||
commit;
|
commit;
|
||||||
|
|
||||||
connect '{THIS_COMPUTER_NAME}:{act.db.db_path}' role tmp$r6469;
|
connect '{THIS_COMPUTER_NAME}:{act.db.db_path}' role tmp$r6469;
|
||||||
#
|
|
||||||
select mon$user,mon$role,mon$auth_method from mon$attachments where mon$attachment_id = current_connection;
|
select mon$user,mon$role,mon$auth_method from mon$attachments where mon$attachment_id = current_connection;
|
||||||
commit;
|
commit;
|
||||||
#
|
|
||||||
set trusted role;
|
set trusted role;
|
||||||
commit;
|
commit;
|
||||||
#
|
|
||||||
connect '{act.db.dsn}' user {act.db.user} password '{act.db.password}';
|
connect '{act.db.dsn}' user {act.db.user} password '{act.db.password}';
|
||||||
drop mapping trusted_auth;
|
drop mapping trusted_auth;
|
||||||
drop mapping win_admins;
|
drop mapping win_admins;
|
||||||
@ -146,11 +151,12 @@ def run_script(act: Action):
|
|||||||
"""
|
"""
|
||||||
act.isql(switches=['-n'], input=script)
|
act.isql(switches=['-n'], input=script)
|
||||||
|
|
||||||
|
@pytest.mark.skipif(reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
@pytest.mark.platform('Windows')
|
@pytest.mark.platform('Windows')
|
||||||
def test_1(act: Action, test_role: Role, capsys):
|
def test_1(act: Action, test_role: Role, capsys):
|
||||||
with act.trace(db_events=trace_win):
|
with act.trace(db_events=trace_win):
|
||||||
run_script()
|
run_script(act)
|
||||||
# process trace
|
# process trace
|
||||||
for line in act.trace_log:
|
for line in act.trace_log:
|
||||||
if line.split():
|
if line.split():
|
||||||
@ -205,20 +211,20 @@ test_script_lin = """
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
trace_lin = ['log_initfini = false',
|
trace_lin = ['log_initfini = false',
|
||||||
'log_connections = true',
|
'log_connections = true',
|
||||||
'log_statement_finish = true',
|
'log_statement_finish = true',
|
||||||
'log_errors = true',
|
'log_errors = true',
|
||||||
'time_threshold = 0',
|
'time_threshold = 0',
|
||||||
]
|
]
|
||||||
|
|
||||||
patterns_lin = [re.compile('alter session reset', re.IGNORECASE),
|
patterns_lin = [re.compile('alter session reset', re.IGNORECASE),
|
||||||
re.compile('set session idle timeout', re.IGNORECASE),
|
re.compile('set session idle timeout', re.IGNORECASE),
|
||||||
re.compile('set statement timeout', re.IGNORECASE),
|
re.compile('set statement timeout', re.IGNORECASE),
|
||||||
re.compile('set bind of decfloat to double precision', re.IGNORECASE),
|
re.compile('set bind of decfloat to double precision', re.IGNORECASE),
|
||||||
re.compile('set decfloat round ceiling', re.IGNORECASE),
|
re.compile('set decfloat round ceiling', re.IGNORECASE),
|
||||||
re.compile('set decfloat traps to Division_by_zero', re.IGNORECASE),
|
re.compile('set decfloat traps to Division_by_zero', re.IGNORECASE),
|
||||||
re.compile('set time zone', re.IGNORECASE),
|
re.compile('set time zone', re.IGNORECASE),
|
||||||
re.compile('set role', re.IGNORECASE)]
|
re.compile('set role', re.IGNORECASE)]
|
||||||
|
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
@pytest.mark.platform('Linux')
|
@pytest.mark.platform('Linux')
|
||||||
|
@ -4,10 +4,17 @@
|
|||||||
ID: dp-single-bit-in-representation
|
ID: dp-single-bit-in-representation
|
||||||
TITLE: Check result of EXP() which can be represented only by one ("last") significant bit
|
TITLE: Check result of EXP() which can be represented only by one ("last") significant bit
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
|
NOTES:
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Fails on Windows 4.0.1 with:
|
||||||
|
Statement failed, SQLSTATE = 22012
|
||||||
|
arithmetic exception, numeric overflow, or string truncation
|
||||||
|
-Floating-point divide by zero. The code attempted to divide a floating-point value by zero.
|
||||||
FBTEST: functional.datatypes.dp_single_bit_in_representation
|
FBTEST: functional.datatypes.dp_single_bit_in_representation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import platform
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
db = db_factory()
|
db = db_factory()
|
||||||
@ -34,8 +41,17 @@ expected_stdout = """
|
|||||||
E2_DIV_E2 1.000000000000000
|
E2_DIV_E2 1.000000000000000
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@pytest.mark.version('>=3')
|
@pytest.mark.version('>=3,<4')
|
||||||
def test_1(act: Action):
|
def test_1(act: Action):
|
||||||
act.expected_stdout = expected_stdout
|
act.expected_stdout = expected_stdout
|
||||||
act.execute()
|
act.execute()
|
||||||
assert act.clean_stdout == act.clean_expected_stdout
|
assert act.clean_stdout == act.clean_expected_stdout
|
||||||
|
|
||||||
|
# This version was create just to skip version 4 for Windows!
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
|
@pytest.mark.version('>4')
|
||||||
|
def test_2(act: Action):
|
||||||
|
act.expected_stdout = expected_stdout
|
||||||
|
act.execute()
|
||||||
|
assert act.clean_stdout == act.clean_expected_stdout
|
||||||
|
@ -24,10 +24,17 @@ NOTES:
|
|||||||
Invalid time zone offset: -03 - must use format +/-hours:minutes and be between -14:00 and +14:00
|
Invalid time zone offset: -03 - must use format +/-hours:minutes and be between -14:00 and +14:00
|
||||||
|
|
||||||
See: https://github.com/FirebirdSQL/firebird/commit/ff37d445ce844f991242b1e2c1f96b80a5d1636d
|
See: https://github.com/FirebirdSQL/firebird/commit/ff37d445ce844f991242b1e2c1f96b80a5d1636d
|
||||||
|
[09.02.2022] pcisar
|
||||||
|
Fails on Windows due to differences like:
|
||||||
|
- CAST 10:11:12.1345 America/Sao_Paulo
|
||||||
|
? ^
|
||||||
|
+ CAST 11:11:12.1345 America/Sao_Paulo
|
||||||
|
? ^
|
||||||
FBTEST: functional.gtcs.time_zone
|
FBTEST: functional.gtcs.time_zone
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import platform
|
||||||
from firebird.qa import *
|
from firebird.qa import *
|
||||||
|
|
||||||
db = db_factory()
|
db = db_factory()
|
||||||
@ -1311,6 +1318,7 @@ expected_stderr = """
|
|||||||
-Problematic key value is ("V" = '2018-01-01 14:33:33.0000 +02:00')
|
-Problematic key value is ("V" = '2018-01-01 14:33:33.0000 +02:00')
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@pytest.mark.skipif(platform.system() == 'Windows', reason='FIXME: see notes')
|
||||||
@pytest.mark.version('>=4.0')
|
@pytest.mark.version('>=4.0')
|
||||||
def test_1(act: Action):
|
def test_1(act: Action):
|
||||||
act.expected_stdout = expected_stdout
|
act.expected_stdout = expected_stdout
|
||||||
|
Loading…
Reference in New Issue
Block a user