Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-11607

Reduce repeated function calls in Lustre test suites

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.14.0
    • Lustre 2.12.0
    • 9223372036854775807

    Description

      There are many repeated calls to the same function with the same input in each of the Lustre test suites. One example of this is the call to
      “$(lustre_version_code $SINGLEMDS)”. All test suites combined call “$(lustre_version_code $SINGLEMDS)” 269 times; sanity.sh 135 times, conf-sanity 27 times, sanityn 16 times, etc. There are 44 calls to “$(lustre_version_code ost1)” and 28 calls to “$(lustre_version_code mgs)”. There are 113 calls to "facet_fstype $SINGLEMDS" with 34 in conf-sanity alone.

      Let's get the environment variables that are stable during each test suite in a routine, call it at the beginning of each test suite and export it for the test suites to use. The routine must be called after we source the configuration file

      . $LUSTRE/tests/test-framework.sh
      init_test_env $@
      . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
      

      since SINGLEMDS and other variables are defined in the configuration file.

      The patch for LU-11564, https://review.whamcloud.com/#/c/33463, started this move by calling lustre_version_code() at the beginning of the test suite and using the value for each test that needs it.

      Please list any other test suite routine calls that can be reduced in this way.

      Attachments

        Issue Links

          Activity

            [LU-11607] Reduce repeated function calls in Lustre test suites
            pjones Peter Jones added a comment -

            Looks like everything has landed for 2.14

            pjones Peter Jones added a comment - Looks like everything has landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35929/
            Subject: LU-11607 tests: replace lustre_version/fstype in sanity-scrub
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: e4799a53832bd1278b766ed2e0a261281b10f28c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35929/ Subject: LU-11607 tests: replace lustre_version/fstype in sanity-scrub Project: fs/lustre-release Branch: master Current Patch Set: Commit: e4799a53832bd1278b766ed2e0a261281b10f28c

            James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40313
            Subject: LU-11607 tests: Reproducer sanity
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: ca7547335efff5b72d235904cd128ed05fde9bfc

            gerrit Gerrit Updater added a comment - James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40313 Subject: LU-11607 tests: Reproducer sanity Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ca7547335efff5b72d235904cd128ed05fde9bfc

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36942/
            Subject: LU-11607 tests: replace version/fstype calls in conf-sanity
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set:
            Commit: 70a42ae7880e137267dcb0dc00b4a38fbae0fe37

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36942/ Subject: LU-11607 tests: replace version/fstype calls in conf-sanity Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 70a42ae7880e137267dcb0dc00b4a38fbae0fe37

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35719/
            Subject: LU-11607 tests: replace version/fstype calls in sanity/n
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 6ee31faf3970d47a79f538712382073b3833a06c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35719/ Subject: LU-11607 tests: replace version/fstype calls in sanity/n Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6ee31faf3970d47a79f538712382073b3833a06c

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36965/
            Subject: LU-11607 tests: remove duplicate code lnet-selftest
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: cbdceec741f5fb782b6a7f86d30daed9f5ed562a

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36965/ Subject: LU-11607 tests: remove duplicate code lnet-selftest Project: fs/lustre-release Branch: master Current Patch Set: Commit: cbdceec741f5fb782b6a7f86d30daed9f5ed562a

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36375/
            Subject: LU-11607 tests: replace lustre_version/fstype - full
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 782b3533edb419374b7357b67ba4f9960d7e96cf

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36375/ Subject: LU-11607 tests: replace lustre_version/fstype - full Project: fs/lustre-release Branch: master Current Patch Set: Commit: 782b3533edb419374b7357b67ba4f9960d7e96cf

            James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36965
            Subject: LU-11607 tests: remove duplicate code lnet-selftest
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: b2e63c0e881d4e4370d717d3cbbc3294cc809575

            gerrit Gerrit Updater added a comment - James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36965 Subject: LU-11607 tests: remove duplicate code lnet-selftest Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: b2e63c0e881d4e4370d717d3cbbc3294cc809575

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36942
            Subject: LU-11607 tests: replace version/fstype calls in conf-sanity
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 240bc8adf88a46880c37e09987edb01d043e22c5

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36942 Subject: LU-11607 tests: replace version/fstype calls in conf-sanity Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 240bc8adf88a46880c37e09987edb01d043e22c5

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35928/
            Subject: LU-11607 tests: replace lustre_version in mds-survey/pcc/sec
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 3643e27f7a97dac195a102db4cf7f895e019159c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35928/ Subject: LU-11607 tests: replace lustre_version in mds-survey/pcc/sec Project: fs/lustre-release Branch: master Current Patch Set: Commit: 3643e27f7a97dac195a102db4cf7f895e019159c

            People

              jamesanunez James Nunez (Inactive)
              jamesanunez James Nunez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: