Message ID | 20211007002641.714906-4-catherine.hoang@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Dump log cleanups | expand |
On Thu, Oct 07, 2021 at 12:26:40AM +0000, Catherine Hoang wrote: > Move _scratch_remount_dump_log and _test_remount_dump_log from > common/inject to common/log. These routines do not inject errors and > should be placed with other common log functions. Doesn't this mean that all those tests that got changed in the first patch will also need an update to source common/log? OH, right, common/inject sources common/log. Problem solved. Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > > Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> > Reviewed-by: Allison Henderson <allison.henderson@oracle.com> > --- > common/inject | 26 -------------------------- > common/log | 26 ++++++++++++++++++++++++++ > 2 files changed, 26 insertions(+), 26 deletions(-) > > diff --git a/common/inject b/common/inject > index b5334d4a..6b590804 100644 > --- a/common/inject > +++ b/common/inject > @@ -111,29 +111,3 @@ _scratch_inject_error() > _fail "Cannot inject error ${type} value ${value}." > fi > } > - > -# Unmount and remount the scratch device, dumping the log > -_scratch_remount_dump_log() > -{ > - local opts="$1" > - > - if test -n "$opts"; then > - opts="-o $opts" > - fi > - _scratch_unmount > - _scratch_dump_log > - _scratch_mount "$opts" > -} > - > -# Unmount and remount the test device, dumping the log > -_test_remount_dump_log() > -{ > - local opts="$1" > - > - if test -n "$opts"; then > - opts="-o $opts" > - fi > - _test_unmount > - _test_dump_log > - _test_mount "$opts" > -} > diff --git a/common/log b/common/log > index c7921f50..0a9aaa7f 100644 > --- a/common/log > +++ b/common/log > @@ -608,5 +608,31 @@ _get_log_configs() > esac > } > > +# Unmount and remount the scratch device, dumping the log > +_scratch_remount_dump_log() > +{ > + local opts="$1" > + > + if test -n "$opts"; then > + opts="-o $opts" > + fi > + _scratch_unmount > + _scratch_dump_log > + _scratch_mount "$opts" > +} > + > +# Unmount and remount the test device, dumping the log > +_test_remount_dump_log() > +{ > + local opts="$1" > + > + if test -n "$opts"; then > + opts="-o $opts" > + fi > + _test_unmount > + _test_dump_log > + _test_mount "$opts" > +} > + > # make sure this script returns success > /bin/true > -- > 2.25.1 >
diff --git a/common/inject b/common/inject index b5334d4a..6b590804 100644 --- a/common/inject +++ b/common/inject @@ -111,29 +111,3 @@ _scratch_inject_error() _fail "Cannot inject error ${type} value ${value}." fi } - -# Unmount and remount the scratch device, dumping the log -_scratch_remount_dump_log() -{ - local opts="$1" - - if test -n "$opts"; then - opts="-o $opts" - fi - _scratch_unmount - _scratch_dump_log - _scratch_mount "$opts" -} - -# Unmount and remount the test device, dumping the log -_test_remount_dump_log() -{ - local opts="$1" - - if test -n "$opts"; then - opts="-o $opts" - fi - _test_unmount - _test_dump_log - _test_mount "$opts" -} diff --git a/common/log b/common/log index c7921f50..0a9aaa7f 100644 --- a/common/log +++ b/common/log @@ -608,5 +608,31 @@ _get_log_configs() esac } +# Unmount and remount the scratch device, dumping the log +_scratch_remount_dump_log() +{ + local opts="$1" + + if test -n "$opts"; then + opts="-o $opts" + fi + _scratch_unmount + _scratch_dump_log + _scratch_mount "$opts" +} + +# Unmount and remount the test device, dumping the log +_test_remount_dump_log() +{ + local opts="$1" + + if test -n "$opts"; then + opts="-o $opts" + fi + _test_unmount + _test_dump_log + _test_mount "$opts" +} + # make sure this script returns success /bin/true