[bug report]blktests: g++ discontiguous-io.cpp failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello
I found blktests make failed recently, could you help check it, thanks.

version:
gcc-c++-13.0.1-0.2.fc38.x86_64
6.2.0-rc4

[root@localhost blktests]# make
make -C src all
make[1]: Entering directory '/root/blktests/src'
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o loblksize loblksize.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o loop_change_fd
loop_change_fd.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o
loop_get_status_null loop_get_status_null.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o mount_clear_sock
mount_clear_sock.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o nbdsetsize nbdsetsize.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o openclose openclose.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o sg/dxfer-from-dev
sg/dxfer-from-dev.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o sg/syzkaller1 sg/syzkaller1.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H -o zbdioctl zbdioctl.c
g++  -O2 -std=c++11 -Wall -Wextra -Wshadow -Wno-sign-compare -Werror
-DHAVE_LINUX_BLKZONED_H -o discontiguous-io discontiguous-io.cpp
discontiguous-io.cpp: In function ‘void dumphex(std::ostream&, const
void*, size_t)’:
discontiguous-io.cpp:92:24: error: ‘uintptr_t’ was not declared in this scope
   92 |                    << (uintptr_t)a + i << ':';
      |                        ^~~~~~~~~
discontiguous-io.cpp:15:1: note: ‘uintptr_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   14 | #include <vector>
  +++ |+#include <cstdint>
   15 |
discontiguous-io.cpp:97:43: error: ‘uint8_t’ was not declared in this scope
   97 |                            << (unsigned)((uint8_t*)a)[j];
      |                                           ^~~~~~~
discontiguous-io.cpp:97:43: note: ‘uint8_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:97:51: error: expected primary-expression before ‘)’ token
   97 |                            << (unsigned)((uint8_t*)a)[j];
      |                                                   ^
discontiguous-io.cpp:97:52: error: expected ‘)’ before ‘a’
   97 |                            << (unsigned)((uint8_t*)a)[j];
      |                                         ~          ^
      |                                                    )
discontiguous-io.cpp:101:45: error: ‘uint8_t’ was not declared in this scope
  101 |                         unsigned char c = ((uint8_t*)a)[j];
      |                                             ^~~~~~~
discontiguous-io.cpp:101:45: note: ‘uint8_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:101:53: error: expected primary-expression before ‘)’ token
  101 |                         unsigned char c = ((uint8_t*)a)[j];
      |                                                     ^
discontiguous-io.cpp:101:54: error: expected ‘)’ before ‘a’
  101 |                         unsigned char c = ((uint8_t*)a)[j];
      |                                           ~          ^
      |                                                      )
discontiguous-io.cpp:88:51: error: unused parameter ‘a’
[-Werror=unused-parameter]
   88 | static void dumphex(std::ostream &os, const void *a, size_t len)
      |                                       ~~~~~~~~~~~~^
discontiguous-io.cpp: At global scope:
discontiguous-io.cpp:113:51: error: ‘uint32_t’ has not been declared
  113 | static ssize_t sg_read(const file_descriptor &fd, uint32_t lba,
      |                                                   ^~~~~~~~
discontiguous-io.cpp: In function ‘ssize_t sg_read(const
file_descriptor&, int, const iovec_t&)’:
discontiguous-io.cpp:130:9: error: ‘uint8_t’ was not declared in this scope
  130 |         uint8_t read6[6] = {
      |         ^~~~~~~
discontiguous-io.cpp:130:9: note: ‘uint8_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:140:18: error: ‘read6’ was not declared in this
scope; did you mean ‘read’?
  140 |         h.cmdp = read6;
      |                  ^~~~~
      |                  read
discontiguous-io.cpp:154:9: error: ‘uint32_t’ was not declared in this scope
  154 |         uint32_t result = h.status | (h.msg_status << 8) |
      |         ^~~~~~~~
discontiguous-io.cpp:154:9: note: ‘uint32_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:156:13: error: ‘result’ was not declared in this scope
  156 |         if (result) {
      |             ^~~~~~
discontiguous-io.cpp: At global scope:
discontiguous-io.cpp:168:52: error: ‘uint32_t’ has not been declared
  168 | static ssize_t sg_write(const file_descriptor &fd, uint32_t lba,
      |                                                    ^~~~~~~~
discontiguous-io.cpp: In function ‘ssize_t sg_write(const
file_descriptor&, int, const iovec_t&)’:
discontiguous-io.cpp:204:9: error: ‘uint8_t’ was not declared in this scope
  204 |         uint8_t write6[6] = {
      |         ^~~~~~~
discontiguous-io.cpp:204:9: note: ‘uint8_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:214:18: error: ‘write6’ was not declared in this
scope; did you mean ‘write’?
  214 |         h.cmdp = write6;
      |                  ^~~~~~
      |                  write
discontiguous-io.cpp:228:9: error: ‘uint32_t’ was not declared in this scope
  228 |         uint32_t result = h.status | (h.msg_status << 8) |
      |         ^~~~~~~~
discontiguous-io.cpp:228:9: note: ‘uint32_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:230:13: error: ‘result’ was not declared in this scope
  230 |         if (result) {
      |             ^~~~~~
discontiguous-io.cpp: In function ‘int main(int, char**)’:
discontiguous-io.cpp:250:9: error: ‘uint32_t’ was not declared in this scope
  250 |         uint32_t offs = 0;
      |         ^~~~~~~~
discontiguous-io.cpp:250:9: note: ‘uint32_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:253:21: error: ‘uint8_t’ was not declared in this scope
  253 |         std::vector<uint8_t> buf;
      |                     ^~~~~~~
discontiguous-io.cpp:253:21: note: ‘uint8_t’ is defined in header
‘<cstdint>’; did you forget to ‘#include <cstdint>’?
discontiguous-io.cpp:253:28: error: template argument 1 is invalid
  253 |         std::vector<uint8_t> buf;
      |                            ^
discontiguous-io.cpp:253:28: error: template argument 2 is invalid
discontiguous-io.cpp:259:27: error: ‘offs’ was not declared in this
scope; did you mean ‘ffs’?
  259 |                 case 'o': offs = strtoul(optarg, NULL, 0); break;
      |                           ^~~~
      |                           ffs
discontiguous-io.cpp:272:13: error: request for member ‘resize’ in
‘buf’, which is of non-class type ‘int’
  272 |         buf.resize(len);
      |             ^~~~~~
discontiguous-io.cpp:284:21: error: ‘offs’ was not declared in this
scope; did you mean ‘ffs’?
  284 |                 if (offs % block_size) {
      |                     ^~~~
      |                     ffs
discontiguous-io.cpp:290:29: error: request for member ‘resize’ in
‘buf’, which is of non-class type ‘int’
  290 |                         buf.resize(buf.size() * 2);
      |                             ^~~~~~
discontiguous-io.cpp:290:40: error: request for member ‘size’ in
‘buf’, which is of non-class type ‘int’
  290 |                         buf.resize(buf.size() * 2);
      |                                        ^~~~
discontiguous-io.cpp:291:50: error: request for member ‘begin’ in
‘buf’, which is of non-class type ‘int’
  291 |                         unsigned char *p = &*buf.begin();
      |                                                  ^~~~~
discontiguous-io.cpp:296:42: error: request for member ‘begin’ in
‘buf’, which is of non-class type ‘int’
  296 |                         iov.append(&*buf.begin(), buf.size());
      |                                          ^~~~~
discontiguous-io.cpp:296:55: error: request for member ‘size’ in
‘buf’, which is of non-class type ‘int’
  296 |                         iov.append(&*buf.begin(), buf.size());
      |                                                       ^~~~
discontiguous-io.cpp:309:56: error: ‘offs’ was not declared in this
scope; did you mean ‘ffs’?
  309 |                         ssize_t written = sg_write(fd, offs /
block_size, iov);
      |                                                        ^~~~
      |                                                        ffs
discontiguous-io.cpp:315:52: error: ‘offs’ was not declared in this
scope; did you mean ‘ffs’?
  315 |                         ssize_t read = sg_read(fd, offs /
block_size, iov);
      |                                                    ^~~~
      |                                                    ffs
discontiguous-io.cpp: At global scope:
discontiguous-io.cpp:168:16: error: ‘ssize_t sg_write(const
file_descriptor&, int, const iovec_t&)’ defined but not used
[-Werror=unused-function]
  168 | static ssize_t sg_write(const file_descriptor &fd, uint32_t lba,
      |                ^~~~~~~~
discontiguous-io.cpp:113:16: error: ‘ssize_t sg_read(const
file_descriptor&, int, const iovec_t&)’ defined but not used
[-Werror=unused-function]
  113 | static ssize_t sg_read(const file_descriptor &fd, uint32_t lba,
      |                ^~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:40: discontiguous-io] Error 1
make[1]: Leaving directory '/root/blktests/src'
make: *** [Makefile:5: all] Error 2
-- 
Best Regards,
  Yi Zhang





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux