oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
608 stars 138 forks source link

Problem: selftests spew "Variable will not stay shared" #445

Closed jimklimov closed 4 years ago

jimklimov commented 4 years ago

Solution: change file-scoped private functions and methods from "my" to "our"

Signed-off-by: Jim Klimov jimklimov@gmail.com

Note for reviewers: I am really not sure if this scoping keywork change would have any adverse effects. A quick local run of self-tests does not seem to expose any issues, let's see what Travis would say.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.3%) to 88.254% when pulling c3f57fc09f2eff9bc323d5a977682aa57f9ffd32 on jimklimov:unshared-vars into 2d738c8a9d5b977955ec9eafba4bd70702fe5ee1 on oetiker:master.

jimklimov commented 4 years ago

Note: Coverage changed (grew) because some single-line monsters were reformatted to multiple lines :)

oetiker commented 4 years ago

nice

jimklimov commented 4 years ago

FWIW, the reduced coverage is due to added optional writing of rewritten perl code to help trace the process. Tested locally that

DEBUG_ZNAPZEND_SELFTEST_REWRITE=yes ./t/znapzend.t 

works to create these temporary outputs (properly git-ignored), and that without the envvar these code dumps do not appear in the filesystem.

Thanks for the hints and a new trick learned ;)