Commit Graph

169 Commits

Author SHA1 Message Date
liucheng5
93dbf8abe2 fix: sensor: modify sensortest for PPG
Modify sensortest for new sensor types PPGD and PPGQ instead old type PPG.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2022-01-28 14:08:16 +08:00
chao.an
cb988a8394 testing/ostest: set the default value to TESTING_OSTEST_FPUSIZE
.config:2053:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-09 18:07:52 +08:00
Fotis Panagiotopoulos
bc5d8034f1 Typo fixes. 2022-01-06 10:30:41 +08:00
Zeng Zhaoxiu
614b73d321 ostest: sighand.c: add sem_wait in signal handler
task is blocked by semphore1, signal handler is blocked by semphore2,
after post semphore2, the task must get -EINTR.

Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
2022-01-05 21:34:30 +09:00
Jiuzhu Dong
4a14126d76 ostest: fix assert when enable CONFIG_PRIORITY_INHERITANCE
[ 96.555456] [265] ap: up_assert: Assertion failed at file:semaphore/sem_holder.c line: 112 task: pt-0x5b09fd0b
[ 96.555657] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.555828] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556023] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556222] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556437] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556639] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.556842] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b
[ 96.557036] [265] ap: up_assert: Assertion failed at file:semaphore/sem_recover.c line: 86 task: pt-0x5b09fd0b

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-01-05 20:20:45 +08:00
Petro Karashchenko
5ac15130db apps: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 20:52:08 -06:00
Xiang Xiao
87d8494a6e testing/ostest: Include nuttx/arch.h explicitly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-08 16:32:47 +08:00
Xiang Xiao
14a52b1933 testing/ostest: Don't include arch/tls.h
since it doesn't exist any more

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-05 23:06:02 -03:00
Juha Niskanen
0c21a89a3f testing/ostest: remove spurious redefinitions of NULL
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-11-29 11:14:42 -06:00
Xiang Xiao
c9f736005a testing/fstest: Zero g_nfailed too in fstest_delallfiles
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-27 10:07:01 -03:00
Xiang Xiao
f8ebeb8fd8 testing/fstest: Print the delta of memory info
to catch the memmory leak quickly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-27 10:07:01 -03:00
Xiang Xiao
121a6e58ff testing/fstest: Remove g_media_full since it isn't really used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-27 10:07:01 -03:00
Xiang Xiao
7c4ddaeede testing/fstest: Don't reuse the deleted name
to simplify the root cause analysis

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-27 10:07:01 -03:00
Xiang Xiao
1187351144 testing/fstest: Compare the file name directly
and remove crc of file name

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-27 10:07:01 -03:00
Xiang Xiao
3b64ad34c3 testing/fstest: Fix the typo error
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-27 10:07:01 -03:00
Xiang Xiao
75c11d4480 examples/helloxx: add extern "C" to main implementation directly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-23 17:23:05 -03:00
Xiang Xiao
fd2289a8a2 testing/sensortest: Fix printf format warning
sensortest.c: In function 'print_valu':
Error: sensortest.c:161:10: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  161 |   printf("%s: timestamp:%" PRIu64 " value:%u\n",
      |          ^~~~~~~~~~~~~~~~~
  162 |          name, event->timestamp, event->ppg);
      |                                  ~~~~~~~~~~
      |                                       |
      |                                       uint32_t {aka long unsigned int}
sensortest.c:161:44: note: format string is defined here
  161 |   printf("%s: timestamp:%" PRIu64 " value:%u\n",
      |                                           ~^
      |                                            |
      |                                            unsigned int
      |                                           %lu
sensortest.c: In function 'print_gps':
Error: sensortest.c:169:10: error: format '%u' expects argument of type 'unsigned int', but argument 15 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  169 |   printf("%s: timestamp:%" PRIu64 " time_utc: %" PRIu64 " latitude: %f "
      |          ^~~~~~~~~~~~~~~~~
......
  175 |          event->ground_speed, event->course, event->satellites_used);
      |                                              ~~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   uint32_t {aka long unsigned int}
sensortest.c:172:13: note: format string is defined here
  172 |          " %u\n", name, event->timestamp, event->time_utc, event->latitude,
      |            ~^
      |             |
      |             unsigned int
      |            %lu
sensortest.c: In function 'print_gps_satellite':
Error: sensortest.c:183:10: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |          ^~~~~~~~~~~~~~~~~~
  184 |          event->timestamp, event->count, event->satellites);
      |                            ~~~~~~~~~~~~
      |                                 |
      |                                 uint32_t {aka long unsigned int}
sensortest.c:183:46: note: format string is defined here
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |                                             ~^
      |                                              |
      |                                              unsigned int
      |                                             %lu
Error: sensortest.c:183:10: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |          ^~~~~~~~~~~~~~~~~~
  184 |          event->timestamp, event->count, event->satellites);
      |                                          ~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               uint32_t {aka long unsigned int}
sensortest.c:183:61: note: format string is defined here
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |                                                            ~^
      |                                                             |
      |                                                             unsigned int
      |                                                            %lu

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-19 00:14:59 +08:00
Xiang Xiao
ea91e25558 testing/sensortest: Fix printf format warning
sensortest.c: In function 'print_gps':
Error: sensortest.c:169:29: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  169 |   printf("%s: timestamp: %llu time_utc: %llu latitude: %f longitude: %f "
      |                          ~~~^
      |                             |
      |                             long long unsigned int
      |                          %lu
......
  172 |          " %u\n", name, event->timestamp, event->time_utc, event->latitude,
      |                         ~~~~~~~~~~~~~~~~
      |                              |
      |                              uint64_t {aka long unsigned int}
Error: sensortest.c:169:44: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  169 |   printf("%s: timestamp: %llu time_utc: %llu latitude: %f longitude: %f "
      |                                         ~~~^
      |                                            |
      |                                            long long unsigned int
      |                                         %lu
......
  172 |          " %u\n", name, event->timestamp, event->time_utc, event->latitude,
      |                                           ~~~~~~~~~~~~~~~
      |                                                |
      |                                                uint64_t {aka long unsigned int}
sensortest.c: In function 'print_gps_satellite':
Error: sensortest.c:183:29: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  183 |   printf("%s: timestamp: %llu count: %u satellites: %u", name,
      |                          ~~~^
      |                             |
      |                             long long unsigned int
      |                          %lu
  184 |          event->timestamp, event->count, event->satellites);
      |          ~~~~~~~~~~~~~~~~
      |               |
      |               uint64_t {aka long unsigned int}

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-18 09:57:40 -03:00
丁欣童
0f58795f10 sensortest: support new gps struct and more sensor type.
Signed-off-by: buyuer <dingddding@163.com>
2021-11-17 08:59:43 -06:00
Xiang Xiao
3ba18e5407 testing/ostest: Fix the compiler warning
aio.c: In function ‘check_done’:
aio.c:158:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘volatile long int’} [-Wformat=]
  158 |           printf("  list[%d]. result = %d\n", i, aiocbp->aio_result);
      |                                        ~^        ~~~~~~~~~~~~~~~~~~
      |                                         |              |
      |                                         int            ssize_t {aka volatile long int}
      |                                        %ld
aio.c: In function ‘remove_done’:
aio.c:222:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘volatile long int’} [-Wformat=]
  222 |           printf("  list[%d]. result = %d\n", i, aiocbp->aio_result);
      |                                        ~^        ~~~~~~~~~~~~~~~~~~
      |                                         |              |
      |                                         int            ssize_t {aka volatile long int}
      |                                        %ld

sporadic2.c: In function ‘sporadic2_test’:
sporadic2.c:313:10: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
  313 |   printf("Sporadic 1: prio high %d, low %d, repl %" PRIi32 " ns\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/xiaoxiang/backup/os/nuttx/nuttx/include/stdint.h:35,
                 from /home/xiaoxiang/backup/os/nuttx/nuttx/include/sys/types.h:32,
                 from /home/xiaoxiang/backup/os/nuttx/nuttx/include/stdio.h:30,
                 from sporadic2.c:27:
/home/xiaoxiang/backup/os/nuttx/nuttx/include/arch/inttypes.h:51:24: note: format string is defined here
   51 | #  define PRIi32      "i"
sporadic2.c:315:10: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
  315 |   printf("Sporadic 2: prio high %d, low %d, repl %" PRIi32 " ns\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 14:07:25 -03:00
Jiuzhu Dong
293b89af44 sensortest: modify errno type when api not support
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-11 23:02:21 +02:00
Juha Niskanen
4f095a193e testing/smart: fix wrong hard-coded device pathname and sector size
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-08-27 10:56:57 +08:00
Juha Niskanen
b283289986 apps: fix miscellaneous typos
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-08-26 11:39:28 -07:00
anjianjun
54d94d21b8 testing/fstest:Support test fs with parameter
Signed-off-by: anjianjun <anjianjun@xiaomi.com>
2021-07-30 21:02:42 -07:00
Abdelatif Guettouche
b1fb24d5b9 testing/ostest/barrier: Remove duplicate initialization of the barrier's
attributes.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-07-28 21:13:14 -07:00
Abdelatif Guettouche
025ce0e008 testing/ostest/barrier: Fix the message printed when
pthread_barrier_init fails.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-07-28 21:13:14 -07:00
Abdelatif Guettouche
eb228229d8 testing/smp/smp_main.c: Remove duplicate initialization of the barrier's
attributes.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-07-28 21:13:14 -07:00
Abdelatif Guettouche
e5667b1d3d testing/smp/smp_main.c: Fix the message printed when
pthread_barrier_init fails.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-07-28 21:13:14 -07:00
songnannan
f4b84c0ba7 fix(sensortest): move set_interval and batch before activate.
modify coding style err.

Change-Id: Ib820b81a9a774070b5c4778d11ecb70f1f7cd846
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-07-22 13:05:20 +02:00
Jiuzhu Dong
993693d5f4 testing/sensor: fix bug about -h
MIRTOS-334

Change-Id: I1803ad1c769189f42d223111c7eb898e091eeccc
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-17 09:21:38 +01:00
Jiuzhu Dong
d838666844 sensortest: add '\n' for gps output debug log
MIRTOS-328

Change-Id: Iae2925beae2d63c3ce212875109c3a25cb941a90
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-17 09:21:38 +01:00
Alin Jerpelea
6f4dccdb64 testing: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Xiang Xiao
a91e10f8e4 testing/fstest: Add O_TRUNC flag in fstest_wrfile
MIRTOS-177

to avoid the interference from the lasting run

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-15 09:16:03 -03:00
Xiang Xiao
a7b7c90f6a Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-14 23:00:25 +01:00
paopao
26277cc946 testing: Exit with non zero value in the failure path
Change-Id: I90115ab51bcd937b8443a6aab2fabb6cd559aa85
Signed-off-by: paopao <v-cuixiaoling@xiaomi.com>
2021-06-14 23:00:25 +01:00
Alin Jerpelea
22ff4b686a testing: cxxtest: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 05:05:27 -05:00
Alin Jerpelea
0f68fb7075 testing: smp: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
d2db78f8bc testing: smart_test: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
3378b8ef54 testing: ostest: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
590307e957 testing: update licenses to Apache
Gregory Nutt is has submitted the SGA

Mark Schulte has submitted the ICLA

Ken Pettit has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Masayuki Ishikawa
068e1877b8 testing: getprime: Fix to wait for all the threads to finish
Summary:
- I noticed that sometimes getprime causes ASSERT in tls_getset.c
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-07 21:32:52 -06:00
Alin Jerpelea
1e88c73107 Makefile: Ken Pettit: update licenses to Apache
Gregory Nutt is has submitted the SGA

Ken Pettit has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
ea1ced8ba3 Makefiles: Mateusz Szafoni: update licenses to Apache
Gregory Nutt is has submitted the SGA

Mateusz Szafoni has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Xiang Xiao
1ee948e0c8 Include assert.h for DEBUGASSERT caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:34:37 +09:00
Xiang Xiao
a6ca97d733 ostest: Include errno.h in timedmutex.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-18 12:42:02 +01:00
Abdelatif Guettouche
739ab94d03 testing/unity: Select the latest version.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-05-05 06:05:33 -07:00
Abdelatif Guettouche
e86faa6966 testing/ostest: Fix nxstyle errors.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-04-30 09:17:14 -03:00
Abdelatif Guettouche
0e9f08e454 testing/ostest: Report "ERROR" the same way for all the test cases.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-04-30 09:17:14 -03:00
Brennan Ashton
e73d71c787 ltp: Resolve compile warnings 2021-04-11 03:43:51 -05:00