Commit graph

13461 commits

Author SHA1 Message Date
Chuck Jordan 472817285e test: fix wording here to "measure time from ISR back to interrupted task"
Used to say "ISR to back to". Now says "ISR back to".

Change-Id: I568306f6653096799ec22ea21cdb9ebee42ac359
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-27 21:11:25 +00:00
Sergio Rodriguez 3ac7823ba9 benchmark: Changing dummy IRQ due conflict with APIC timer IRQ
The Quark D2000 uses the IRQ 10 for the APIC timer interrupt, this
cause a conflict with the "random" IRQ for the footprint benchmark

Change-Id: Iead18821af307832d54b0c9f3db5e52413ba670b
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-05-27 11:26:17 +00:00
Javier B Perez fe5aa9f6ae test: bluetooth: disable test for STM32F103RB not enough RAM
Disabled bluetooth test for STM32F103RB SOC because there is not
enough RAM space for the test.

Change-Id: I9f097d9201ed659c4970b67f42c570331b92bad8
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-05-26 11:14:38 -05:00
Anas Nashif de8bc78a5e arc: support microkernel on ARC
Microkernel on ARC works fine, was missing some declarations in the
linker file.
Also enable testing of microkernel with ARC and disable tests where
ARC is not supported yet.

Jira: ZEP-396
Change-Id: I2ac7b8dc0bea22f5d2e24832d9e3afad8df9f580
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-25 22:14:18 -04:00
Kumar Gala 9ec2f3be80 Cleanup whitespace in Kconfig files
Convert leading whitespace into tabs in Kconfig files.  Also replaced
double spaces between config and <prompt>.

Change-Id: I341c718ecf4143529b477c239bbde88e18f37062
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-05-25 13:28:07 -05:00
Mariusz Skamra edc4f30beb Bluetooth: tester: Add support for indications in tester application
This adds support for indications in tester application.

1/3   GATT   TC_GAN_SR_BV_01_C   PASS
2/3   GATT   TC_GAI_SR_BV_01_C   PASS
3/3   GATT   TC_GAT_SR_BV_01_C   PASS

Closes ZEP-403.

Change-Id: I3da8746641429388d38c2593344105f33fb43ee8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-25 15:19:30 +00:00
Andrei Emeltchenko 61367b415d Bluetooth/shell: Correct attribute write error
Return correct errors for long write.

Change-Id: Idfd54d961db9b2023d05a0dcfa7082d63e9c0261
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-25 16:44:51 +03:00
Mariusz Skamra 13d0832142 Bluetooth: tester: Fix invalid type cast
This fixes invalid cast from struct bt_gatt_attr to bt_gatt_chrc.

Change-Id: Idc2c016e26b5d38d2d4772a7bd79af8357a4da58
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-25 13:23:19 +00:00
Szymon Janc 44a306293c Bluetooth: shell: Enable TinyCrypt ECC for nimble
This allows to use LE SC with nimble firmware running on Arduino 101
board.

Change-Id: I3a9a485dc87c367160da98010d0189dfef09d5de
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-25 09:52:08 +02:00
Andrei Emeltchenko 1216cf0ac4 Bluetooth/shell: Add test vendor service support
Adding test service makes possible to test Bluetooth PTS test cases
with the shell. Currently long and auth characteristic.

Change-Id: I153efd3f7fa266f93873ef978025faf72c664076
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-24 13:19:25 +00:00
Anas Nashif 60b18711f3 tests: remove duplicate kernel configs and usage of ARCH
Many test configs are the same, remove complexity and duplication by
using just one kernel config where applicable.

This removes the usage of ARCH which is a remnant from the days where
we had to specify the architecture of the board, the architecture is now
part of Kconfig and determined basded on the board configuration.

This will also make it easy adding new architectures to test cases without
having to add an architecture specific config file when it is actually not
needed, for example now that we will enable micro-kernel support on ARC.

Jira: ZEP-238
Change-Id: I143fa3c4629c58329cfeb0c761c7a896fc1ef63a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:46:08 +00:00
Mariusz Skamra 92884a7540 Bluetooth: nble: Extend BTP with Identity Resolved event
This event indicates resolved Identity Address.

Change-Id: If3a323c4661697a53b015aab805d990703d6f884
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-23 13:33:55 +02:00
Grzegorz Kolodziejczyk 58339a6c15 Bluetooth: tester: Correct flushed data length
Returned by flush_value function value should be length of data which
are previously prepared by prepare write requests.

Change-Id: Iacfc63527c68cf20a76a4587acc749bd2d00cffd
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-23 09:57:44 +00:00
Luiz Augusto von Dentz 7941630e17 console: shell: Add return to command callback
This enable checking for errors and automatically print help string:

btshell> connect
connect <address: XX:XX:XX:XX:XX:XX> <address type: (public)>

Change-Id: Ie097ecddb72ab15bf6192e310d0bd839bfd251d5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-23 11:00:21 +03:00
Luiz Augusto von Dentz 21fabb3d39 nano_work: Add nano_work_init
Change-Id: I2e54e3e6ad048ff0d85cbef83e415ad436ecf720
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-21 12:02:57 +00:00
Grzegorz Kolodziejczyk f1c5282833 Bluetooth: tester: Fix handling execute write error responses
This patch fixes returning invalid offset, invalid attribute length
error. Error should be set during prepare write and returned in
response to execute write request as error response.

Change-Id: I78c57abc5f6f2fbd4a2c0fbb1ee6532212679a36
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-20 11:31:33 +00:00
Peter Mitsis 1434d49539 test_fp_sharing: Add testcase.ini files
Adds testcase.ini files for the floating point sharing tests to
ensure that there are run on a daily basis.

Change-Id: I206b1734700f6e998c19d7ad1b36a84400284899
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-20 00:09:24 +00:00
Luiz Augusto von Dentz 592acc09fd Bluetooth: shell: Add help to commands
This adds help strings to commands describing what parameters they take:

btshell> help init
init [none]
btshell> help connect
connect <address: XX:XX:XX:XX:XX:XX> <address type: (public)>

Change-Id: I0b79cb4f2d424f74b0ddb1de7a6d7120e81e2ae3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-19 08:46:01 +00:00
Mariusz Skamra dc62813b83 Bluetooth: tester: Return Insufficient Authorization error from app
This is related to recent changes in GATT permissions.
Authorization permissions were deleted, so that application
may return BT_ATT_ERR_AUTHORIZATION if configured.

Fixes following Test Cases:
1/9   GATT   TC_GAR_SR_BI_03_C   PASS
2/9   GATT   TC_GAR_SR_BI_09_C   PASS
3/9   GATT   TC_GAR_SR_BI_15_C   PASS
4/9   GATT   TC_GAR_SR_BI_25_C   PASS
5/9   GATT   TC_GAW_SR_BI_04_C   PASS
6/9   GATT   TC_GAW_SR_BI_11_C   PASS
7/9   GATT   TC_GAW_SR_BI_17_C   PASS
8/9   GATT   TC_GAW_SR_BI_22_C   PASS
9/9   GATT   TC_GAW_SR_BI_29_C   PASS

Change-Id: I4c37f6d597192acf34ba50910f92d5f06078201f
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-18 10:23:03 +00:00
Johan Hedberg 485d023428 Bluetooth: Remove unnecessary #ifdef for micro/nano main function
By calling the microkernel entry point 'main' there's no need to have
extra hacks to share the same c-file with both nano and micro
configurations.

Change-Id: I6623855a87ef8624b2bddb75b95079521e0eab8b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-05-17 12:30:41 +03:00
Andrei Emeltchenko 3382e44cf2 Bluetooth/shell: Fix variable scope
Change-Id: I546583a22c6c149553bc1f7bf74618d3cc94d9f1
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-16 15:54:22 +03:00
Andrei Emeltchenko 2bca790c2a Bluetooth/shell: Add support for GATT long write
Support long write maximum 100 bytes.

Change-Id: I071fdf68e29a3d4493c1c60215853cfd8f2ae3c3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-16 14:28:36 +03:00
Vlad Dogaru efa3b6fa99 tests: Add nano_work test
Change-Id: I78359bdd75aa2aa5e2f4b34347d838747d60015f
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-05-12 15:27:24 +00:00
Anas Nashif f62d86c42b samples: get rid of obsolete usage of ARCH variable
Using ARCH variable to select different configurations for the different
architectures is misleading and conflicts with the variable ARCH being used by
the build system.  The variable is not needed, it is application specific and
an application can be built without the need to specify ARCH on the command
line.

This is yet another item specific to samples and test cases that
wrongfully being used and documented for every application.  We need to use
another variable and just make it clear it is specific to samples and how they
are written.  One possible solution is to have a script that gets the
architecture based on the board being used.  Attachments

Jira: ZEP-238
Change-Id: Ieccbc087a41858fb96fb361c0aaa04705e968a4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:28 +00:00
Mariusz Skamra 4108321181 Bluetooth: tester: Add Kconfig for nimble stack
Add config file for Arduino 101 board with the MyNewt nimble stack.

Change-Id: I061b1831457d6780af2ea757da918fb17fdcdaf0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-12 10:50:57 +00:00
Grzegorz Kolodziejczyk 486de7aa84 Bluetooth: tester: Fix setting nonconn advertising type
BTP API allows to set only advertising and scan response data without
declaring advertising type. Advertising type is deduced from current
flags status. Scan response data is static in tester - to set non
connectable mode in current BTP API scan response length must be
considered.

Change-Id: I742cd8ec774c24f317d639835844a4743bb25445
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-11 11:34:28 +02:00
Luiz Augusto von Dentz 777033f710 Bluetooth: GATT: Make bt_gatt_write take a struct
This makes bt_gatt_write similar to bt_gatt_read where the parameters are
stored in a struct which can be used to store intermediate values while
the operation is in progress.

Change-Id: I3c62af137b99985690cf88dcc37a977a0be891f5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-10 17:55:06 +00:00
Arkadiusz Lichwa c8c078442f Bluetooth: shell: Add BR/EDR PSM server registration
Sets new command in BT shell app to allow register one BREDR PSM server.
Syntax:
>br-l2cap-register <PSM>

Change-Id: Iec6b1f5639d987b0f41b933ab894069fda5dfdc8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-05-07 07:07:10 +00:00
Chuck Jordan 68c4555b59 test: fix a comment
Some comments were edited.

Change-Id: I76c2763a98d1141c03ce684dd31683701b74f2d8
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-06 11:19:05 +00:00
Benjamin Walsh f1e90a295c benchmark: fix sema give/take test
This test has been broken since we've moved from object IDs being
small integers to pointers. The problem was two-fold:

 - The semaphores are not put in a an array anymore, and are thus not
   necessarily referenced. The linker drops them in that case.
 - The semaphores are not necessarily allocated in memory in the order
   they are defined in the mdef file. On x86 actually, they are
   allocated in the reverse order.

There was no need anyway of having all those semaphores: the microkernel
semaphore is a counting semaphore. It can thus simply be given a number
of times anre taken the same number of times to operate on it a
reasonable amount of time to take a measurement.

Change-Id: I67c82cb7eb03d28906f8c63717db8f951818be5e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-05-05 22:54:49 +00:00
Mariusz Skamra 22fa025157 Bluetooth: Minor fix missing format specifier
Sample output:
Include 3f54 found: handle 00000021, start 00000040, end 00000045
Include 477a found: handle 00000041, start 000000a0, end 000000a2

Change-Id: I44ef1c5c956d0ff81c08b9f447df676cac8185b8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-05-05 17:23:49 +00:00
Anas Nashif aaa508a2f8 tests: build using newlib also on ARC
A recent issue due to a change to ARC was not caught because we
do not build on ARC. Now that we have libc with ARC toolchain,
built for all arches.

Change-Id: I8c9b7d37802cb582dcb50e6c61d040078d8ecd26
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-05 14:08:50 +00:00
Andrew Boie 0c4590d252 test_tickless: improve testcase.ini filter
The filter specification now matches the code. We can run on any x86,
or those ARM boards where the test's timestamp.c has _Timestamp*
implementations.

Change-Id: Ib81e5379f892beb3783dd3c345cd536c883a74de
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 22:57:39 +00:00
Andrew Boie 3ea7892410 sanitycheck: allow for more expressive filtering in testcase.ini
The old 'config_whitelist' directive in testcase.ini has been removed.
We use the new expr_parser module to parse a 'filter' directive which
is a boolean expression. This gives a great deal more flexibility
in how tests can be filtered.

To keep the tree bisectable, use of config_whitelist in testcase.ini
converted to the new expression language.

Change-Id: I0617319818c5559c0f0569d2fa73d09b681cac51
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 22:57:39 +00:00
Peter Mitsis 2cac7eea6a tests: Pend microkernel tasks on nanokernel objects
Adds a test for pending microkernel tasks on nanokernel objects.
This explicitly covers the nanokernel FIFOs, LIFOs and timers
while implicitly covering nanokernel sempahores.

Change-Id: Ic044b731da13dea337e199499c23ea425056fae4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:34 +00:00
Grzegorz Kolodziejczyk b4ea3209fa Bluetooth: tester: Add possibility to set scan response data
Patch extends le advertising repot with configurable scan response
data.

Change-Id: Ibcbe71d6158ece3e7f63daf33d188a9b0d525384
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-04 13:07:02 +00:00
Szymon Janc 6d5ed390b1 Bluetooth: Simplify advertising API
Instead of requiring application to provide both advertising type
and address type used just require app to provide info if advertising
is connectable or not. Advertising type is set based on provided
SCAN_RSP and local privacy support.

When local privacy is enabled it is no longer possible to advertise
using identity address. If such feature is to be required later on
advertising options can be extended.

This gives BT stack full control over what type of address is used
for advertising and is a preparation for random address rotation
and OOB support.

Change-Id: I90e9a683ef3794f155707343c874f75585439325
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-04 11:11:34 +00:00
Luiz Augusto von Dentz 6a4d39d5cd Bluetooth: GATT: Fix error type
Callback errors should contain ATT error code not posix errors.

Change-Id: I698fac086ab8b2dca3487ab99ee974b4318d16f7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-02 14:31:02 +03:00
Luiz Augusto von Dentz b76abc0460 Bluetooth: Fix not being able to set CONF_FILE for init test
Change-Id: I750cb062b88fd265c14ae3304ae33cd345683a0f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-29 11:51:18 +00:00
Grzegorz Kolodziejczyk e0922851a1 Bluetooth: tester: Return pre defined db offset on start server
Some IUTs may have predefined attributes in db which aren't take into
consideration while building via tester database. BTP clients should
know about such attribute handle offset change. After start server
we're sure that none of attributes will be added since zephyr db is
constant.

Change-Id: Ia2c6edaa7a2f3ca4a9c88fe00122c808a529dadb
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-29 07:52:11 +00:00
Luiz Augusto von Dentz e2c1b2b7be tests: test_slist: Add test for sys_slist_insert
Change-Id: I7b478c78050027013f386146bae6198a554f2005
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-28 11:41:15 +00:00
Roger Lendenmann 3278f542eb Bluetooth: gatt: include service api definition proposal
* service include macro definition takes reference to
   first service attribute of the included service

Change-Id: Ib2b1defe2c99aea738da791af74a534d56025eae
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2016-04-28 10:35:38 +00:00
Andrew Boie edc81265b4 test_timer: nanokernel: use empty config for all arches
Extra config for x86 was unnecessary.

Change-Id: Ic86979e80db2c63e07b328375027acec97e751c7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:09 +00:00
Andrew Boie 3e156748d0 test_xip: nanokernel: use common proj.conf
They were all the same anyway...

Change-Id: I4cf54d7a837d585885990bfcd168e96059349c4a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:04 +00:00
Andrew Boie 7571cdfd59 test_obj_tracing: nanokernel: use common config
The extra config in x86 isn't necessary.

Change-Id: I967a58ae5c04d55c144e9f711a708f43dc023ebb
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:59 +00:00
Andrew Boie 1bf37fb6d3 test_errno: remove unnecessary use of nanokernel API
Change-Id: I7bc26e11f82f697b980f9eb9105941bc9caeb6c6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:49 +00:00
Szymon Janc 51b91e1a33 Bluetooth: shell: Update advertising command help
Add missing rpa parameter to help message.

Change-Id: I902e0f1308a8f8a8b603873a8ffcb9b03527f6e1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-04-25 10:15:16 +02:00
Johan Hedberg e3e91d3280 Bluetooth: Add name member to HCI driver struct
This is more of a convenience to let the driver identify itself in
debug logs and the monitor protocol.

Change-Id: I73351477e98d45d6344c180b8088bde29df6f7d9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-22 18:49:11 +03:00
Johan Hedberg 4488fc6cab Bluetooth: Move HCI device bus information to the driver
The bus that we notify over the monitor protocol is really driver
specific, so let each driver specify their bus type.

Change-Id: Ic3a086fcc06352dbf051e52cef5bf6b8696349ae
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-22 18:49:11 +03:00
Johan Hedberg 8c3add2b6a Bluetooth: tests: Add automated tests for new monitor code
Add two new test cases to exercise the code in monitor.c.

Change-Id: I66ae70e0d3b61d3b852916333019e1ed2c5c6cf4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-22 18:49:11 +03:00
Szymon Janc 85d44978a5 Bluetooth: shell: Add support for advertising with RPA
This allows to test local privacy feature.

Change-Id: Ib231f9187e353f79fee9237acef0d1ffe9cb2b7d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-04-22 11:07:19 +00:00
Grzegorz Kolodziejczyk 0d98a3633e Bluetooth: tester: Add support for seqence gatt database
This patch reorganize tester gatt commands to handle also sequence
builded gatt data base

Change-Id: I5fc89c1c498dd2ecf3999bc93e3caffd14f67cb7
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-21 13:32:42 +00:00
Johan Hedberg 3fbe227cdd Bluetooth: tests: Add DEBUG_DRIVER to automated tests
Change-Id: I9fa76816ceb1f6a49861a1145ae85394b6a64c80
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-21 10:41:48 +03:00
Yannis Damigos 2b8d3626c6 sanitycheck: Add olimexino_stm32 board to sanitycheck
Adds olimexino_stm32 board to sanitycheck.

Change-Id: Icd0e5025bc7a348c7a1a4d18d10d2d1e3a9817bd
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-04-20 22:29:02 +00:00
Johan Hedberg 560956c54d Bluetooth: Kconfig: Split debug selection into a choice
This prepares for adding other debug types besides the printf-style
logging to the console.

Change-Id: Ic2ed305192491734da991c4f61fdaace03fd60f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-20 17:46:09 +03:00
Johan Hedberg 483fc4705f Bluetooth: samples: Add sample Kconfig for nimble based controllers
Add config files to be used on Arduino 101 (or any Curie-based) board
with the MyNewt nimble stack running on the nRF51 and exposing HCI
over UART. These configs contain a stripped-down set of features so
that the resulting image fits e.g. on the Arduino 101.

Change-Id: I7300e9ca4205de6f52aa6ca1bfe4e0b011b6dcbe
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-19 13:19:02 +03:00
Mariusz Skamra 3bea520c6c Bluetooth: tester: Update tester application README
This adds the guidelines for the tester application building usage.

Change-Id: Ibcd31b7bed827f8eee99fdf21d3bb1e8edd24d2e
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-04-19 06:58:55 +00:00
Anas Nashif 65c06afa58 kinetis: reorganise soc directory using soc family
Add Kinetis SoC family and rename fsl_frdm_k64f to mk64f12.
This will allow adding new SoCs of the same family and the reuse of code
among SoCs of the family and series.

Change-Id: Iea1a663aef7ce0487f147bdd36f668bebe80deb5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-18 21:24:58 +00:00
Anas Nashif 9bf2da7ef4 stm32: rename CONFIG_SOC_STM32 -> CONFIG_SOC_FAMILY_STM32
Use CONFIG_SOC_FAMILY for the top level SoC family. A family
will have different SoCs or different SoC series with multiple
SoCs.
Adding the Family string to the config variable to avoid confusion
between actual SoCs and families and to prevent name collisions.

Change-Id: Ic99a2c1df7850dee3a45641027af82464dd6fadb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-18 21:24:58 +00:00
Johan Hedberg 01e29cf395 Bluetooth: samples/shell: Make more features optional
For memory-constrained platforms (like the Arduino 101) it's desirable
to be able to build a slimmed-down shell app that doesn't contain any
unnecessary features. This patch makes more of them optional.

Change-Id: Ia7f2cc0930dda6dfed5ce020b56913c6e0bc3d6f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-18 13:46:21 +00:00
Mariusz Skamra 1cfccfda84 Bluetooth: tester: Start using net_buf to store GATT database
With this patch net_buf based heap will be used to store attribute
user_data and UUID. This is the first step to remove gatt_buf.

Change-Id: I578f26b781e01f5f3464c05f7210dc27cdea8edf
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-04-15 16:51:40 +00:00
Andrew Boie 15800ce78a nanokernel: deprecate dynamic IRQs
We have not found any use-cases for dynamic IRQs where a static
IRQ did not also suffice. Deprecate so that we can eventually
remove from Zephyr and nontrivially decrease the complexity of
the kernel.

Change-Id: I509655371773aeaca7d01134dd850eb4cd95f387
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-15 16:02:12 +00:00
Andrew Boie a83f895dd5 microkernel: deprecate task IRQs
This mechanism does not add enough value to the kernel to be worth
maintaining it. Drivers that need deferred processing of interrupts
can simply define their own task and have the interrupt handler
release an event that the task waits on.

The API is marked as deprecated and it is removed from unit test
coverage as well as the documentation.

Change-Id: Ib87b91cb41e9b6d7fdf0dc62b240a531b6a8889f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-15 16:02:12 +00:00
Grzegorz Kolodziejczyk 38b202e810 Bluetooth: tester: Update server commands with sequence params
Most iuts data base are intended to have its attribute database builded
in sequence and its constant (except attribute values, parameters,
permissions). Patch allows btp specification to cover also devices
which cannot assign an ID right after issuing add attribute command or
set attribute component (which points to defined attribute ID).

Change-Id: Ie8e5ed223609cca2b6e3fb8444065f33b1408142
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-15 15:14:23 +00:00
Szymon Janc cdd5851715 Bluetooth: shell: Add confirming incoming JustWorks pairing
This allows to accept or decline incoming pairing that would
otherwise result in JustWorks pairing.

Change-Id: I759ea067ef298b437e0112b8b7ef3bedf106dc52
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-04-15 04:57:41 +00:00
Szymon Janc 01f80c48ff Bluetooth: shell: Use same config for arm and x86 build
There is no need to have separate configs as init sample is now
used for different build configuration tests.

Change-Id: I917692f8a8e96345afc561dd04bdcf08cdfa5de7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-04-11 11:54:07 +00:00
Johan Hedberg 30601c09bb Bluetooth: Refactor buffer handling for non-host managed buffers
So far the assumption has been that the host stack manages all
incoming and outgoing buffers. For the incoming buffers (from the
controller) this has required hci_core.c to manage its own pools and
do the host flow control. This setup makes perfect sense for an
architecture where the controller resides remotely on a different CPU
& address space (i.e. the "traditional" HCI transport case).

When the stack runs on a system where the controller resides in the
same address space this setup doesn't work that well. In such a
scenario the incoming buffers are ideally created as low down in the
stack as possible (i.e. below HCI), which means that the current
hci_core.c cannot be responsible for managing their pools.

To allow for both types of architectures this patch introduces a new
BLUETOOTH_HOST_BUFFERS Kconfig option that can be selected to say that
host-side management is desired, or deselected to say that the
controller (residing in the same address space) takes care of managing
the incoming buffers.

So far the incoming buffer types were identified by hci_core.c by
looking at their "free pool" pointers, however as soon as the pools
are allowed to be somewhere else this doesn't work. To solve this we
now require a minimum user data size for all Bluetooth buffers and use
that to store the buffer type.

Change-Id: I14bc32007e3e3f17c654f71f79b520650028d7ce
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-11 11:52:29 +00:00
Khem Raj a8aa603242 benchmark: Remove trailing whitespaces.
Change-Id: I852fbf40899e3d4f0715377c955870e5b3990af1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-04-09 10:32:09 +00:00
Tomasz Bursztyka 1c827b9721 tests: test_early_sleep: Let's test at all initialization level
Not only SECONDARY, but also the following ones:
- NANOKERNEL
- MICROKERNEL
- APPLICATION

Change-Id: Id41fa572c830727166101fa3c6254398857b31c7
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-08 15:08:33 +00:00
Grzegorz Kolodziejczyk bae91cf980 Bluetooth: tester: Use bt enable cb to indicate cmd rsp success
This is needed especially for nble. If bluetooth is not enabled we
cannot send another commands to tester.

Change-Id: I17e639301bba6efd127f2c743b8942c1b493f9da
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-06 17:25:11 +00:00
Johan Hedberg 5ccb20c591 Bluetooth: Use bt_addr_t inside bt_addr_le_t
In many cases when we want to access the 'val' member of bt_addr_le_t
it's in situations where the type needed is actually bt_addr_t. To
avoid unnecessary typecasts in these places simply embed bt_addr_t
inside bt_addr_le_t.

Change-Id: I7eecf129bee1dcf085abc83ec2f32e1a10b0b5aa
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Johan Hedberg 13be3947ab Bluetooth: Add Privacy Feature support
Add initial support for the Privacy Feature, including the ability to
manage a local IRK and to use Resolvable Random Addresses.

Change-Id: I1c70aea67078dd2a5d07f3b797c37746ebe9ab61
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-05 12:29:14 +03:00
Daniel Leung 16d0b8b0a3 tests: enable pinmux build tests
Enable building pinmux drivers to catch build breakage.

Origin: Original
Change-Id: I86ec02423bf23ee6aca41b9413e240e984313fcf
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-02 23:11:06 +00:00
Maciek Borzecki 9e8e0e8e82 tests: bluetooth/shell: exclude STM32F103RB from microkernel test
For STM32F103RB targets, the SRAM is overflown by 2-3kB in microkernel
test. Platforms with this SoC can still be built for in the nanokernel test.

Change-Id: I012b93cf8dfec74292f7ab228f4b2fca1a4f3444
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki 109b10b26e test_sha256: disable test for STM32F103RB SoC
Exclude STM32F103RB platform from the test. The SRAM is overflown by
>20kB, while the CPU itself has 20kB of SRAM.

Change-Id: Ic9aad6b88d517b62f4a18901cd698ba9a9defb40
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki 54a055426d test_tickless: disable test for STM32 SoCs
Disable the test for STM32 based platforms until an implementation of
timestamp counter becomes available.

Change-Id: I2e50dac36dbfdc61081610c0e0cf1ace8892f602
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki 3b0a701ac1 bluetooth: shell: declare commands as const
Take advantage of shell_init() accepting const commands array. This
moves ~280 bytes from SRAM to the text section.

Change-Id: Id64ee766e3c6cf7ce4cc623a1e21d3dacf33f050
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Peter Mitsis 28e5d0287e test_fifo: Reorganize directories
Splits the test into two clear sub-categories: microkernel and nanokernel.
This is done to maintain consistency with other tests that do the same
(e.g. test_obj_tracing, test_sema, test_stackprot, test_timer).

Change-Id: Iddb1ec8d569a9d953fb8af5ce08e87b51995f821
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:07:28 +00:00
Tomasz Bursztyka 71e26d0d03 tests: Add a test suite for the single linked list generic
It will extensively test all provided functions within a normal usage of
the API.

Change-Id: I723203a29c3f3416b464030a7fe34eac5fff6095
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-01 00:01:58 +00:00
Peter Mitsis 30aa2602ad test_fifo: Fix issues flagged by checkpatch
Fixes line length and whitespace issues flagged by the checkpatch tool.

Change-Id: Id49cd5341571ac7893929a2836fe5e06166abe06
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:00:34 +00:00
Yannis Damigos ee587d08a8 tests: kernel: test_context: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_context to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for
test-context.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I219f63063ee2dca5b0326e25141d8b37f4cd1d74
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:52 +00:00
Yannis Damigos 32e450024e tests: kernel: test_pool: reduce ram requirements
Reduces the amount of memory allocated for task's stack.
This permits the test_pool to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for test-nano.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ib8041f6d91e8ffc5fcb16dc73de1f7662d9596da
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Yannis Damigos 60695b18a0 tests: kernel: reduce ram requirements
Reduces the amount of memory allocated for stack (both fiber
and task). This permits test_sema and test_mutex to compile
on boards like nucleo-f103rb. Sanitycheck script passes all
tests for test_sema and test_mutex.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ie25288bbbbfa64bfc5f7463639bfb09639cc184f
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Johan Hedberg cfe54794f2 Bluetooth: tests/shell: Add some help text
Change-Id: I09cdec8c710120219412eccf69ba25e95679ecfb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-31 08:02:22 +03:00
Yannis Damigos 560e6a3cf4 tests: kernel: test-fifo: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_nano to compile on boards like
nucleo-f103rb and arduino 101 sss. Sanitycheck script passes
all test for test-fifo.

This patch was verified on the emulated platforms and not against
real hardware boards.

Change-Id: Icf30c4056d9f9ebdc82c100305bf761e49b64491
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-30 22:21:25 +00:00
Yannis Damigos f004330589 tests: kernel: test-lifo: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test to compile on boards like
nucleo-f103rb and arduino 101 sss.
Sanitycheck script passes all test for test-lifo.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I1dd514c9d273bcf490e0eb4f1fadee1a8a94bcc5
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-30 20:02:54 +00:00
Andrei Emeltchenko 808b4c6230 Bluetooth/shell: Fix wrong memory access
The extended inquiry response data format include at least two octets:
length and type, so adding NULL termination name shall be 240-2+1
octets.

Fixes accessing wrong memory in the statement below:
...
memcpy(name, &eir[2], sizeof(name) - 1);
...

Change-Id: I71be96aed6af63d0649f4d64271208eeb11e2c6c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-30 11:07:33 +00:00
Anas Nashif e444363cb9 sanity: add quark_se_devboard to tested boards
Change-Id: I82cefb1baaa0c7174cebcd35c527fec3d133241e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-30 11:04:36 +00:00
Yannis Damigos 9d6e0cebed Bluetooth: tester: Fix typo
Fix typo in tests/bluetooth/tester/testcase.ini

Change-Id: I4a2d93cdf709028bc491aa933d1a5819d62afcff
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-29 17:32:17 +00:00
Andrew Boie 15dc9f326e object-footprint: gitignore generated output
Change-Id: I438b8f4d28119817088fa006b8d6f3504089bcb4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:07:55 +00:00
Andrew Boie baa6ef0798 benchmarks: use portable static interrupt APIs
These tests were using non-portable NANO_CPU_INT_REGISTER. They
now use IRQ_CONNECT, which lets us run these tests on all arches
and not just x86.

Change-Id: Idd4264c2650c851aa78356f01586edbadd014501
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-29 11:07:33 +00:00
Ramesh Thomas bb19e6f82f power_mgmt: Make names consistent with new RFC
Changed names of Kconfig flags, variables, functions, files and
return codes consistent with names used in the RFC. Updated
relevant comments to match the changes.

Origin: Original
Change-Id: Ie7941032d7ad7af61fc02928f74538745e7966e8
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-26 14:35:11 -04:00
Dmitriy Korovkin 0986684e62 tests: Add test for microkernel early sleep functionality
Test verifies that a task_sleep() function can be used during the system
initialization, then it tests that when the k_server() starts, task_sleep()
call makes another task run.

For fibers, test that fiber_sleep() called during the system
initialization puts a fiber to sleep for the provided amount of ticks,
then check that fiber_sleep() called from a fiber running on the
fully functioning microkernel puts that fiber to sleep for the proiveded
amount of ticks.

Change-Id: Iec20b61d7e802a19b1ec074d2511345eed9f2407
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 10:17:22 +00:00
Szymon Janc e7daa90d6b Bluetooth: shell: Add support for BR/EDR discovery
This add shell commands to start and stop BR/EDR discovery.

Change-Id: Id7ea2c75a06842afd02708424930b27cfb65a1e9
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-25 19:28:33 +00:00
Szymon Janc a4836f4da4 Bluetooth: shell: Make cmd_gatt_mread static
This function is not used outside of main.c.

Change-Id: Ia8cc6c2b2193906dd77d031b73d289c6acd128b2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-24 18:39:04 +00:00
Andrei Emeltchenko f4696286b4 Bluetooth: Fix using uninitialized value
Assign value before using.

Change-Id: I67f0e7195c979bf7547c0f718eeaef5e366b447d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-24 15:10:31 +02:00
Andre Guedes 54337aa736 test: Convert returning code to errno.h
Change-Id: Ib4e3fb2e3c1cecf7e1646c7dc03b16e9ce4b6da2
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-23 15:49:40 +00:00
Maciek Borzecki 25799f045c benchmark/latency: reduce RAM requirements
Reduce RAM requirements of latency benchmarks by reducing the amount of
memory statically allocated for stacks (both fiber and task). This helps
reduce the memory usage required by microkernel test to below 20kB,
enabling the benchmark to be run on Nucleo-F103RB board. The change was
verified for nucleo_f103rb and qemu_x86 boards.

Change-Id: If5990d107f0fcfabd12ade82f97e7a1a13f8421c
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-23 11:47:36 -04:00
Maciek Borzecki b7ca3fac3d benchmark/latency: support for Cortex-M targets
Remove x86 specific includes. Add Cortex-M specific instruction pipeline
flush helper.  Microkernel benchmark has been verified to work on STM32
MINI A15 (STM32F103VET) board. Due to memory constraints, Nucleo-F103RB
can only run a nanokernel version of the benchmark.

Change-Id: I2e49c240d6985ceb5643551397d6e0a8cc65b3c6
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-03-23 11:47:36 -04:00
Szymon Janc 6f9ce0b417 Bluetooth: Provide more config options to init sample
This allows to excersize different kconfig configurations in
single app. Thanks to this other samples don't have to get
extra extra options enabled just to improve test build coverage.

Change-Id: Ie5d261f3d38c60e227cf963d938b6fac6d0fb3b9
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-23 12:50:30 +00:00
Grzegorz Kolodziejczyk 5a3d40beec Bluetooth: tester: Add LE scan type flags and support
Now start discovery GAP function interprets scan type flags (active,
passive) and starts discovery with specific LE scan parameters.

Change-Id: Iecb942e24d68790966afe893d3543433c33192dc
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-03-21 11:17:50 +00:00
Mariusz Skamra 9c23e24da5 Bluetooth: tester: Refactor Set Value command handler
Since user_data can be added with gatt_db_add, Set Value
command handler can be simplified.

Change-Id: I86d3ed411cc897488e9073492ff85e0754b2ab93
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-21 11:17:15 +00:00
Daniel Leung fa868a7846 drivers: bluetooth: nble: restructures Bluetooth Kconfig options
This moves both the Bluetooth HCI and NBLE drivers under
"Bluetooth Drivers" category. This also adds a selection for
choosing Bluetooth stacks as the bulk of both HCI and NBLE stacks
cannot be compiled together.

Note that this does not move the source files. That should be
done in a separate change.

Change-Id: I32fa7097ada0fdc52bcc745adb78c7273f4023c6
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-19 00:23:11 +00:00
Mariusz Skamra f84bf33aca Bluetooth: tester: Return BTP error if requested unknown attr ID
With this patch BTP error will be returned if attribute with
requested ID don't exist in GATT attribute database.

Change-Id: Ic6125c6359e75a80fb9a51b6a527ee0a98628e6d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-18 15:19:18 +00:00
Andrew Boie 5729a67cd6 app_kernel: fix test case scaling
Test didn't work unless the specific board was noted in the Makefile.
This scales horribly. Assume no floating point / sse unless specifically
mentioned.

Change-Id: Id1eaa88cdf971a8843e2418661e6a8dba6a1b91d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-17 19:18:44 +00:00
Szymon Janc bf497e959a Bluetooth: shell: Add support for outgoing BR/EDR connections
This allows to initiate BR/EDR connection with specified address.

Change-Id: I99f0d7dff29384926d3bf739831c7460a7fb5f68
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-14 16:03:20 +00:00
Andrew Boie ca094b1691 sanitycheck: enable qemu_x86_iamcu and prefer it over qemu_x86
Rationale for defaulting to IAMCU variant is that our most
interesting x86 boards use this calling convention. --all
will test both.

Change-Id: Idaddfec51a74ae85691d348adeeb88a8528060ea
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-12 02:24:51 +00:00
Juan Manuel Cruz 6d040a89ff debug: add task tracing to sanity test
Change-Id: I2d9691d094a764b9e884ef5f7a2700bedcf71745
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:13:43 +00:00
Juan Manuel Cruz 5f566034e5 debug: object tracing sanity test includes thread monitor.
Change-Id: Ic57ed69374b2075bcdf5cd5d72b83b03b59fbac5
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:10:23 +00:00
Anas Nashif 63ec21c451 Revert "tests: Add test for microkernel early sleep functionality"
This reverts commit b1a0041de6.

This breaks sanitychecks in CI. The early_sleep kernel test case is failing
randomly.

Change-Id: I129b649f7010da90f52616f6fd63eec8b63f8247
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 22:09:42 +00:00
Anas Nashif 3d9759c9c5 Revert "sanitychecks: skip early_sleep test"
This reverts commit f9d1d56153.

This breaks sanitychecks in CI. The early_sleep kernel test case is failing
randomly.

Change-Id: I4b21f926198af9f0703f042fc170226ed6ab4331
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 22:09:31 +00:00
Juan Manuel Cruz 83cbf63431 debug: sanity test for kernel object tracing
Adds the sanity test to integrate the kernel object tracing
API. The test implements the philosophers demo and adds
an additional test thread that uses the kernel object tracing
API and test for the correct output.

Change-Id: I2f01f7b3386afd4783ae58b5311eb7d6ee5a3cea
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
Origin: Original
2016-03-11 22:07:15 +00:00
Anas Nashif f9d1d56153 sanitychecks: skip early_sleep test
Test fails in CI, disabling until we have a resolution.

Change-Id: Ie8e1ca00b08238c2c2a4feefbe08140c762e6d2f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 11:40:49 -05:00
Luiz Augusto von Dentz f206d86c10 Bluetooth: GAP: Add service sample
This adds a GAP service sample and make use of it in shell test which had
a copy of this code.

Change-Id: I5f03fb7db5349236e41bc30eb884c134136439e3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-11 11:32:13 +02:00
Dmitriy Korovkin b1a0041de6 tests: Add test for microkernel early sleep functionality
Test verifies that a task_sleep() function can be used during the system
initialization, then it tests that when the k_server() starts, task_sleep()
call makes another task run.

For fibers, test that fiber_sleep() called during the system
initialization puts a fiber to sleep for the provided amount of ticks,
then check that fiber_sleep() called from a fiber running on the
fully functioning microkernel puts that fiber to sleep for the proiveded
amount of ticks.

Change-Id: Ibe20ca1ca966575aaaad0b6ffd66ca43512801f0
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-10 18:39:33 +00:00
Andrei Emeltchenko 489b0ff793 Bluetooth/shell: Clear subscription on gatt_unsubscribe()
Clear subscription allowing to test subscribe / unsubscribe in
sequence.

