[MDEV-12249] MariaRocks: find a way to handle paths to scripts/includes in MTR Created: 2017-03-13  Updated: 2017-04-03  Resolved: 2017-04-03

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - RocksDB
Fix Version/s: N/A

Type: Task Priority: Critical
Reporter: Sergei Petrunia Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-9658 Make MyRocks in MariaDB stable Closed

 Description   

MyRocks tests have and use (with shell or perl) extra files. Examples:

rocksdb/t/compact_deletes_test.inc has

let $MYSQL_SST_DUMP=../storage/rocksdb/sst_dump;
exec bash ../storage/rocksdb/mysql-test/rocksdb/t/sst_count_rows.sh $MYSQLTEST_VARDIR $MYSQL_SST_DUMP $no_more_deletes ;

Or storage/rocksdb/mysql-test/rocksdb/t/bloomfilter.inc has this piece

let tmpl_ddl= ../storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_table_def.tmpl;
let ddl= $MYSQL_TMP_DIR/bloomfilter_create.sql;
...
--exec sed s/##CF##//g $tmpl_ddl > $ddl
--source $ddl

Specifying relative paths works for the case when one runs tests from the source tree.

However, the relative paths are different when one runs tests from the installed server (made with e.g. 'make install' or installing packages).

This causes failures like this:
http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-trusty-x86/builds/421/steps/test/logs/stdio

rocksdb_default_cf_options=write_buffer_size=16k;target_file_size_base=16k;level0_slowdown_writes_trigger=-1;level0_stop_writes_trigger=1000;compression_per_level=kNoCompression;'
rocksdb.compact_deletes                  w1 [ fail ]
        Test ended at 2017-03-13 08:23:44
CURRENT_TEST: rocksdb.compact_deletes
bash: ../storage/rocksdb/mysql-test/rocksdb/t/sst_count_rows.sh: No such file or directory
mysqltest: In included file "/usr/local/mariadb-10.2.5-linux-i686/mysql-test/plugin/rocksdb/rocksdb/t/compact_deletes_test.inc": 
included from /usr/local/mariadb-10.2.5-linux-i686/mysql-test/plugin/rocksdb/rocksdb/t/compact_deletes.test at line 43:
At line 41: exec of 'bash ../storage/rocksdb/mysql-test/rocksdb/t/sst_count_rows.sh /usr/local/mariadb-10.2.5-linux-i686/mysql-test/var/1 ../storage/rocksdb/sst_dump 0 ' failed, error: 32512, status: 127, errno: 0
Output from before failure:
sleep(1)
0
The result from queries just before the failure was:
< snip >
index id1_type (id1, type, value2, value, id2)
) engine=rocksdb collate latin1_bin;
select 'loading data';
loading data
loading data
set global rocksdb_force_flush_memtable_now=1;



 Comments   
Comment by Sergei Petrunia [ 2017-03-13 ]

Discussed solutions:

  • psergey attempted to use get the dirname of $MYSQLTEST_FILE MTR variable
  • elenst noted there is also $MTR_SUITE_DIR
  • Use of bash was noted as bad for Windows? (because it doesn't work there?)
Comment by Sergei Petrunia [ 2017-03-13 ]

Note: The bloomfilter_table_def.tmpl case can be handled by switching it to using .inc file approach like other tests do:

let $param= ...
source bloomfilter_table_def.tmpl

The source command searches for file in the testsuite dir also so the problem goes away.

Comment by Sergei Petrunia [ 2017-03-13 ]

Other cases: http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-trusty-amd64/builds/423/steps/test/logs/stdio

rocksdb.drop_table                       w3 [ fail ]
        Test ended at 2017-03-13 08:26:48
 
CURRENT_TEST: rocksdb.drop_table
Can't open perl script "../storage/rocksdb/mysql-test/rocksdb/t/drop_table_compactions.pl": No such file or directory
mysqltest: At line 114: exec of 'perl ../storage/rocksdb/mysql-test/rocksdb/t/drop_table_compactions.pl /usr/local/mariadb-10.2.5-linux-x86_64/mysql-test/var/3/log/mysqld.1.err' failed, error: 512, status: 2, errno: 0

...

        Test ended at 2017-03-13 08:26:51
 
CURRENT_TEST: rocksdb.optimize_table
Can't open perl script "../storage/rocksdb/mysql-test/rocksdb/optimize_table_check_sst.pl": No such file or directory
mysqltest: In included file "/usr/local/mariadb-10.2.5-linux-x86_64/mysql-test/plugin/rocksdb/rocksdb/t/optimize_table.inc": 
included from /usr/local/mariadb-10.2.5-linux-x86_64/mysql-test/plugin/rocksdb/rocksdb/t/optimize_table.test at line 8:
At line 67: exec of 'perl ../storage/rocksdb/mysql-test/rocksdb/optimize_table_check_sst.pl /usr/local/mariadb-10.2.5-linux-x86_64/mysql-test/var/tmp/2/sst_size.dat' failed, error: 512, status: 2, errno: 95

I think, there are more. I dont have a complete list handy

Comment by Sergei Golubchik [ 2017-03-20 ]

I've fixed all that already

Generated at Thu Feb 08 07:56:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.