Advertisement
Yi_Zhang

Untitled

Jul 18th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.28 KB | None | 0 0
  1. [root@storageqe-62 blktests]# make
  2. make -C src all
  3. make[1]: Entering directory `/mnt/tests/kernel/storage/SSD/nvme_blktest/blktests/src'
  4. g++ -O2 -Wall -Wextra -Wno-sign-compare -o discontiguous-io discontiguous-io.cpp
  5. discontiguous-io.cpp: In member function ‘void iovec_t::append(void*, size_t)’:
  6. discontiguous-io.cpp:60:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  7. auto p = m_v.end() - 1;
  8. ^
  9. discontiguous-io.cpp:60:8: error: ‘p’ does not name a type
  10. auto p = m_v.end() - 1;
  11. ^
  12. discontiguous-io.cpp:61:3: error: ‘p’ was not declared in this scope
  13. p->iov_base = addr;
  14. ^
  15. discontiguous-io.cpp: In member function ‘size_t iovec_t::data_len() const’:
  16. discontiguous-io.cpp:69:8: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  17. for (auto p = m_v.begin(); p != m_v.end(); ++p)
  18. ^
  19. discontiguous-io.cpp:69:13: error: ‘p’ does not name a type
  20. for (auto p = m_v.begin(); p != m_v.end(); ++p)
  21. ^
  22. discontiguous-io.cpp:69:30: error: expected ‘;’ before ‘p’
  23. for (auto p = m_v.begin(); p != m_v.end(); ++p)
  24. ^
  25. discontiguous-io.cpp:69:30: error: ‘p’ was not declared in this scope
  26. discontiguous-io.cpp: In member function ‘void iovec_t::trunc(size_t)’:
  27. discontiguous-io.cpp:75:8: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  28. for (auto p = m_v.begin(); p != m_v.end(); ++p) {
  29. ^
  30. discontiguous-io.cpp:75:13: error: ‘p’ does not name a type
  31. for (auto p = m_v.begin(); p != m_v.end(); ++p) {
  32. ^
  33. discontiguous-io.cpp:75:30: error: expected ‘;’ before ‘p’
  34. for (auto p = m_v.begin(); p != m_v.end(); ++p) {
  35. ^
  36. discontiguous-io.cpp:75:30: error: ‘p’ was not declared in this scope
  37. discontiguous-io.cpp: In member function ‘std::ostream& iovec_t::write(std::ostream&) const’:
  38. discontiguous-io.cpp:87:8: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  39. for (auto p = m_v.begin(); p != m_v.end(); ++p)
  40. ^
  41. discontiguous-io.cpp:87:13: error: ‘p’ does not name a type
  42. for (auto p = m_v.begin(); p != m_v.end(); ++p)
  43. ^
  44. discontiguous-io.cpp:87:30: error: expected ‘;’ before ‘p’
  45. for (auto p = m_v.begin(); p != m_v.end(); ++p)
  46. ^
  47. discontiguous-io.cpp:87:30: error: ‘p’ was not declared in this scope
  48. discontiguous-io.cpp: In function ‘void dumphex(std::ostream&, const void*, size_t)’:
  49. discontiguous-io.cpp:105:10: error: ‘uintptr_t’ was not declared in this scope
  50. << (uintptr_t)a + i << ':';
  51. ^
  52. discontiguous-io.cpp:105:20: error: expected ‘;’ before ‘a’
  53. << (uintptr_t)a + i << ':';
  54. ^
  55. discontiguous-io.cpp:110:22: error: ‘uint8_t’ was not declared in this scope
  56. << (unsigned)((uint8_t*)a)[j];
  57. ^
  58. discontiguous-io.cpp:110:30: error: expected primary-expression before ‘)’ token
  59. << (unsigned)((uint8_t*)a)[j];
  60. ^
  61. discontiguous-io.cpp:110:31: error: expected ‘)’ before ‘a’
  62. << (unsigned)((uint8_t*)a)[j];
  63. ^
  64. discontiguous-io.cpp:114:24: error: ‘uint8_t’ was not declared in this scope
  65. unsigned char c = ((uint8_t*)a)[j];
  66. ^
  67. discontiguous-io.cpp:114:32: error: expected primary-expression before ‘)’ token
  68. unsigned char c = ((uint8_t*)a)[j];
  69. ^
  70. discontiguous-io.cpp:114:33: error: expected ‘)’ before ‘a’
  71. unsigned char c = ((uint8_t*)a)[j];
  72. ^
  73. discontiguous-io.cpp: At global scope:
  74. discontiguous-io.cpp:101:13: warning: unused parameter ‘a’ [-Wunused-parameter]
  75. static void dumphex(std::ostream &os, const void *a, size_t len)
  76. ^
  77. discontiguous-io.cpp:126:51: error: ‘uint32_t’ has not been declared
  78. static ssize_t sg_read(const file_descriptor &fd, uint32_t lba,
  79. ^
  80. discontiguous-io.cpp: In function ‘ssize_t sg_read(const file_descriptor&, int, const iovec_t&)’:
  81. discontiguous-io.cpp:143:2: error: ‘uint8_t’ was not declared in this scope
  82. uint8_t read6[6] = {
  83. ^
  84. discontiguous-io.cpp:143:10: error: expected ‘;’ before ‘read6’
  85. uint8_t read6[6] = {
  86. ^
  87. discontiguous-io.cpp:153:11: error: ‘read6’ was not declared in this scope
  88. h.cmdp = read6;
  89. ^
  90. discontiguous-io.cpp:163:54: error: ‘errno’ was not declared in this scope
  91. std::cerr << "READ(6) ioctl failed with errno " << errno
  92. ^
  93. discontiguous-io.cpp:167:2: error: ‘uint32_t’ was not declared in this scope
  94. uint32_t result = h.status | (h.msg_status << 8) |
  95. ^
  96. discontiguous-io.cpp:167:11: error: expected ‘;’ before ‘result’
  97. uint32_t result = h.status | (h.msg_status << 8) |
  98. ^
  99. discontiguous-io.cpp:169:6: error: ‘result’ was not declared in this scope
  100. if (result) {
  101. ^
  102. discontiguous-io.cpp: At global scope:
  103. discontiguous-io.cpp:181:52: error: ‘uint32_t’ has not been declared
  104. static ssize_t sg_write(const file_descriptor &fd, uint32_t lba,
  105. ^
  106. discontiguous-io.cpp: In function ‘ssize_t sg_write(const file_descriptor&, int, const iovec_t&)’:
  107. discontiguous-io.cpp:208:9: error: ‘errno’ was not declared in this scope
  108. << errno << '\n';
  109. ^
  110. discontiguous-io.cpp:217:2: error: ‘uint8_t’ was not declared in this scope
  111. uint8_t write6[6] = {
  112. ^
  113. discontiguous-io.cpp:217:10: error: expected ‘;’ before ‘write6’
  114. uint8_t write6[6] = {
  115. ^
  116. discontiguous-io.cpp:227:11: error: ‘write6’ was not declared in this scope
  117. h.cmdp = write6;
  118. ^
  119. discontiguous-io.cpp:237:55: error: ‘errno’ was not declared in this scope
  120. std::cerr << "WRITE(6) ioctl failed with errno " << errno
  121. ^
  122. discontiguous-io.cpp:241:2: error: ‘uint32_t’ was not declared in this scope
  123. uint32_t result = h.status | (h.msg_status << 8) |
  124. ^
  125. discontiguous-io.cpp:241:11: error: expected ‘;’ before ‘result’
  126. uint32_t result = h.status | (h.msg_status << 8) |
  127. ^
  128. discontiguous-io.cpp:243:6: error: ‘result’ was not declared in this scope
  129. if (result) {
  130. ^
  131. discontiguous-io.cpp: In function ‘int main(int, char**)’:
  132. discontiguous-io.cpp:263:2: error: ‘uint32_t’ was not declared in this scope
  133. uint32_t offs = 0;
  134. ^
  135. discontiguous-io.cpp:263:11: error: expected ‘;’ before ‘offs’
  136. uint32_t offs = 0;
  137. ^
  138. discontiguous-io.cpp:266:14: error: ‘uint8_t’ was not declared in this scope
  139. std::vector<uint8_t> buf;
  140. ^
  141. discontiguous-io.cpp:266:21: error: template argument 1 is invalid
  142. std::vector<uint8_t> buf;
  143. ^
  144. discontiguous-io.cpp:266:21: error: template argument 2 is invalid
  145. discontiguous-io.cpp:266:26: error: invalid type in declaration before ‘;’ token
  146. std::vector<uint8_t> buf;
  147. ^
  148. discontiguous-io.cpp:269:48: error: ‘EOF’ was not declared in this scope
  149. while ((c = getopt(argc, argv, "hl:o:sw")) != EOF) {
  150. ^
  151. discontiguous-io.cpp:271:42: error: ‘strtoul’ was not declared in this scope
  152. case 'l': len = strtoul(optarg, NULL, 0); break;
  153. ^
  154. discontiguous-io.cpp:272:13: error: ‘offs’ was not declared in this scope
  155. case 'o': offs = strtoul(optarg, NULL, 0); break;
  156. ^
  157. discontiguous-io.cpp:285:6: error: request for member ‘resize’ in ‘buf’, which is of non-class type ‘int’
  158. buf.resize(len);
  159. ^
  160. discontiguous-io.cpp:297:7: error: ‘offs’ was not declared in this scope
  161. if (offs % block_size) {
  162. ^
  163. discontiguous-io.cpp:303:8: error: request for member ‘resize’ in ‘buf’, which is of non-class type ‘int’
  164. buf.resize(buf.size() * 2);
  165. ^
  166. discontiguous-io.cpp:303:19: error: request for member ‘size’ in ‘buf’, which is of non-class type ‘int’
  167. buf.resize(buf.size() * 2);
  168. ^
  169. discontiguous-io.cpp:304:29: error: request for member ‘begin’ in ‘buf’, which is of non-class type ‘int’
  170. unsigned char *p = &*buf.begin();
  171. ^
  172. discontiguous-io.cpp:309:21: error: request for member ‘begin’ in ‘buf’, which is of non-class type ‘int’
  173. iov.append(&*buf.begin(), buf.size());
  174. ^
  175. discontiguous-io.cpp:309:34: error: request for member ‘size’ in ‘buf’, which is of non-class type ‘int’
  176. iov.append(&*buf.begin(), buf.size());
  177. ^
  178. discontiguous-io.cpp:322:31: error: ‘offs’ was not declared in this scope
  179. ssize_t len = sg_write(fd, offs / block_size, iov);
  180. ^
  181. discontiguous-io.cpp:328:30: error: ‘offs’ was not declared in this scope
  182. ssize_t len = sg_read(fd, offs / block_size, iov);
  183. ^
  184. make[1]: *** [discontiguous-io] Error 1
  185. make[1]: Leaving directory `/mnt/tests/kernel/storage/SSD/nvme_blktest/blktests/src'
  186. make: *** [all] Error 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement