redact_password.sh test is unstable

Description

Issue 1:

redact_password.sh test is unstable if you run the test via -t parameter:

 

XBCLOUD_CREDENTIALS='--storage=s3 --s3-endpoint=http://127.0.0.1:9000 --s3-access-key=admin --s3-secret-key=password --s3-bucket=newbucket' ./run.sh -r /dev/shm/ -d /work/ps/ins/8.0/ -t suites/xbcloud/redact_password.sh . . . 2023-02-07 12:07:04: run.sh: check for password string in ps with 276399  marcelo   276402  276399  0 12:07 pts/0    00:00:00 /bin/bash ./run.sh -r /dev/shm/ -d /work/ps/ins/8.0/ -t suites/xbcloud/redact_password.sh 2023-02-07 12:07:04: run.sh: found password string in ps output

 

It happens because:

  1. since the suite folder name has xbcloud it will match the test string

  2. since the test name has password it will match the test string

 

Issue 2:

If you use admin as password, mysql.ibd file will match:

023-02-07 12:19:35: run.sh: check for admin in backup directory grep: /work/pxb/ins/8.0/xtrabackup-test/test/var/w5/var1/downloaded_full/mysql.ibd: binary file matches 2023-02-07 12:19:35: run.sh: found admin string in /work/pxb/ins/8.0/xtrabackup-test/test/var/w5/var1/downloaded_full

The file has c_with_admin string on it.

We should either list the files we want to find, or in this case, filter out binary files(-I flag):

$ grep -rq admin  /work/pxb/ins/8.0/xtrabackup-test/test/results/debug/redact_password.k1aVtt/w5/var1/downloaded_full/mysql.ibd  $ echo $? 0 versus  $ grep -rqI admin  /work/pxb/ins/8.0/xtrabackup-test/test/results/debug/redact_password.k1aVtt/w5/var1/downloaded_full/mysql.ibd   $ echo $? 1

Environment

None

Activity

Show:

Aaditya Dubey February 10, 2023 at 8:16 AM

Hi ,

Thank you for the report.

Details

Assignee

Reporter

Labels

Needs QA

Yes

Priority

Smart Checklist

Created February 7, 2023 at 3:38 PM
Updated June 7, 2024 at 2:23 PM

Flag notifications