Merge lp:~percona-toolkit-dev/percona-toolkit/fix-937793 into lp:percona-toolkit/2.0
Proposed by
Brian Fraser
Status: | Rejected |
---|---|
Rejected by: | Daniel Nichter |
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/fix-937793 |
Merge into: | lp:percona-toolkit/2.0 |
Diff against target: |
267 lines (+165/-25) 4 files modified
bin/pt-mysql-summary (+46/-24) lib/bash/report_formatting.sh (+54/-0) t/lib/bash/report_formatting.sh (+64/-0) t/pt-mysql-summary/format_innodb_status.sh (+1/-1) |
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/fix-937793 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Disapprove | ||
Review via email: mp+96357@code.launchpad.net |
Description of the change
One somewhat weird thing you might notie is using . instead of source in the test file.
Apparently source is a bashism? It didn't work at all in my NetBSD box.
Besides that, I think it has everything in there.
To post a comment you must log in.
Unmerged revisions
- 199. By Brian Fraser <email address hidden>
-
Fixes as per Daniel's review.
The previous commit made the change to shorten() opt-in, but never
changed the code in pt-mysql-summary to actually enable the new
behavior. - 198. By Brian Fraser <email address hidden>
-
Backported fix for https:/
/bugs.launchpad .net/percona- toolkit/ +bug/937793 This commit adds a report_formatting bash lib. Currently it only has
one function, shorten(), but in future versions of the toolkit it
will contain shared functions between pt-summary and pt-mysql-summary.
There are three problems. First and foremost, it doesn't fix the bug:
Log File Size | 2 * 1,46G = 2,9G
Did you test it manually with innodb_ log_file_ size=1500M?
Second, please name tests, e.g. (last arg):
is \
"$(shorten 10485760 1)" \
"10.0M" \
"10485760 = 10.0M"
The Bash test stuff currently allows you not to name tests, but I should really remove that "feature".
Fourth, echo "$num $prec $div" | awk ... is a useless use of echo; see awk -v var=val.
Finally, I haven't documented this yet, but use:
report_ formatting. t@ -> ../../. ./util/ test-bash- functions
I.e. just symlink <bash test>.t in t/lib/bash/ to ../../. ./util/ test-bash- functions and this script will do the proper magic so perl <bash test>.t runs <bash test>.sh.