On 2018-06-23 01:46 +0800, Xi Ruoyao wrote:

> preadvwritev tests fail because of buggy kernel of host system (the test file 
> has a comment about this issue).
> I've seen and investigated them. Don't worry.

In glibc-2.27/misc/tst-preadvwritev2-common.c:

>   /* This might fail for compat syscall (32 bits running on 64 bits kernel)
>      due a kernel issue.  */
>   if (pwritev2 (temp_fd, &vec, 1, 0, invalid_flag) != -1)
>     FAIL_EXIT1 ("pwritev2 did not fail with an invalid flag");
>   if (errno != ENOTSUP)
>     FAIL_EXIT1 ("pwritev2 failure did not set errno to ENOTSUP (%d)", errno);

I think this kernel issue was introduced by
    4babf2c5efb79be778d45ebe95d9c9b3c880c83b "x86: wire up preadv2 and pwritev2"

And fixed by
    3ebfd81f7fb3e81a754e37283b7f38c62244641a
    "x86/syscalls: Add compat_sys_preadv64v2/compat_sys_pwritev64v2"

Attached a patch adding a note about this issue in book.
-- 
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University
From 186f50bc90c102f1442e6a1beb35ee958405bfb2 Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <[email protected]>
Date: Sat, 23 Jun 2018 20:12:29 +0800
Subject: [PATCH] Note glibc test failures caused by host kernel

---
 chapter06/glibc.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index c83b80a6..68a66f34 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -194,6 +194,13 @@ unset GCC_INCDIR</userinput></screen>
         malloc/tst-malloc-usable and nptl/tst-cleanupx4. </para>
       </listitem>
 -->
+
+      <listitem>
+        <para>The <emphasis>misc/tst-preadvwritev2</emphasis> and
+        <emphasis>misc/tst-preadvwritev64v2</emphasis> tests may fail if
+        building 32-bit LFS on 64-bit host with certain kernel versions.
+        </para>
+      </listitem>
     </itemizedlist>
 
     <para>Though it is a harmless message, the install stage of Glibc will
-- 
2.16.2

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to