<!-- 
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-9475] tests: provide utilities to stack traps</title>
                <link>https://jira.whamcloud.com/browse/LU-9475</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Some tests (for example test_12q and test_24d of sanity-hsm) perform several actions that require cleanup.&lt;/p&gt;

&lt;p&gt;Unfortunately, &lt;tt&gt;trap&lt;/tt&gt; does not provide any option to stack traps on top of one another.&lt;br/&gt;
 Currently, tests handle this situation by including the previous cleanup in the code of the second cleanup:&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_something()
{
    undo_something
}

cleanup_test_XX()
{
    undo_something &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
    cleanup_something
}

test_XX()
{
    trap clean_something() EXIT
    do_something
    trap cleanup_test_XX EXIT
    do_something &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This method, while valid in most cases&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;, requires developers to check whether or not, any utility function they use in their test(s) might set up a trap on its own.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; in &lt;tt&gt;sanity-hsm&lt;/tt&gt;, &lt;tt&gt;copytool_setup()&lt;/tt&gt; sets up a trap itself; this means that it has to be called &lt;b&gt;before&lt;/b&gt; setting another trap such as &lt;tt&gt;cleanup_test_XX()&lt;/tt&gt; (otherwise, &lt;tt&gt;cleanup_test_XX()&lt;/tt&gt; would be overwritten) which is not always correct.&lt;/p&gt;</description>
                <environment></environment>
        <key id="45964">LU-9475</key>
            <summary>tests: provide utilities to stack traps</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="3">Duplicate</resolution>
                                        <assignee username="standan">Saurabh Tandan</assignee>
                                    <reporter username="cealustre">CEA</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 May 2017 11:44:58 +0000</created>
                <updated>Wed, 5 Aug 2020 13:50:23 +0000</updated>
                            <resolved>Tue, 10 Apr 2018 12:06:16 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="195151" author="jamesanunez" created="Tue, 9 May 2017 18:00:24 +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="225458" author="jamesanunez" created="Mon, 9 Apr 2018 19:04:20 +0000"  >&lt;p&gt;Quentin - Is this work being tracked under &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;? If so, should we close this ticket?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="225593" author="bougetq" created="Tue, 10 Apr 2018 07:13:01 +0000"  >&lt;p&gt;Hi James,&lt;/p&gt;

&lt;p&gt;Yes, this ticket can be closed =]&lt;/p&gt;</comment>
                            <comment id="225605" author="pjones" created="Tue, 10 Apr 2018 12:06:16 +0000"  >&lt;p&gt;ok - thanks&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="45959">LU-9474</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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|hzzc7r:</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>