All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuang Qiu <shuang.qiu@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] commands/mkswap01: Update wait_for_file function
Date: Fri, 05 Feb 2016 13:41:00 +0800	[thread overview]
Message-ID: <56B435EC.3020107@oracle.com> (raw)
In-Reply-To: <20160204131705.GD4615@rei>

On 02/04/2016 09:17 PM, Cyril Hrubis wrote:
> Hi!
>>> Does actually the swapon in the verify function work? Since as far as I
>>> can tell it actually opens the symlink in question in order to get the
>>> swap device.
>>>
>>> Have you tried stracing it in case that the code waiting for the device
>>> timeouted?
>> I tried it with UEK.Sometimes waiting for device timeout but swapon
>> works,i.e.:
>>
>> ...
>> ...
>>
>> mkswap01 6 TINFO : Waiting for /dev/disk/by-label/ltp_testswap to appear
>> mkswap01 6 TINFO : Waiting for /dev/disk/by-label/ltp_testswap to appear
>> mkswap01 6 TINFO : Waiting for /dev/disk/by-label/ltp_testswap to appear
>> mkswap01 6 TWARN : The file /dev/disk/by-label/ltp_testswap haven't appeared
>> mkswap01 6 TPASS : 'mkswap -L ltp_testswap /dev/sda7 ' passed.
>> ...
> That looks strange to me. Since if I strace 'swapon -L ltp_testswap' I got:
>
> ...
> stat("/dev/disk/by-label/ltp_testswap", 0x7ffef8293800) = -1 ENOENT (No such file or directory)
> ...
>
> Then it proceeds to exit with error. So I'm geniuely confused.
>
> Hmm but looking at blkid man page, it says that udev symlinks may depend
> on settings in /etc/blkid.conf. That may be the difference after all.
>
> Looking at the manual page doing 'blkid -L ltp_testswap' and 'blkid -U
> $UUID' should be the only correct solution. Does that work for you?
Yes.
But it does not support blkid -L/-U with lower version of blkid 
util(such like in RHEL5.11).
So I use "-t" option to search the label and UUID instead in the patch.

Thanks
Shuang
>


  reply	other threads:[~2016-02-05  5:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 15:56 [LTP] [PATCH] commands/mkswap01: Update wait_for_file function shuang.qiu
2016-02-02 14:35 ` Cyril Hrubis
2016-02-03  1:28   ` Shuang Qiu
2016-02-04 13:17     ` Cyril Hrubis
2016-02-05  5:41       ` Shuang Qiu [this message]
2016-02-08 15:34         ` Cyril Hrubis
2016-02-17  8:30           ` Shuang Qiu
2016-02-25 16:51       ` Stanislav Kholmanskikh
2016-02-25 17:22         ` Stanislav Kholmanskikh
2016-03-02 13:42         ` Cyril Hrubis
2016-03-03  8:59           ` Stanislav Kholmanskikh
2016-03-03  9:43             ` Shuang Qiu
2016-03-03 15:55               ` Cyril Hrubis
2016-02-26 13:42 ` Stanislav Kholmanskikh
2016-03-02  6:20   ` Shuang Qiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B435EC.3020107@oracle.com \
    --to=shuang.qiu@oracle.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.