From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] commands/mkswap01: Update wait_for_file function
Date: Wed, 2 Mar 2016 14:42:00 +0100 [thread overview]
Message-ID: <20160302134200.GA25763@rei> (raw)
In-Reply-To: <56CF3128.7030509@oracle.com>
Hi!
> Hmm, in my case swapon -L test does not fail, if there is no
> /dev/disk/by-label/test:
>
> root@skholman-m7 stas]# rm /dev/disk/by-label/test
> rm: remove symbolic link `/dev/disk/by-label/test'? y
> [root@skholman-m7 stas]# BLKID_FILE=/tmp/none strace swapon -L test &>
> /tmp/o; echo $?
> 0
> [root@skholman-m7 stas]# grep by-label /tmp/o
> stat64("/dev/disk/by-label/test", 0x7feff9b6130) = -1 ENOENT (No such
> file or directory)
> [root@skholman-m7 stas]#
>
> (but in the strace output I see that swapon tries to read some sectors
> from all available block devices)
>
> Maybe the version of libblkid plays a role here.
>
> Using 'blkid -t' simply makes wait_for_file/wait_for_device not fail if
> there is no /dev/disk/by-label/ symlink. I suppose 'blkid -t' could be
> substituted with /bin/true in my case.
Unfortunately for me the swapon just looks for the symlink
(util-linux-2.19.1) while blkid -t also reads first 512 bytes of each
block device. So I guess that using blkid will not help in this case.
Then what about just changing the 'tst_resm TWARN "The file $path
haven't appeared"' from TWARN to TINFO?
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-03-02 13:42 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
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 [this message]
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=20160302134200.GA25763@rei \
--to=chrubis@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox