1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-9038 Binlog encryption tests

- created binlog_encryption test suite and added it to the default list
- moved some tests from rpl, binlog and multisource suites to extra
  so that they could be re-used in different suites
- made minor changes in include files
This commit is contained in:
Elena Stepanova
2016-12-05 20:19:01 +02:00
parent 9199d72759
commit 611f91605a
190 changed files with 18153 additions and 8379 deletions

View File

@ -60,25 +60,30 @@
perl;
use strict;
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
die "SEARCH_FILE not set" unless $ENV{'SEARCH_FILE'};
my @search_files= glob($ENV{'SEARCH_FILE'});
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
my $search_range= $ENV{'SEARCH_RANGE'};
my $file_content;
my $content;
$search_range= 50000 unless $search_range =~ /-?[0-9]+/;
open(FILE, '<', $search_file) or die("Unable to open '$search_file': $!\n");
if ($search_range >= 0) {
read(FILE, $file_content, $search_range, 0);
} else {
my $size= -s $search_file;
$search_range = -$size if $size > -$search_range;
seek(FILE, $search_range, 2);
read(FILE, $file_content, -$search_range, 0);
foreach my $search_file (@search_files) {
open(FILE, '<', $search_file) or die("Unable to open '$search_file': $!\n");
my $file_content;
if ($search_range >= 0) {
read(FILE, $file_content, $search_range, 0);
} else {
my $size= -s $search_file;
$search_range = -$size if $size > -$search_range;
seek(FILE, $search_range, 2);
read(FILE, $file_content, -$search_range, 0);
}
close(FILE);
$content.= $file_content;
}
close(FILE);
$search_file =~ s{^.*?([^/\\]+)$}{$1};
if ($file_content =~ m{$search_pattern}) {
print "FOUND /$search_pattern/ in $search_file\n"
$ENV{'SEARCH_FILE'} =~ s{^.*?([^/\\]+)$}{$1};
if ($content =~ m{$search_pattern}) {
print "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
} else {
print "NOT FOUND /$search_pattern/ in $search_file\n"
print "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
}
EOF