Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12249

MariaRocks: find a way to handle paths to scripts/includes in MTR

Details

    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;
      

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia added a comment - - edited

            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?)
            psergei Sergei Petrunia added a comment - - edited 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?)
            psergei Sergei Petrunia added a comment - - edited

            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.

            psergei Sergei Petrunia added a comment - - edited 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.

            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

            psergei Sergei Petrunia added a comment - 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

            I've fixed all that already

            serg Sergei Golubchik added a comment - I've fixed all that already

            People

              serg Sergei Golubchik
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.