On Fri, Nov 15, 2024 at 3:22 PM Anand Jain <anand.jain@xxxxxxxxxx> wrote: > > Reload the module before each test, instead of later in run_section. Why? The change log should give a justification for the change. It's just stating what the code changes are doing but without any reasoning. Thanks. > > Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> > --- > check | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/check b/check > index 9222cd7e4f81..d8ee73f48c77 100755 > --- a/check > +++ b/check > @@ -935,6 +935,15 @@ function run_section() > continue > fi > > + # Reload the module after each test to check for leaks or > + # other problems. > + if [ -n "${TEST_FS_MODULE_RELOAD}" ]; then > + _test_unmount 2> /dev/null > + _scratch_unmount 2> /dev/null > + modprobe -r fs-$FSTYP > + modprobe fs-$FSTYP > + fi > + > # record that we really tried to run this test. > if ((!${#loop_status[*]})); then > try+=("$seqnum") > @@ -1033,15 +1042,6 @@ function run_section() > done > fi > > - # Reload the module after each test to check for leaks or > - # other problems. > - if [ -n "${TEST_FS_MODULE_RELOAD}" ]; then > - _test_unmount 2> /dev/null > - _scratch_unmount 2> /dev/null > - modprobe -r fs-$FSTYP > - modprobe fs-$FSTYP > - fi > - > # Scan for memory leaks after every test so that associating > # a leak to a particular test will be as accurate as possible. > _check_kmemleak || tc_status="fail" > -- > 2.46.1 > >