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

tests: register traps in a correct order

Details

    • 3
    • 9223372036854775807

    Description

      trap is used in many tests to set actions to perform on cleanup.

      IMHO, trap should be registered in this order:

      cleanup_test_XX()
      {
          undo_something
      }
      
      test_XX()
      {
          trap cleanup_test_XX EXIT
          do_something
          ...
      }
      

      Currently many tests do not respect this template.
      Among those, some:

      • register the trap after do_something();
      • explicitly call cleanup_test_XX() at the end of the test;
      • call trap 0 at the start of cleanup_test_XX() (this one may be controversial, I believe the test harness should provide, and probably already provides, trap isolation between tests).

      Attachments

        Issue Links

          Activity

            [LU-9474] tests: register traps in a correct order

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34158/
            Subject: LU-9474 tests: fix quoting in stack_trap
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: 4c33ed79380017abfb9a1e34b99bc957257f4d55

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34158/ Subject: LU-9474 tests: fix quoting in stack_trap Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: 4c33ed79380017abfb9a1e34b99bc957257f4d55

            Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34158
            Subject: LU-9474 tests: fix quoting in stack_trap
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set: 1
            Commit: d7f6102a1ee47ba01f202c66a80d5a3f213501f5

            gerrit Gerrit Updater added a comment - Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34158 Subject: LU-9474 tests: fix quoting in stack_trap Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: d7f6102a1ee47ba01f202c66a80d5a3f213501f5
            pjones Peter Jones added a comment -

            Looks like this work has all landed now

            pjones Peter Jones added a comment - Looks like this work has all landed now

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/30098/
            Subject: LU-9474 tests: replace import_file with copytool import
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 61089d59a672e0e3760e52cc1e6fc7f10caaf00e

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/30098/ Subject: LU-9474 tests: replace import_file with copytool import Project: fs/lustre-release Branch: master Current Patch Set: Commit: 61089d59a672e0e3760e52cc1e6fc7f10caaf00e

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31429/
            Subject: LU-9474 tests: remove unneeded hsm_set_param for raolu tests
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 804739be1f3bdd28e47d2e71b8ca78923549db25

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31429/ Subject: LU-9474 tests: remove unneeded hsm_set_param for raolu tests Project: fs/lustre-release Branch: master Current Patch Set: Commit: 804739be1f3bdd28e47d2e71b8ca78923549db25

            Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/31429
            Subject: LU-9474 tests: remove unneeded hsm_set_param for raolu tests
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 93e92575b03e1982e52734369b9cde3cb92dd786

            gerrit Gerrit Updater added a comment - Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/31429 Subject: LU-9474 tests: remove unneeded hsm_set_param for raolu tests Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 93e92575b03e1982e52734369b9cde3cb92dd786

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30490/
            Subject: LU-9474 tests: fix quoting in stack_trap
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 99420a1830b89a8aba6350b095065d65107f7c0f

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30490/ Subject: LU-9474 tests: fix quoting in stack_trap Project: fs/lustre-release Branch: master Current Patch Set: Commit: 99420a1830b89a8aba6350b095065d65107f7c0f

            John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/30371/
            Subject: LU-9474 tests: add the stack_trap() utility function
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set:
            Commit: eb9c7a25c8d62e549d1c41df0bf047bc2b1d63b4

            gerrit Gerrit Updater added a comment - John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/30371/ Subject: LU-9474 tests: add the stack_trap() utility function Project: fs/lustre-release Branch: b2_10 Current Patch Set: Commit: eb9c7a25c8d62e549d1c41df0bf047bc2b1d63b4

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30097/
            Subject: LU-9474 tests: rewrite copytool_setup to use stack_trap
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 2042bcea662847c12cacdecd598b0a0d5fa4d805

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30097/ Subject: LU-9474 tests: rewrite copytool_setup to use stack_trap Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2042bcea662847c12cacdecd598b0a0d5fa4d805

            Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/30490
            Subject: LU-9474 tests: fix quoting in stack_trap
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 8e086c102cbaabf3cf2be6645a2891064f057e13

            gerrit Gerrit Updater added a comment - Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: https://review.whamcloud.com/30490 Subject: LU-9474 tests: fix quoting in stack_trap Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 8e086c102cbaabf3cf2be6645a2891064f057e13

            People

              standan Saurabh Tandan (Inactive)
              cealustre CEA
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: