From: <ta...@us...> - 2017-03-04 17:26:36
|
Revision: 63689 http://sourceforge.net/p/firebird/code/63689 Author: tabloid Date: 2017-03-04 17:26:34 +0000 (Sat, 04 Mar 2017) Log Message: ----------- See added / modified .fbt file(s) Modified Paths: -------------- qa/fbt-repository/trunk/tests/functional/tabloid/batches/run-all.bat.txt Added Paths: ----------- qa/fbt-repository/trunk/tests/bugs/core_5480.fbt Added: qa/fbt-repository/trunk/tests/bugs/core_5480.fbt =================================================================== --- qa/fbt-repository/trunk/tests/bugs/core_5480.fbt (rev 0) +++ qa/fbt-repository/trunk/tests/bugs/core_5480.fbt 2017-03-04 17:26:34 UTC (rev 63689) @@ -0,0 +1,65 @@ +{ +'id': 'bugs.core_5480', +'qmid': None, +'tracker_id': 'CORE-5480', +'title': 'SUBSTRING startposition smaller than 1 should be allowed', +'description': + """ + Test is based on ticket samples, plus similar checks for non-ascii strings. + Checked on WI-T4.0.0.546 with UTF8 charset. Works fine. + """, +'min_versions': '4.0', +'versions': [ +{ + 'firebird_version': '4.0', + 'platform': 'All', + 'connection_character_set': 'UTF8', + 'test_type': 'ISQL', + 'init_script': + """ + """, + 'test_script': + """ + set list on; + + -- ASCII string tests: + select '|' || substring('abcdef' from 0) || '|' a01 from rdb$database; -- Expected result: 'abcdef' + select '|' || substring('abcdef' from 0 for 2) || '|' a02 from rdb$database; --Expected result: 'a' (and NOT 'ab') + select '|' || substring('abcdef' from -5 for 2) || '|' a03 from rdb$database; --Expected result: '' + select '|' || substring('abcdef' from -1 for 3) || '|' a04 from rdb$database; --Expected result: 'a' + select '|' || substring('abcdef' from -2 for 5) || '|' a05 from rdb$database; --Expected result: 'ab' + select '|' || substring('abcdef' from -2147483645 for 2147483647) || '|' a06 from rdb$database; -- added case with big values for arguments + + -- multi-byte string tests: + -- Euro sign (requires three bytes for encoding) concatenated + -- with letters from Danish, German & Iceland alphabets: + select '|' || substring('€åßðéæø' from 0) || '|' n01 from rdb$database; + select '|' || substring('€åßðéæø' from 0 for 2) || '|' n02 from rdb$database; + select '|' || substring('€åßðéæø' from -5 for 2) || '|' n03 from rdb$database; + select '|' || substring('€åßðéæø' from -1 for 3) || '|' n04 from rdb$database; + select '|' || substring('€åßðéæø' from -2 for 5) || '|' n05 from rdb$database; + select '|' || substring('€åßðéæø' from -2147483645 for 2147483647) || '|' n06 from rdb$database; + + """, + 'expected_stdout': + """ + A01 |abcdef| + A02 |a| + A03 || + A04 |a| + A05 |ab| + A06 |a| + + N01 |€åßðéæø| + N02 |€| + N03 || + N04 |€| + N05 |€å| + N06 |€| + """, + 'expected_stderr': + """ + """ +} +] +} Property changes on: qa/fbt-repository/trunk/tests/bugs/core_5480.fbt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Modified: qa/fbt-repository/trunk/tests/functional/tabloid/batches/run-all.bat.txt =================================================================== --- qa/fbt-repository/trunk/tests/functional/tabloid/batches/run-all.bat.txt 2017-02-17 11:21:58 UTC (rev 63688) +++ qa/fbt-repository/trunk/tests/functional/tabloid/batches/run-all.bat.txt 2017-03-04 17:26:34 UTC (rev 63689) @@ -18,6 +18,7 @@ set pyp=C:\Python27 md !logdir! 2>nul +::taskkill /fi "SERVICES eq FirebirdServerfb40_tmp" /f /im * if exist !joblog! ( del !joblog! @@ -208,9 +209,17 @@ set msg=Restore original file !fp!\firebird.conf call :sho "!msg!" !joblog! - copy !fp!\firebird.conf.previous !fp!\firebird.conf 2>&1 1>>!joblog! - dir !fp!\firebird.conf | findstr /i /c:firebird 2>&1 1>>!joblog! + ( + copy !fp!\firebird.conf.previous !fp!\firebird.conf + dir !fp!\firebird.conf | findstr /i /c:firebird + echo Check content of ORIGINAL !fp!\firebird.conf that was in use before this QA run: + echo -------------------------------------- + findstr /r /c:"^^[^^#;]" !fp!\firebird.conf + echo -------------------------------------- + ) 2>&1 1>>!joblog! + + @rem Original firebird.conf restored, no we can clear flag: set job_failed_flag=0 @@ -487,12 +496,13 @@ setlocal set fbs=%1 set joblog=%2 - + set tk_used=0 +:loop4stop set cmd_run=sc query FirebirdServer!fbs! call :sho "!cmd_run!" !joblog! cmd /c !cmd_run! | findstr /i /c:"STOPPED" 1>nul 2>&1 if errorlevel 1 ( - set msg=Attempt to stop service FirebirdServer!fbs! + set msg=Attempt to stop service FirebirdServer!fbs!, flag of TASKKILL usage: !tk_used! call :sho "!msg!" !joblog! set cmd_run=sc stop FirebirdServer!fbs! @@ -502,6 +512,9 @@ set msg=Wait a few seconds. . . call :sho "!msg!" !joblog! + @rem It's enough to wait no more than 10 seconds. + @rem Otherwise service should be forcely teminated using windows TASKKILL utility. + ping -n 11 127.0.0.1 1>nul set msg=Check that service was really stopped. @@ -512,6 +525,30 @@ cmd /c !cmd_run! | findstr /i /c:state /c:service_name 1>>!joblog! 2>&1 cmd /c !cmd_run! | findstr /i /c:"STOPPED" 1>nul 2>&1 if errorlevel 1 ( + @rem NB: taskkill should be called with /f switch in order to kill service. + @rem E:\FB40.TMPINSTANCE>taskkill /fi "SERVICES eq FirebirdServerfb40_tmp" /f /im * + @rem Expected STDOUT should be: + @rem SUCCESS: The process with PID 5992 has been terminated. + + if .!tk_used!.==.0. ( + + set msg=FAIL: service !fbs! is not in 'STOPPED' state. Try to terminate it using TASKKILL. + call :sho "!msg!" !joblog! + + taskkill /fi "SERVICES eq FirebirdServer!fbs!" /f /im * 1>>!joblog! 2>&1 + set tk_used=1 + findstr /i /r /c:"SUCCESS: The process with PID .* terminated" !joblog! 1>nul 2>&1 + if not errorlevel 1 ( + set msg=Service !fbs! executable was successfully terminated by TASKKILL. Loop to STOP service by SC command. + call :sho "!msg!" !joblog! + goto loop4stop + ) else ( + set msg=FAIL: service !fbs! executable can not be terminated using TASKKILL. Job terminated. + call :sho "!msg!" !joblog! + goto final + ) + ) + set msg=FAIL: service !fbs! is not in 'STOPPED' state. Job terminated. call :sho "!msg!" !joblog! goto final This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |