Merge lp:~longbow/percona-xtrabackup/bug664986 into lp:percona-xtrabackup/2.0

Proposed by Valentine Gostev
Status: Rejected
Rejected by: Alexey Kopytov
Proposed branch: lp:~longbow/percona-xtrabackup/bug664986
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 59 lines (+50/-0)
2 files modified
test/t/ib_permissions.sh (+25/-0)
test/t/xb_permissions.sh (+25/-0)
To merge this branch: bzr merge lp:~longbow/percona-xtrabackup/bug664986
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Needs Resubmitting
Review via email: mp+80741@code.launchpad.net

Description of the change

ib_permissions and xb_permissions tests expect XtraBackup to fail when it meets dir it cannot read.

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Should be resubmitted along with the bugfix.

review: Needs Resubmitting

Unmerged revisions

318. By Valentine Gostev

Added tests for bug 664986.
Test expects xtrabackup and innobackupex to fail when dir without rx
permissions is met

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'test/t/ib_permissions.sh'
2--- test/t/ib_permissions.sh 1970-01-01 00:00:00 +0000
3+++ test/t/ib_permissions.sh 2011-10-29 20:01:27 +0000
4@@ -0,0 +1,25 @@
5+. inc/common.sh
6+
7+init
8+run_mysqld
9+
10+run_cmd ${MYSQL} ${MYSQL_ARGS} -e "CREATE DATABASE TEST"
11+run_cmd ${MYSQL} ${MYSQL_ARGS} -e "CREATE TABLE t1 (a INT) ENGINE=InnoDB" test
12+
13+chmod -rx $mysql_datadir/test
14+ls -lah $mysql_datadir
15+set +e
16+innobackupex --no-timestamp $topdir/backup
17+backup_result=$?
18+set -e
19+chmod +rx $mysql_datadir/test
20+if [ $backup_result -ne 0 ]
21+then
22+ stop_mysqld
23+ vlog "innobackupex fails when meets dir without read/execute permissions"
24+ exit 0
25+else
26+ stop_mysqld
27+ vlog "innobackupex does not fail when meets dir without read/execute permissions"
28+ exit 1
29+fi
30
31=== added file 'test/t/xb_permissions.sh'
32--- test/t/xb_permissions.sh 1970-01-01 00:00:00 +0000
33+++ test/t/xb_permissions.sh 2011-10-29 20:01:27 +0000
34@@ -0,0 +1,25 @@
35+. inc/common.sh
36+
37+init
38+run_mysqld
39+
40+run_cmd ${MYSQL} ${MYSQL_ARGS} -e "CREATE DATABASE TEST"
41+run_cmd ${MYSQL} ${MYSQL_ARGS} -e "CREATE TABLE t1 (a INT) ENGINE=InnoDB" test
42+
43+chmod -rx $mysql_datadir/test
44+ls -lah $mysql_datadir
45+set +e
46+xtrabackup --datadir=$mysql_datadir --backup --target-dir=$topdir/backup
47+backup_result=$?
48+set -e
49+chmod +rx $mysql_datadir/test
50+if [ $backup_result -ne 0 ]
51+then
52+ stop_mysqld
53+ vlog "xtrabackup binary fails when meets dir without read/execute permissions"
54+ exit 0
55+else
56+ stop_mysqld
57+ vlog "xtrabackup binary does not fail when meets dir without read/execute permissions"
58+ exit 1
59+fi

Subscribers

People subscribed via source and target branches