<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 08/08/2018 03:35 PM, Li Wang wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEemH2cHh94s_DSwN73GoTv0zOeS3xK0AsOFpq6iNKggvzG1Lw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_extra">
          <div class="gmail_quote">Shuang Qiu <span dir="ltr"><<a
                href="mailto:shuang.qiu@oracle.com" target="_blank"
                moz-do-not-send="true">shuang.qiu@oracle.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF">
                <div
                  class="m_-5268066355035292330gmail-m_1519280404302380598moz-cite-prefix">Oh,yes,Xiao's
                  patch is related to it.<br>
                  ===cut===<br>
                  if tst_kvcmp -lt "2.6.35" && [ -n "$dev_file"
                  ]; then<br>
                  ===<br>
                  But looks like the missing symlink issue is not only
                  related with kernel version or loop devices,but
                  sometimes related with mkswap version or udev rules.<br>
                  The testcase sometimes will also fail with new version
                  of kernels.
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>
              <div class="gmail_default" style="font-size:small">Hmm, if
                that is true. We may need to rewrite the judgement
                according the real situation.</div>
            </div>
            <div>
              <div class="gmail_default" style="font-size:small"><br>
              </div>
            </div>
            <div>
              <div class="gmail_default" style="font-size:small">check_symlink_support()</div>
              <div class="gmail_default" style="font-size:small">{</div>
              <div class="gmail_default" style="font-size:small">       
                if support symlink</div>
              <div class="gmail_default" style="font-size:small">       
                        return 0</div>
              <div class="gmail_default" style="font-size:small">       
                else</div>
              <div class="gmail_default" style="font-size:small">       
                        return 1</div>
              <div class="gmail_default" style="font-size:small">}</div>
              <br>
            </div>
            <div>
              <div class="gmail_default" style="font-size:small">if !
                check_symlink_support ; then</div>
              <div class="gmail_default">        tst_res TINFO "Waiting
                for $dev_file to appear"</div>
              <div class="gmail_default">        tst_sleep 100ms</div>
              <div class="gmail_default">else</div>
              <div class="gmail_default">        TST_RETRY_FUNC
                "check_for_file $dev_file" 0</div>
              <div class="gmail_default">fi</div>
            </div>
            <div class="gmail_default" style="font-size:small"><br>
            </div>
            <div>
              <div class="gmail_default" style="font-size:small">Or, any
                better idea?</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Yes,this is a great solution.<br>
    But it is really hard to define the support symlink situation for
    different releases and userspace versions.<br>
    The simplest way is revert the patch for mkswap01<br>
    <br>
    Thanks<br>
    Shuang<br>
    <blockquote type="cite"
cite="mid:CAEemH2cHh94s_DSwN73GoTv0zOeS3xK0AsOFpq6iNKggvzG1Lw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div><br>
          </div>
          -- <br>
          <div class="m_-5268066355035292330gmail_signature">
            <div dir="ltr">
              <div>Regards,<br>
              </div>
              <div>Li Wang<br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>