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

Reduce repeated function calls in Lustre test suites


    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Lustre 2.12.0
    • Fix Version/s: None
    • Labels:
    • Rank (Obsolete):


      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.


          Issue Links



              • Assignee:
                jamesanunez James Nunez
                jamesanunez James Nunez
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: