EmergencyEMERGENCY? Get 24/7 Help Now!

MySQL QA Episode 7: Reducing Testcases for Beginners – single-threaded reducer.sh!

 | July 21, 2015 |  Posted In: Insight for DBAs, Insight for Developers, MySQL, Quality Assurance

PREVIOUS POST
NEXT POST

Welcome to MySQL QA Episode #7 – Reducing Testcases for Beginners: single-threaded reducer.sh!

In this episode we’ll learn how to use reducer.sh. Topics discussed;

  1. reducer.sh introduction/concepts
  2. Basic configurable variables & their default reducer.sh settings
    1. INPUTFILE options
    2. MODE=x
    3. TEXT=”text”
    4. WORKDIR_LOCATION & WORKDIR_M3_DIRECTORY
    5. MYEXTRA
    6. MYBASE
    7. PQUERY_MOD & PQUERY_LOC
    8. MODE5_COUNTTEXT, MODE5_ADDITIONAL_TEXT & MODE5_ADDITIONAL_COUNTTEXT
    9. How to learn more about each of the settings
  3. Manual example
  4. Introduction to the script’s self-recursion concept – subreducer
  5. Quick setup re-cap, details of an already executed QA run
  6. Examples from pquery-prep-red.sh (including some issue reviews)
  7. Gotcha’s
  8. QUERYTIMEOUT & STAGE1_LINES Variables

Full-screen viewing @ 720p resolution recommended.

If the speed is too slow for you, consider setting YouTube to 1.25 playback speed.

PREVIOUS POST
NEXT POST
Roel Van de Paar

Roel leads Percona's QA team. Before coming to Percona, he contributed significantly to the QA infrastructure at Oracle. Roel has a varied background in IT, backed up by many industry leading certifications. He also enjoys time with God, his wife and 5 children, or heading into nature.

6 Comments

  • For an earlier (long before the MySQL QA Series started) introduction of reducer.sh, you may also like to checkout https://www.percona.com/blog/2014/09/03/reducer-sh-a-powerful-mysql-test-case-simplificationreducer-tool/

  • The problems you may encounter using reducerXXX.sh after running pquery-prep_red.sh:
    1. dependency issue:
    [root@centos-base 362406]# ./reducer26.sh
    ./reducer26.sh: line 899: netstat: command not found

    To solve run following:
    yum install net-tools

    2. ‘/dev/shm/’ free space issue:
    [root@centos-base 362406]# ./reducer26.sh
    Error: /dev/shm/ does not have enough free space (3.5Gb free space required)

    You can increase size as following:
    For eg, give 8G:
    mount -o remount,size=8G /dev/shm

    Also you should update ‘/etc/fstab’ for reflectiong after server reboots, so add following to ‘/etc/fstab’ file:
    none /dev/shm tmpfs defaults,size=8G 0 0

  • To avoid any dependency issues, you can copy/use the ‘sudo yum install’ command in percona-qa/setup_server.sh – though I would not recommend running this script straight-out/fully unless you have a Centos 6 or 7 box dedicated to QA!

  • I love finding BUGs, it is my life art 🙂 especially with MySQL.
    I am doing all tedious things manually everyday. But you have created a tool for simplifying life of hunter. it is pleasure to play and find some interesting things with these tools. Thank you for a great job!

  • All, please note we have moved percona-qa to GitHub:
    https://github.com/Percona-QA/percona-qa

    To clone it, use:
    $ sudo yum install git
    $ cd ~
    $ git clone https://github.com/Percona-QA/percona-qa.git

    reducer.sh was also put directly into this repository (and it is maintained there), so *no* need anymore to separately fetch lp:randgen.

Leave a Reply