Bug #80493 explain_json_validate.test fails on windows pre-push testing
Submitted: 24 Feb 2016 12:33 Modified: 5 Aug 2016 12:19
Reporter: Georgi Kodinov Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: JSON Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[24 Feb 2016 12:33] Georgi Kodinov
The test depends on python, which is not available on windows by default. 
And it fails with the below error on pre-push test platform

18:14:29  MySQL Version 5.7.12) 
the test fails as follows: 
18:55:07  i_main.explain_json_validate             w5 [ fail ]
18:55:07          Test ended at 2016-02-23 18:55:08
18:55:07  CURRENT_TEST: i_main.explain_json_validate
18:55:07  Traceback (most recent call last):
18:55:07    File "X:/gkodinov-20160223171017-mysql-5.7.bundle.workdir/mysql-5.7/mysql-test/suite/opt_trace/validate_json.py", line 114, in <module>
18:55:07      handle_one_file(f)
18:55:07    File "X:/gkodinov-20160223171017-mysql-5.7.bundle.workdir/mysql-5.7/mysql-test/suite/opt_trace/validate_json.py", line 91, in handle_one_file
18:55:07      all = open(name).readlines()
18:55:07  IOError: [Errno 22] invalid mode ('r') or filename: 'X:/gkodinov-20160223171017-mysql-5.7.bundle.workdir/mysql-5.7/mysql-test/r/*explain_json*.result'
18:55:07  mysqltest: At line 30: command "python $MYSQL_TEST_DIR/suite/opt_trace/validate_json.py -q $MYSQL_TEST_DIR/r/*explain_json*.result" failed
18:55:07  Output from before failure:
18:55:07  Validation: mysql-test/r/*explain_json*.result
18:55:07  exec of 'python X:/gkodinov-20160223171017-mysql-5.7.bundle.workdir/mysql-5.7/mysql-test/suite/opt_trace/validate_json.py -q X:/gkodinov-20160223171017-mysql-5.7.bundle.workdir/mysql-5.7/mysql-test/r/*explain_json*.result' failed, error: 1, status: 1, errno: 0
18:55:07   - the logfile can be found in 'R:/ade/var1/log/i_main.explain_json_validate/explain_json_validate.log'

How to repeat:
Run mysql-test-run.pl  --parallel=8 --force --max-test-fail=0 --retry=1 --retry-failure=1 --experimental=./collections/default.experimental --mysqld=--binlog-format=mixed --vardir=R:/ade/var1

Suggested fix:
* Don't depend on python (feature request)
* Make sure the test runs robustly on windows
* Suggest a sanctioned python version and provide a way to install it without breaking apps that have it bundled (e.g. git).
[5 Aug 2016 12:19] Paul DuBois
Posted by developer:
Fixed in 5.6.33.

Work was done for test suite. No changelog entry needed.