Skip to content

drivertest/drivertest_i2c_spi: add testcase for i2c and spi#1579

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
W-Mai:😋
Feb 21, 2023

Hidden character warning

The head ref may contain hidden characters: "\ud83d\ude0b"
Merged

drivertest/drivertest_i2c_spi: add testcase for i2c and spi#1579
xiaoxiang781216 merged 1 commit into
apache:masterfrom
W-Mai:😋

Conversation

@W-Mai
Copy link
Copy Markdown
Contributor

@W-Mai W-Mai commented Feb 20, 2023

Summary

The BMI160 6-axis acceleration sensor is used as the peripheral of the I2C test. The main purpose of the test is to open the peripheral and read the data of the sensor. If it is read successfully, the test is successful.

Add compiled constraints to make it work only when the bmi160 driver is turned on.

Impact

Testing

The BMI160 6-axis acceleration sensor is used as the peripheral of the I2C test. The main purpose of the test is to open the peripheral and read the data of the sensor. If it is read successfully, the test is successful.

Add compiled constraints to make it work only when the bmi160 driver is turned on.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
@W-Mai
Copy link
Copy Markdown
Contributor Author

W-Mai commented Feb 21, 2023

build errors

It's not from this patch

In file included from libuv/src/uv-common.h:42,
[456](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:457)
                 from libuv/src/uv-common.c:23:
[457](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:458)
libuv/src/uv-common.c: In function 'uv_walk':
[458](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:459)
Error: libuv/src/queue.h:68:19: error: storing the address of local variable 'queue' in '((void * (**)[2])MEM[(void *[2] * *)loop_13(D) + 8B])[1]' [-Werror=dangling-pointer=]
[459](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:460)
   68 |     QUEUE_PREV(q) = (n);                                                      \
[460](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:461)
      |                   ^
[461](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:462)
libuv/src/queue.h:78:7: note: in expansion of macro 'QUEUE_SPLIT'
[462](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:463)
   78 |       QUEUE_SPLIT(h, q, n);                                                   \
[463](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:464)
      |       ^~~~~~~~~~~
[464](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:465)
libuv/src/uv-common.c:492:3: note: in expansion of macro 'QUEUE_MOVE'
[465](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:466)
  492 |   QUEUE_MOVE(&loop->handle_queue, &queue);
[466](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:467)
      |   ^~~~~~~~~~
[467](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:468)
libuv/src/uv-common.c:488:9: note: 'queue' declared here
[468](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:469)
  488 |   QUEUE queue;
[469](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:470)
      |         ^~~~~
[470](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:471)
libuv/src/queue.h:40:27: note: '((void * (**)[2])loop)[2]' declared here
[471](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:472)
   40 |   ((const QUEUE *) (q) == (const QUEUE *) QUEUE_NEXT(q))
[472](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:473)
      |                           ^
[473](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:474)
libuv/src/queue.h:74:9: note: in expansion of macro 'QUEUE_EMPTY'
[474](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:475)
   74 |     if (QUEUE_EMPTY(h))                                                       \
[475](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:476)
      |         ^~~~~~~~~~~
[476](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:477)
libuv/src/uv-common.c:492:3: note: in expansion of macro 'QUEUE_MOVE'
[477](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:478)
  492 |   QUEUE_MOVE(&loop->handle_queue, &queue);
[478](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:479)
      |   ^~~~~~~~~~
[479](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:480)
cc1: all warnings being treated as errors
[480](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:481)
make[3]: *** [/github/workspace/sources/apps/Application.mk:157: uv-common.c.github.workspace.sources.apps.system.libuv.o] Error 1
[481](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:482)
In file included from libuv/src/uv-common.h:42,
[482](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:483)
                 from libuv/src/unix/internal.h:25,
[483](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:484)
                 from libuv/src/unix/stream.c:23:
[484](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:485)
libuv/src/unix/stream.c: In function 'uv__write_callbacks':
[485](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:486)
Error: libuv/src/queue.h:68:19: error: storing the address of local variable 'pq' in '((void * (**)[2])MEM[(void *[2] * *)stream_24(D) + 108B])[1]' [-Werror=dangling-pointer=]
[486](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:487)
   68 |     QUEUE_PREV(q) = (n);                                                      \
[487](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:488)
      |                   ^
[488](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:489)
libuv/src/queue.h:78:7: note: in expansion of macro 'QUEUE_SPLIT'
[489](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:490)
   78 |       QUEUE_SPLIT(h, q, n);                                                   \
[490](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:491)
      |       ^~~~~~~~~~~
[491](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:492)
libuv/src/unix/stream.c:944:3: note: in expansion of macro 'QUEUE_MOVE'
[492](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:493)
  944 |   QUEUE_MOVE(&stream->write_completed_queue, &pq);
