WL#9354: Remove usage of skip from MTR test and use include files instead
Affects: Server-8.0
—
Status: Complete
While studying the MTR tests, several cases are found where the already existing inc files are not used in the tests. The skip conditions are re-written in the test leading to redundancy. This can be eliminated by sourcing the inc file which exists to serve the same purpose. ex- Few tests check for ps-protocol as shown below: if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0 OR $PS_PROTOCOL = 0`) { --skip Need ps-protocol } This instead can be done by sourcing "include/have_ps_protocol.inc" which contains the same skip check logic. User Documentation ================== Work was done for test suite. No user documentation required.
FR1: Remove skip conditions from MTR tests and source include files in case we have an existing inc file. FR2: Remove skip conditions from MTR tests and source new include file in case we do not have an inc file for the same.
There are several skip cases seen in MTR tests which should be a part of existing inc files. However, the inc files are not used. Few of the affected test cases are listed below: 1. List of few test-cases where the common line of code for ps-protocol check is replaced with have_ps_protocol.inc group_by_fd_ps_prot.test grant_cache.test query_cache_ps_ps_prot.test 2. List of few test-cases where the common line of code for normal protocol is replaced with have_normal_protocol.inc group_by_fd_no_prot.test filesort_pq.inc bugs_no_prot_all.test 3. List of few test-cases where the common line of code for embedded server is replaced with have_embedded.inc is_columns_is_embedded.test is_collations.test is_coll_char_set_appl.test 4. Below is the case, were a new inc file is created to check the POSIX locale. mysql_locale_posix.test
Below are the cases een: 1. /* check for normal protocol */ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) { --skip Need normal protocol } 1.1 /* check for normal protocol */ if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) { --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled } --------------------------------------------------------------------------------- 2. /*check for embedded server */ if (`SELECT VERSION() NOT LIKE '%embedded%'`) { --skip Test requires: embedded server } --------------------------------------------------------------------------------- 3. /* check for ps protocol */ if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0 OR $PS_PROTOCOL = 0`) { --skip Need ps-protocol } --------------------------------------------------------------------------------- Case 1 and 1.1 will be replaced with have_normal_protocol.inc within the test Case 2 will be replaced with have_embedded.inc Case 3 will be replaced with have_ps_protocol.inc
Copyright (c) 2000, 2024, Oracle Corporation and/or its affiliates. All rights reserved.