<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:26:31 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-9474] tests: register traps in a correct order</title>
                <link>https://jira.whamcloud.com/browse/LU-9474</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;&lt;tt&gt;trap&lt;/tt&gt; is used in many tests to set actions to perform on cleanup.&lt;/p&gt;

&lt;p&gt;IMHO, trap should be registered in this order:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;cleanup_test_XX()
{
    undo_something
}

test_XX()
{
    trap cleanup_test_XX EXIT
    do_something
    ...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Currently many tests do not respect this template.&lt;br/&gt;
 Among those, some:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;register the trap after &lt;tt&gt;do_something()&lt;/tt&gt;;&lt;/li&gt;
	&lt;li&gt;explicitly call &lt;tt&gt;cleanup_test_XX()&lt;/tt&gt; at the end of the test;&lt;/li&gt;
	&lt;li&gt;call &lt;tt&gt;trap 0&lt;/tt&gt; at the start of &lt;tt&gt;cleanup_test_XX()&lt;/tt&gt; (this one may be controversial, I believe the test harness should provide, and probably already provides, trap isolation between tests).&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="45959">LU-9474</key>
            <summary>tests: register traps in a correct order</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="standan">Saurabh Tandan</assignee>
                                    <reporter username="cealustre">CEA</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Tue, 9 May 2017 10:51:27 +0000</created>
                <updated>Wed, 5 Aug 2020 13:50:23 +0000</updated>
                            <resolved>Mon, 6 Aug 2018 14:53:01 +0000</resolved>
                                                    <fixVersion>Lustre 2.12.0</fixVersion>
                    <fixVersion>Lustre 2.10.7</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="195150" author="jamesanunez" created="Tue, 9 May 2017 17:59:54 +0000"  >&lt;p&gt;Saurabh - Quentin started work on this issue with &lt;a href=&quot;https://review.whamcloud.com/#/c/26734/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/26734/&lt;/a&gt;. Would you please work with him to make sure that this work lands to master?&lt;/p&gt;

&lt;p&gt;Thanks, James&lt;/p&gt;</comment>
                            <comment id="195928" author="adilger" created="Tue, 16 May 2017 01:53:07 +0000"  >&lt;p&gt;I&apos;m not sure why you think the &quot;call trap 0 at start of trap function&quot;, &quot;call trap function at end of test&quot; is bad?  That consolidates cleanup code that may be in the trap function, rather than duplicating it at the end of the test and ensures that the trap is cleared for this test.  AFAIK, there is not yet a &quot;trap 0&quot; at the end of &lt;tt&gt;run_tests()&lt;/tt&gt; though that is probably a good idea.&lt;/p&gt;</comment>
                            <comment id="195961" author="bougetq" created="Tue, 16 May 2017 07:17:11 +0000"  >&lt;p&gt;Ultimately, the test is launched in &lt;tt&gt;run_one()&lt;/tt&gt; which itself is called inside a subshell in &lt;tt&gt;run_one_logged()&lt;/tt&gt;, so traps defined inside a test function should not leak to other tests and EXIT traps are already executed at the end of tests.&lt;/p&gt;</comment>
                            <comment id="211323" author="gerrit" created="Tue, 17 Oct 2017 19:30:21 +0000"  >&lt;p&gt;Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/29653&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29653&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: add the stack_trap() utility function&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ec4ea64c9cefc6dd973c3955d18d6ba0255371f7&lt;/p&gt;</comment>
                            <comment id="213748" author="gerrit" created="Wed, 15 Nov 2017 12:19:09 +0000"  >&lt;p&gt;Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/30097&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30097&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: rewrite copytool_setup to use stack_trap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 85c1b03c86a6e3351e13eb5b8ca8e23e497886af&lt;/p&gt;</comment>
                            <comment id="213749" author="gerrit" created="Wed, 15 Nov 2017 12:19:10 +0000"  >&lt;p&gt;Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/30098&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30098&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: replace import_file with copytool import&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 400c76c39fa2157bcebc4ab3c606a3e6f0942740&lt;/p&gt;</comment>
                            <comment id="214406" author="gerrit" created="Wed, 22 Nov 2017 03:55:52 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/29653/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29653/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: add the stack_trap() utility function&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 1dfda720c080e39890e5a659a30c8988ca498a7c&lt;/p&gt;</comment>
                            <comment id="215305" author="gerrit" created="Tue, 5 Dec 2017 14:22:44 +0000"  >&lt;p&gt;James Nunez (james.a.nunez@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/30371&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30371&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: add the stack_trap() utility function&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d4dbfd8ef76ce280fceb5c155cae44277a4fa919&lt;/p&gt;</comment>
                            <comment id="216036" author="gerrit" created="Tue, 12 Dec 2017 10:21:07 +0000"  >&lt;p&gt;Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/30490&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30490&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: fix quoting in stack_trap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8e086c102cbaabf3cf2be6645a2891064f057e13&lt;/p&gt;</comment>
                            <comment id="216514" author="gerrit" created="Sun, 17 Dec 2017 06:20:08 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/30097/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30097/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: rewrite copytool_setup to use stack_trap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 2042bcea662847c12cacdecd598b0a0d5fa4d805&lt;/p&gt;</comment>
                            <comment id="216785" author="gerrit" created="Tue, 19 Dec 2017 20:10:57 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/30371/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30371/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: add the stack_trap() utility function&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: eb9c7a25c8d62e549d1c41df0bf047bc2b1d63b4&lt;/p&gt;</comment>
                            <comment id="220529" author="gerrit" created="Fri, 9 Feb 2018 05:57:43 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/30490/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30490/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: fix quoting in stack_trap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 99420a1830b89a8aba6350b095065d65107f7c0f&lt;/p&gt;</comment>
                            <comment id="221810" author="gerrit" created="Tue, 27 Feb 2018 15:49:44 +0000"  >&lt;p&gt;Quentin Bouget (quentin.bouget@cea.fr) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31429&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31429&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: remove unneeded hsm_set_param for raolu tests&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 93e92575b03e1982e52734369b9cde3cb92dd786&lt;/p&gt;</comment>
                            <comment id="228250" author="gerrit" created="Mon, 21 May 2018 16:51:57 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/31429/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31429/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: remove unneeded hsm_set_param for raolu tests&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 804739be1f3bdd28e47d2e71b8ca78923549db25&lt;/p&gt;</comment>
                            <comment id="231504" author="gerrit" created="Mon, 6 Aug 2018 14:35:04 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/30098/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/30098/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: replace import_file with copytool import&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 61089d59a672e0e3760e52cc1e6fc7f10caaf00e&lt;/p&gt;</comment>
                            <comment id="231521" author="pjones" created="Mon, 6 Aug 2018 14:53:01 +0000"  >&lt;p&gt;Looks like this work has all landed now&lt;/p&gt;</comment>
                            <comment id="241159" author="gerrit" created="Fri, 1 Feb 2019 08:08:16 +0000"  >&lt;p&gt;Jian Yu (yujian@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/34158&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34158&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: fix quoting in stack_trap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d7f6102a1ee47ba01f202c66a80d5a3f213501f5&lt;/p&gt;</comment>
                            <comment id="242031" author="gerrit" created="Fri, 15 Feb 2019 01:28:42 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/34158/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/34158/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9474&quot; title=&quot;tests: register traps in a correct order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9474&quot;&gt;&lt;del&gt;LU-9474&lt;/del&gt;&lt;/a&gt; tests: fix quoting in stack_trap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 4c33ed79380017abfb9a1e34b99bc957257f4d55&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="45964">LU-9475</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="50057">LU-10461</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="28905" name="tests_stack_trap.bash" size="3684" author="bougetq" created="Tue, 12 Dec 2017 10:06:33 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzc7b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>