Change-Id: Ife8b994410107f05c23687e3fb23b4a81cad8ce7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-10 15:40:36 +00:00
Andrei Emeltchenko 1ec4ec237b Bluetooth/shell: Print handle in hex instead of decimal
Change-Id: Id8654b5c58c3d4f3f157725e550091dd112de4a0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-03-10 15:40:21 +00:00
Grzegorz Kolodziejczyk 2c121675f5 Bluetooth: tester: Add support for get supported l2cap commands
This adds support for get supported commands of l2cap service.

Change-Id: Ic3e2b6502c05a5784d1fd01af0e47cce11e6d2c9
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-03-09 10:21:46 +00:00
Grzegorz Kolodziejczyk 5d74aecf52 Bluetooth: tester: Add initial support for l2cap service
This patch adds initial declaration of l2cap service in tester
application.

Change-Id: I9bd729bc351b2fe135e7b5b80262b45eaf70b10b
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-03-09 10:21:17 +00:00
Szymon Janc 6116d58b02 Bluetooth: Use bt_auth_cancel for pairing cancel
bt_auth_cancel can be used to cancel any type of pairing.

Change-Id: Ia1a6ba834186ab6d5082d3eb473319c2d70cf4a7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-03-08 15:38:59 +00:00
Mariusz Skamra 9e5854c16c Bluetooth: tester: Refactor adding attributes to the GATT database
This patch makes adding attributes more clean.
Attribute UUID and user data are now added along with the attribute
in gatt_db_add function. Thanks to that, some static variables have
been deleted, and the code is more readable.

Change-Id: I510bd7a1a9ae0210dd90520212a340ee1a3b2b53
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-07 18:21:52 +00:00
Anas Nashif e81053ee03 samples/tests: remove old message about standard security
Change-Id: I52bb6731a8c7b2c3ba38b867ac57ff82332ae7f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-07 16:07:35 +00:00
Andrew Boie 7393a00a5f test_bitfield: exercise sys_*_bit and sys_bitfield_*_bit
Origin: original code
Change-Id: I16c324e1124a58d77386236f4c0cc597041c220e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-04 15:12:07 +00:00
Andrew Boie b54355050d REVERTME: bluetooth: tests: disable some tests
bluetooth/shell and bluetooth/tester need to be disabled on
galileo and minnowboard respectively. On these platforms,
the IRQ for the UART console and the H4 are the same IRQ line.
IRQ_CONNECT() is being called on the same IRQ line twice, and
it's only through linker luck that these tests work at all
since one driver will "win" when the mapping is set up at build
time by gen_idt.

gen_idt was supposed to break the build in this situation but
was bugged. The next patch in the series fixes gen_idt.

Change-Id: Ib4a42b57181731121dfad50606c8362a9fd0277d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03 10:24:25 +00:00
Mariusz Skamra 8a186d4eab Bluetooth: tester: Fix missing le to host order conversion
This fix missing conversion of CEP properties.

Change-Id: Ibdf9fecdb3e21e8fd5e2b7ccacb88ae2abd81776
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-03 08:18:39 +00:00
Mariusz Skamra 9055bfe58f Bluetooth: tester: Fix missing bit in GAP supported commands
GAP_CONNECT bit was missing in supported commands.

Change-Id: I9d009c55327ae67bed38c45b7c11fb67665e1cd0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-02 11:38:00 +01:00
Mariusz Skamra c76bd33d61 Bluetooth: tester: Fix supported commands to use uint8_t array
Fixes endianess issues.

Change-Id: I9c308187d34a832cc875c9037235cedc8bee033c
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-02 11:38:00 +01:00
Mariusz Skamra 0abe6e85ba Bluetooth: btp: Fix BTP GATT command opcodes
This patch makes opcodes to be in the sequence.
Supported commmands is form now uint8_t array, so this resolves
the problem with endianess as well.

Change-Id: I602a58081948dbbf5e0d83cbb12a118a5990b9f8
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-03-02 11:38:00 +01:00
Peter Mitsis e0f8162a8b test: Add nanokernel test_sleep project
The 'test_sleep' nanokernel project tests the following functionality:
   1. Normal expiration of fiber_sleep()
   2. Waking a sleeping fiber via fiber_fiber_wakeup()
   3. Waking a sleeping fiber via isr_fiber_wakeup()
   4. Waking a sleeping fiber via task_fiber_wakeup()
   5. Normal expiration of task_sleep()

Change-Id: Ie51997ace9a4413f62d77daacd6dff97b6b3a4dd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis 06e2b4e129 nanokernel: Change fiber_delayed_start() return type
Instead of returning a 'void *', the nanokernel fiber_delayed_start()
family of routines now return a handle of type nano_thread_id_t.

Consequently, the nanokernel fiber_delayed_start_cancel() family of
routines now accept a parameter of type nano_thread_id_t instead of
'void *'.

The complete list of affected nanokernel routines is:
    fiber_delayed_start()        fiber_delayed_start_cancel()
    fiber_fiber_delayed_start()  fiber_fiber_delayed_start_cancel()
    task_fiber_delayed_start()   task_fiber_delayed_start_cancel()

Change-Id: Ibd4658df3ef07e79a81b7643a8be9ea5ffe08ba0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Mariusz Skamra 084405c2c4 Bluetooth: tester: Remove set_ccc_value helper
CCC user data is already available on the initialization
(struct bt_gatt_ccc_cfg and ccc_cfg_changed callback).

Change-Id: Id06c69b6da33f651bc049983179cd6fe3bc197d6
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:50 +00:00
Mariusz Skamra e561f7c021 Bluetooth: tester: Refactor gatt_buf_add and gatt_buf_reserve functions
This removes a bit of redundant code.
gatt_buf_reserve can call gatt_buf_add with data set to NULL, to
reserve space on gatt_buf.

Change-Id: I533a515bbd022a07ba8e2bfb3cd07e1a9ff8878b
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:34 +00:00
Mariusz Skamra 9d862b2a61 Bluetooth: tester: Fix initialization of static variables
Static variables are already initialized to zero.

Change-Id: I8da4b6d93192f5534fbe55622c4ee890c0297de1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:16 +00:00
Mariusz Skamra cd272cadfb Bluetooth: tester: Use BT_UUID defines for UUID comparisons
Defined BT_UUID for the header can be used instead of struct member.

Change-Id: I55ca069d04622450e4fbb1e3f7abf6fdef2f8f30
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-22 10:09:05 +00:00
Johan Hedberg bab3b49fdb Bluetooth: Change GATT callback return values to ssize_t
Since the return value of these callbacks is a number of bytes ssize_t
is more appropriate than int.

Change-Id: I3406fb382975d62f51e7a195666d0ae88364fd2c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-20 15:39:33 +00:00
Johan Hedberg dfaafb204f Bluetooth: Use BIT() macro wherever possible
Instead of manually creating bit shifts for individual bits use the
BIT() macro that exists for this purpose.

Change-Id: I599ecc16b3a2cffe8a355e19816c405e51937e91
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-19 10:47:29 +02:00
Mariusz Skamra fc7bc7cffb Bluetooth: tester: Use common write without response command handler
There is no point having separate handlers for signed writes and
write without response commands because both call the same,
bt_gatt_write_without_response function.

Change-Id: Ib033ffb77e2123dd565e8f1119ef668253f810f9
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-18 11:41:11 +01:00
Anas Nashif 1e57226ae6 boards: remove obsolete CTB board
This board is not supported and not available for general public.
Use the Quark SE CRB/Devboard instead.

Change-Id: Id0f8c08bbacb812ef00fe9502b4acecf4f31ffd7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 17:07:08 +00:00
Johan Hedberg a72d967d33 Bluetooth: GATT: Expose ATT error codes to application callbacks
Introduce BT_GATT_ERR macro to make it possible for application
callbacks to return exact ATT error codes.

Change-Id: I971536508e75036fbddc40b3f33e5201e11940bc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-17 15:05:34 +00:00
Mariusz Skamra 89fbdeef9a Bluetooth: btp: Fix permission bits
This splits Authorization permission to Read with Authorization
and Write with Authorization.

Some attribites may be readable with no authorizarion, but writable
with authorization defined by a higher layer specification or be
implementation specific (eg. Server Characteristic Configuration
Descriptor).

Change-Id: I341a7095c1e8db1dea92cdeebf76c5a2307a49a1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-17 14:09:25 +00:00
Andrei Emeltchenko 92cd5c9529 drivers/nble: Decrease shell debug
Makes shell output readable by disabling extensive debug from UART
driver.

Change-Id: Ic8df252c8ca4abd6b021db11d266f4db80df4b09
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 15:44:32 +00:00
Szymon Janc ea085c4b47 tests: Fix Bluetooth tests and samples platform blacklisting
To exclude platform platform_exclude=foo should be used and not
platform_whitelist=!foo.

Change-Id: I4cddcd3b73e0bd8c42a0726776f8237ebd79a6ae
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-15 15:06:53 +00:00
Szymon Janc 3e00c7ad0e tests: Simplify test_bluetooth configuration
Use common config for tests and use testcase.ini for defining micro
and nano kernel variants.

Change-Id: I47453cd49696dd496cc728cc1eb2eba9cf7f1c6c
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-15 12:57:57 +01:00
Szymon Janc c5d2e76048 Bluetooth: Merge init_h5 into init test
There is no need to have spearate app for H5 testing as init test can
use multiple configuration targets.

Change-Id: I467b5939ae914e7c1ac22fdac24d8b0b6ed3f1cf
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-15 09:40:30 +01:00
Anas Nashif 8afd0c993f samples: move bluetooth shell/init to tests
Combine both nano and micro tests and cleanup whitelisting
for the testcases to include all buildable boards.

Change-Id: I28d41b82fb60d75d4b172d9dd3ac7e71480053b8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-14 19:25:31 +00:00
Johan Hedberg 1589a22650 Bluetooth: samples: Move init and shell to tests
The init, init_h5 and shell are not really samples but fit better in
the test category.

Change-Id: Id1a7ff31ad8767f858705bd952311cf64ff1f3f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-12 10:46:32 +02:00
Anas Nashif 790d2457c6 move benchmark applications to tests/benchmark/
Change-Id: I637331f89442816442c1cc4fbad72177bbe7e94b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 2250c4d397 tests: test_fifo: unify nano and micro tests into one directory
Manage this test using one testcase.ini for both nano and micro
kernel cases.

Change-Id: I9757299cdced17e7fcbfa1fbbbcf87693b48bf41
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif d746f2726f test_rand32: only microkernel version exist
eliminate one directory level since we only have one kernel variant.
Remove one level in the hierarchy.

Change-Id: I0924b5a40357b1a892f7ed3ecf512f617edc99a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 7e44279399 test_ring_buf: only nanokernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: I53dc387c15c6a6efc74f88c477015b2e422c5d6c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif bc19b72974 test_task_priv: only microkernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: I72597e8253d027cd134dd58cc3051f21dce376d0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 1642796202 test_task_irq: only microkernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: Ia9f457db372729f403be24c7a502a896623db5b9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 8bbf02d3f3 test_task: only microkernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: I7d7c31e7dc5b98ad8ea0ad9e17a05694ac89770a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 65f538238b move driver samples to samples/drivers
All SoC specific driver tests go to samples/drivers.

Change-Id: Ia9aa2140465320a548504ddb7a44569e2d2af6bd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 74df249dd8 move net/buf test under tests/
This test should be under tests and is not a sample.

Change-Id: Ibb42207f72554516a650625a2cf4cc9cb7a0b021
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 18cc4a8ea3 move sample apps to top level directory under samples/
All 'real' sample application now reside under samples/ directly.
the nano and micro variants will be under the specific sample directory
and not split across the file system.

Change-Id: I0ddf929cff7a29749aa4944b4385af058d9cc74c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 8290b4c795 move include directory for tests cases to tests/
Make the test case routines reside under tests.

Change-Id: Iea59a68e8b537954250d63923a88df267639e716
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:08:08 +00:00
Anas Nashif 0d63b2eada tests: move aio and i2c driver build tests
Move aio and i2c driver test cases to tests/ and change Makefiles
accordingly where applicable.

Change-Id: I28f24997f147dcd188973555df6024c44f3fb6e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:07:30 +00:00
Anas Nashif 13b3727e6e tests: move kernel tests to tests/
Move all kernel testcases to tests/ and change Makefiles
accordingly where applicable.

Change-Id: I130cc3919174e93b7130d55fb101bed1d5d7552d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:06:33 +00:00
Anas Nashif 2e4de760be tests: move bluetooth tests to tests/
Move all bluetooth testcases to tests/ and change Makefiles
accordingly where applicable.

Also fix Makefile to make some variables overridable and reduce
level of whitelisting in testcase.ini.

Change-Id: Ia71ee1fbbb238c45280b1e3c4747ca2f748f5263
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:00:35 +00:00
Anas Nashif 7c35c6b524 tests: move crypto tests to tests/crypto
Put all tests under tests/crypto

Change-Id: Id64f0f39f7a7c6dba40161db3d8335febf545905
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:00:35 +00:00