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

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

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

Share this post

Comments (6)

  • Roel Van de Paar Reply

    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/

    July 21, 2015 at 11:12 pm
  • Shahriyar Rzayev Reply

    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

    August 21, 2015 at 1:20 am
  • Roel Van de Paar Reply

    @Shahriyar – Thanks! You’re writing a mini manual for reducer.sh 🙂 Btw,

    [roel@localhost ~]$ cat /etc/fstab | grep tmpfs
    tmpfs /dev/shm tmpfs size=16g,noatime,nodiratime 0 0

    August 21, 2015 at 1:25 am
  • Roel Van de Paar Reply

    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!

    August 21, 2015 at 1:31 am
  • Shahriyar Rzayev Reply

    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!

    August 21, 2015 at 1:34 am
  • Roel Van de Paar Reply

    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.

    November 26, 2015 at 1:02 am

Leave a Reply