Public bug reported:

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac
/autopkgtest-cosmic-canonical-kernel-team-
bootstrap/cosmic/arm64/g/glibc/20180510_173125_32961@/log.gz

FAIL: misc/tst-preadvwritev2
original exit status 1
error: tst-preadvwritev2-common.c:45: preadv2 did not fail with an invalid flag
error: 1 test failures
----------
----------
FAIL: misc/tst-preadvwritev64v2
original exit status 1
error: tst-preadvwritev2-common.c:45: preadv2 did not fail with an invalid flag
error: 1 test failures

This is testing for the flag immediately after the last known flag. So,
if it's 0x8, it's going to test for 0x10.

The test snippet:

  int invalid_flag = RWF_SUPPORTED != 0 ? __builtin_clz (RWF_SUPPORTED) : 2;
  invalid_flag = 0x1 << ((sizeof (int) * CHAR_BIT) - invalid_flag);

  char buf[32];
  const struct iovec vec = { .iov_base = buf, .iov_len = sizeof (buf) };
  if (preadv2 (temp_fd, &vec, 1, 0, invalid_flag) != -1)
    FAIL_EXIT1 ("preadv2 did not fail with an invalid flag");


However, linux 4.16 has introduced RWF_APPEND.

commit e1fc742e14e01d84d9693c4aca4ab23da65811fb
Author: Jürg Billeter <j...@bitron.ch>
Date:   Fri Sep 29 14:07:17 2017 +0200

    fs: add RWF_APPEND

---
+/* per-IO O_APPEND */
+#define RWF_APPEND     ((__force __kernel_rwf_t)0x00000010)
+
 /* mask of flags supported by the kernel */
-#define RWF_SUPPORTED  (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)
+#define RWF_SUPPORTED  (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
+                        RWF_APPEND)

** Affects: glibc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770480

Title:
  preadv2 test does not consider new flag from linux 4.16

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1770480/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to