[493](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:494)
      |   ^~~~~~~~~~
[494](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:495)
libuv/src/unix/stream.c:939:9: note: 'pq' declared here
[495](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:496)
  939 |   QUEUE pq;
[496](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:497)
      |         ^~
[497](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:498)
libuv/src/queue.h:40:27: note: '((void * (**)[2])stream)[27]' declared here
[498](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:499)
   40 |   ((const QUEUE *) (q) == (const QUEUE *) QUEUE_NEXT(q))
[499](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:500)
      |                           ^
[500](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:501)
libuv/src/unix/stream.c:941:7: note: in expansion of macro 'QUEUE_EMPTY'
[501](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:502)
  941 |   if (QUEUE_EMPTY(&stream->write_completed_queue))
[502](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:503)
      |       ^~~~~~~~~~~
[503](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:504)
cc1: all warnings being treated as errors
[504](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:505)
make[3]: *** [/github/workspace/sources/apps/Application.mk:157: stream.c.github.workspace.sources.apps.system.libuv.o] Error 1
[505](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:506)
make[3]: Target 'all' not remade because of errors.
[506](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:507)
make[2]: *** [Makefile:52: /github/workspace/sources/apps/system/libuv_all] Error 2
[507](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:508)
make[2]: Target '/github/workspace/sources/apps/libapps.a' not remade because of errors.
[508](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:509)
make[1]: *** [Makefile:46: all] Error 2
[509](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:510)
make: *** [tools/LibTargets.mk:216: /github/workspace/sources/apps/libapps.a] Error 2
[510](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:511)
make: Target 'all' not remade because of errors.
[511](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:512)
/github/workspace/sources/nuttx/tools/testbuild.sh: line 338: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
[512](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:513)
  Normalize stm32f4discovery/adb
In file included from /github/workspace/sources/nuttx/include/libcxx/filesystem:241,
[339](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:340)
                 from libcxx/src/filesystem/operations.cpp:9:
[340](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:341)
In member function 'std::__1::_EnableIf<std::__1::__is_cpp17_forward_iterator<_InputIter>::value> std::__1::basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = const char*; _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]',
[341](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:342)
    inlined from 'std::__1::basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = const char*; <template-parameter-2-2> = void; _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]' at /github/workspace/sources/nuttx/include/libcxx/string:2195:11,
[342](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:343)
    inlined from 'std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::__append_forward_unsafe(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = const char*; _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]' at /github/workspace/sources/nuttx/include/libcxx/string:2676:32,
[343](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:344)
    inlined from 'std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::__append_forward_unsafe(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = const char*; _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]' at /github/workspace/sources/nuttx/include/libcxx/string:2662:1:
[344](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:345)
Error: /github/workspace/sources/nuttx/include/libcxx/string:2156:35: error: '__temp' may be used uninitialized [-Werror=maybe-uninitialized]
[345](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:346)
 2156 |         this->__throw_length_error();
[346](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:347)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
[347](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:348)
/github/workspace/sources/nuttx/include/libcxx/string: In function 'std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::__append_forward_unsafe(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = const char*; _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]':
[348](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:349)
/github/workspace/sources/nuttx/include/libcxx/string:614:1: note: by argument 1 of type 'const std::__1::__basic_string_common<true>*' to 'void std::__1::__basic_string_common<<anonymous> >::__throw_length_error() const [with bool <anonymous> = true]' declared here
[349](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:350)
  614 | __basic_string_common<__b>::__throw_length_error() const
[350](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:351)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
[351](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:352)
/github/workspace/sources/nuttx/include/libcxx/string:2676:32: note: '__temp' declared here
[352](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:353)
 2676 |             const basic_string __temp (__first, __last, __alloc());
[353](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:354)
      |                                ^~~~~~
[354](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:355)
cc1plus: all warnings being treated as errors
[355](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:356)
make[1]: *** [Makefile:72: operations.o] Error 1
[356](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:357)
make[1]: Target 'libxx.a' not remade because of errors.
[357](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:358)
make: *** [tools/LibTargets.mk:200: libs/libxx/libxx.a] Error 2
[358](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:359)
make: Target 'all' not remade because of errors.
[359](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:360)
/github/workspace/sources/nuttx/tools/testbuild.sh: line 338: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
[360](https://github.com/apache/nuttx-apps/actions/runs/4222080287/jobs/7350217174#step:7:361)
  Normalize stm32f4discovery/testlibcxx

@xiaoxiang781216
Copy link
Copy Markdown
Contributor

Let's ignore the ci broken which is fixed by apache/nuttx#8611 and merge this simple change.

@xiaoxiang781216 xiaoxiang781216 merged commit 5a8e089 into apache:master Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants