The bug766033.sh test is not portable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Low
|
Alexey Kopytov | ||
2.0 |
Fix Released
|
Low
|
Alexey Kopytov | ||
2.1 |
Fix Released
|
Low
|
Alexey Kopytov |
Bug Description
The bug766039.sh test introduced with https:/
- the values for 'count' and 'seek' are in 512-byte units. So we actually write 8 MB of zeroes starting with the 512 KB offset. Is that intentional?
- On *BSD and OSX "wc" has a different output format (the number is prepended with a tab character). But the next check compares "$COUNT" and "1" as strings rather than numbers. So that expression is always false. Besides, we don't really need the count of matched lines, all we need is the grep exit code (i.e. if there was at least one matching line).
So this:
> set +e
> COUNT=`xtrabackup --backup --datadir=
> | grep "File ./sakila/rental.ibd seems to be corrupted" | wc -l `
> set -e
>
> if [ "$COUNT" != "1" ] ; then
> vlog "test failed"
> exit 1
> fi
is equivalent to the following 2 lines that are also more portable:
> run_cmd_
> --target-
> grep -q "File ./sakila/rental.ibd seems to be corrupted" $OUTFILE
Related branches
- Stewart Smith (community): Approve
-
Diff: 2429 lines (+546/-600)61 files modifiedinnobackupex (+9/-23)
test/disabled/ib_include.sh (+0/-46)
test/disabled/tar_compressed.sh (+0/-110)
test/disabled/xb_lru_dump.sh (+0/-20)
test/experimental/bug408803.sh (+3/-4)
test/experimental/xb_race_drop.sh (+26/-2)
test/inc/common.sh (+262/-132)
test/inc/ib_stream_common.sh (+4/-4)
test/run.sh (+31/-40)
test/t/bug1002688.sh (+3/-4)
test/t/bug483827.sh (+6/-9)
test/t/bug489290.sh (+1/-2)
test/t/bug514068.sh (+2/-3)
test/t/bug606981.sh (+4/-4)
test/t/bug722638.sh (+6/-7)
test/t/bug723097.sh (+3/-4)
test/t/bug723318.sh (+4/-3)
test/t/bug729843.sh (+1/-2)
test/t/bug733651.sh (+1/-3)
test/t/bug759225.sh (+3/-4)
test/t/bug759701.sh (+3/-4)
test/t/bug766033.sh (+8/-13)
test/t/bug766607.sh (+5/-6)
test/t/bug810269.sh (+3/-5)
test/t/bug817132.sh (+3/-4)
test/t/bug884737.sh (+1/-2)
test/t/bug891496.sh (+4/-7)
test/t/bug972169.sh (+1/-3)
test/t/bug977101.sh (+31/-0)
test/t/bug983685.sh (+1/-3)
test/t/bug983720_galerainfo.sh (+1/-2)
test/t/bug983720_lrudump.sh (+1/-2)
test/t/bug989397.sh (+1/-2)
test/t/bug996493.sh (+2/-4)
test/t/bug999750.sh (+1/-3)
test/t/ib_binlog_info.sh (+1/-2)
test/t/ib_csm_csv.sh (+3/-4)
test/t/ib_empty_dir.sh (+2/-3)
test/t/ib_incremental.sh (+3/-4)
test/t/ib_lru_dump_basic.sh (+1/-2)
test/t/ib_lru_dump_rsync.sh (+1/-2)
test/t/ib_lru_dump_stream.sh (+1/-2)
test/t/ib_rsync.sh (+3/-4)
test/t/ib_slave_info.sh (+18/-7)
test/t/ib_specialchar.sh (+4/-4)
test/t/ib_stream_incremental.sh (+3/-4)
test/t/tar4ibd_symlink.sh (+19/-15)
test/t/xb_basic.sh (+5/-5)
test/t/xb_defaults_file.sh (+1/-2)
test/t/xb_export.sh (+14/-17)
test/t/xb_galera_info.sh (+2/-3)
test/t/xb_incremental.sh (+4/-4)
test/t/xb_incremental_compressed.sh (+5/-6)
test/t/xb_log_overwrap.sh (+2/-2)
test/t/xb_parallel.sh (+4/-4)
test/t/xb_parallel_incremental.sh (+4/-4)
test/t/xb_part_range.sh (+3/-4)
test/t/xb_partial.sh (+4/-4)
test/t/xb_perm_basic.sh (+1/-2)
test/t/xb_perm_stream.sh (+1/-2)
test/t/xb_stats.sh (+2/-2)
- Stewart Smith (community): Approve
-
Diff: 2429 lines (+546/-594)62 files modifiedinnobackupex (+9/-23)
src/common.h (+1/-1)
test/disabled/ib_include.sh (+0/-46)
test/disabled/tar_compressed.sh (+0/-110)
test/disabled/xb_lru_dump.sh (+0/-20)
test/experimental/bug408803.sh (+3/-4)
test/experimental/xb_race_drop.sh (+26/-2)
test/inc/common.sh (+262/-132)
test/inc/ib_stream_common.sh (+4/-4)
test/run.sh (+31/-40)
test/t/bug1002688.sh (+3/-4)
test/t/bug483827.sh (+6/-9)
test/t/bug489290.sh (+1/-2)
test/t/bug514068.sh (+2/-3)
test/t/bug606981.sh (+4/-4)
test/t/bug722638.sh (+6/-7)
test/t/bug723097.sh (+3/-4)
test/t/bug723318.sh (+4/-3)
test/t/bug729843.sh (+1/-2)
test/t/bug733651.sh (+1/-3)
test/t/bug759225.sh (+3/-4)
test/t/bug759701.sh (+3/-4)
test/t/bug766033.sh (+7/-6)
test/t/bug766607.sh (+5/-6)
test/t/bug810269.sh (+3/-5)
test/t/bug817132.sh (+3/-4)
test/t/bug884737.sh (+1/-2)
test/t/bug891496.sh (+4/-7)
test/t/bug972169.sh (+1/-3)
test/t/bug977101.sh (+31/-0)
test/t/bug983685.sh (+1/-3)
test/t/bug983720_galerainfo.sh (+1/-2)
test/t/bug983720_lrudump.sh (+1/-2)
test/t/bug989397.sh (+1/-2)
test/t/bug996493.sh (+2/-4)
test/t/bug999750.sh (+1/-3)
test/t/ib_binlog_info.sh (+1/-2)
test/t/ib_csm_csv.sh (+3/-4)
test/t/ib_empty_dir.sh (+2/-3)
test/t/ib_incremental.sh (+3/-4)
test/t/ib_lru_dump_basic.sh (+1/-2)
test/t/ib_lru_dump_rsync.sh (+1/-2)
test/t/ib_lru_dump_stream.sh (+1/-2)
test/t/ib_rsync.sh (+3/-4)
test/t/ib_slave_info.sh (+18/-7)
test/t/ib_specialchar.sh (+4/-4)
test/t/ib_stream_incremental.sh (+3/-4)
test/t/tar4ibd_symlink.sh (+19/-15)
test/t/xb_basic.sh (+5/-5)
test/t/xb_defaults_file.sh (+1/-2)
test/t/xb_export.sh (+14/-17)
test/t/xb_galera_info.sh (+2/-3)
test/t/xb_incremental.sh (+4/-4)
test/t/xb_incremental_compressed.sh (+5/-6)
test/t/xb_log_overwrap.sh (+2/-2)
test/t/xb_parallel.sh (+4/-4)
test/t/xb_parallel_incremental.sh (+4/-4)
test/t/xb_part_range.sh (+3/-4)
test/t/xb_partial.sh (+4/-4)
test/t/xb_perm_basic.sh (+1/-2)
test/t/xb_perm_stream.sh (+1/-2)
test/t/xb_stats.sh (+2/-2)
summary: |
- The bug766039.sh test is not portable + The bug766033.sh test is not portable |
Reassigning to myself as this bug blocks my testing of replication support in the test suite.