<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-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.
<br>
<br>
Thanks<br>
Shuang<br>
On 08/08/2018 02:08 PM, Li Wang wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEemH2ebjH3BJwXEhmKgkL+0+im-0eQhrCQFczU3WLKHi9m1dg@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">Hi Shuang,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Which LTP
version do you use?</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"><span
style="color:rgb(51,51,51);font-family:arial;font-size:13.91px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">If I remember correctly,
YANG Xiao has already reported this issue and fixed in:</span><br>
</div>
<div class="gmail_default" style="font-size:small"><span
style="color:rgb(51,51,51);font-family:arial;font-size:13.91px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br>
</span></div>
<div class="gmail_default"><span
style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">
<div class="gmail_default"><font face="arial"
color="#333333"><span style="font-size:13.91px">commit
72c52581747301939340af5b1971dea569248226</span></font></div>
<div class="gmail_default"><font face="arial"
color="#333333"><span style="font-size:13.91px">Author:
Xiao Yang <<a href="mailto:yangx.jy@cn.fujitsu.com"
moz-do-not-send="true">yangx.jy@cn.fujitsu.com</a>></span></font></div>
<div class="gmail_default"><font face="arial"
color="#333333"><span style="font-size:13.91px">Date:
Sun Jun 24 13:59:43 2018 +0800</span></font></div>
<div class="gmail_default"><font face="arial"
color="#333333"><span style="font-size:13.91px"><br>
</span></font></div>
<div class="gmail_default"><font face="arial"
color="#333333"><span style="font-size:13.91px">
commands/mkswap01.sh: Fix unexisted "/dev/disk/by-*"
files on old kernels</span></font></div>
<div
style="color:rgb(51,51,51);font-family:arial;font-size:13.91px"><br>
</div>
</span></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 8, 2018 at 5:35 AM,
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:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Referring to commit 8435d0c7283,some version of swapon
will not create the symlink of the device.<br>
So it changed TWARN to TINFO so that the test will not
break by it.<br>
We need to handler such situation in the new patch,or
revert the change for swap01.sh.<br>
<br>
Thanks<span class="HOEnZb"><font color="#888888"><br>
Shuang</font></span>
<div class="HOEnZb">
<div class="h5"><br>
<br>
On 06/12/2018 11:56 PM, Petr Vorel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Li,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Signed-off-by: Li Wang <<a
href="mailto:liwang@redhat.com" target="_blank"
moz-do-not-send="true">liwang@redhat.com</a>><br>
Cc: Petr Vorel <<a href="mailto:pvorel@suse.cz"
target="_blank" moz-do-not-send="true">pvorel@suse.cz</a>><br>
Cc: Cyril Hrubis <<a
href="mailto:chrubis@suse.cz" target="_blank"
moz-do-not-send="true">chrubis@suse.cz</a>><br>
---<br>
testcases/commands/mkswap/mksw<wbr>ap01.sh | 17
++++------<br>
testcases/kernel/numa/numa01.s<wbr>h | 58
+++++++++++++++---------------<wbr>-----<br>
</blockquote>
Thanks for your patch, applied with diff bellow.<br>
<br>
I changed:<br>
* fix mixing quotes when calling check_for_file.
This was also broken on dash<br>
(testing with /bin/sh as symlink to /bin/dash and
using <a href="http://checkbashisms.pl"
rel="noreferrer" target="_blank"
moz-do-not-send="true">checkbashisms.pl</a><br>
script helps).<br>
* simplify check_for_file + remove TINFO message as
it was unnecessarily verbose<br>
(see bellow)<br>
<br>
Kind regards,<br>
Petr<br>
<br>
tst_device.c:83: INFO: Found free device
'/dev/loop0'<br>
mkswap01 1 TPASS: 'mkswap /dev/loop0 ' passed.<br>
mkswap01 2 TPASS: 'mkswap /dev/loop0 262140'
passed.<br>
mkswap01 3 TINFO: Can not do swapon on /dev/loop0.<br>
mkswap01 3 TINFO: Device size specified by 'mkswap'
greater than real size.<br>
mkswap01 3 TINFO: Swapon failed expectedly.<br>
mkswap01 3 TPASS: 'mkswap -f /dev/loop0 262148'
passed.<br>
mkswap01 4 TPASS: 'mkswap -c /dev/loop0 ' passed.<br>
mkswap01 5 TINFO: Can not do swapon on /dev/loop0.<br>
mkswap01 5 TINFO: Page size specified by 'mkswap -p'
is not equal to system's page size.<br>
mkswap01 5 TINFO: Swapon failed expectedly.<br>
mkswap01 5 TPASS: 'mkswap -p 2048 /dev/loop0 '
passed.<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TINFO: The file
/dev/disk/by-label/ltp_testswa<wbr>p haven't
appeared<br>
mkswap01 6 TPASS: 'mkswap -L ltp_testswap /dev/loop0
' passed.<br>
mkswap01 7 TPASS: 'mkswap -v1 /dev/loop0 ' passed.<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TINFO: The file
/dev/disk/by-uuid/b20a69ef-cf9<wbr>d-49fb-a313-284df6ddd794
haven't appeared<br>
mkswap01 8 TPASS: 'mkswap -U
b20a69ef-cf9d-49fb-a313-284df6<wbr>ddd794 /dev/loop0
' passed.<br>
mkswap01 9 TPASS: 'mkswap -V /dev/loop0 ' passed.<br>
mkswap01 10 TPASS: 'mkswap -h /dev/loop0 ' passed.<br>
<br>
diff --git testcases/commands/mkswap/mksw<wbr>ap01.sh
testcases/commands/mkswap/mksw<wbr>ap01.sh<br>
index fc07933ae..5ead4cdc5 100755<br>
--- testcases/commands/mkswap/mksw<wbr>ap01.sh<br>
+++ testcases/commands/mkswap/mksw<wbr>ap01.sh<br>
@@ -41,15 +41,9 @@ check_for_file()<br>
{<br>
local path="$1"<br>
- if [ -z "$path" ]; then<br>
+ if [ -z "$path" -o -e "$path" ]; then<br>
return<br>
fi<br>
-<br>
- if [ -e "$path" ]; then<br>
- return 0<br>
- fi<br>
-<br>
- tst_res TINFO "The file $path haven't
appeared"<br>
return 1<br>
}<br>
@@ -70,7 +64,7 @@ mkswap_verify()<br>
local pagesize=$PAGE_SIZE<br>
fi<br>
- TST_RETRY_FUNC "check_for_file "$dev_file""
0<br>
+ TST_RETRY_FUNC "check_for_file $dev_file" 0<br>
swapon $swapfile 2>/dev/null<br>
diff --git testcases/kernel/numa/numa01.s<wbr>h
testcases/kernel/numa/numa01.s<wbr>h<br>
index f8d8f303c..da2f80ddd 100755<br>
--- testcases/kernel/numa/numa01.s<wbr>h<br>
+++ testcases/kernel/numa/numa01.s<wbr>h<br>
@@ -302,11 +302,7 @@ test7()<br>
check_ltp_numa_test8_log()<br>
{<br>
- if grep -m1 -q '.' ltp_numa_test8.log; then<br>
- return 0<br>
- fi<br>
-<br>
- return 1<br>
+ grep -m1 -q '.' ltp_numa_test8.log<br>
}<br>
# Verification of memhog with interleave policy<br>
<br>
</blockquote>
<br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>Regards,<br>
</div>
<div>Li Wang<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>