Commit graph

1715 commits

Author SHA1 Message Date
Itankar, Piyush T d17a803dc9 Bluetooth: Init: Updated filiter options for test_20
Added filter options to avoid building for the Arduino_101
and Quark_se ARC core as there is not enough RAM to run this
test.

Change-Id: I0c1172714c9827e632648fcedc67555251f25769
Signed-off-by: Itankar, Piyush T <piyush.t.itankar@intel.com>
2016-09-15 14:48:22 +05:30
Flavio Santes 73b086caa7 tinycrypt: Add test case for the CTR PRNG algorithm
This commit adds the test case for the CTR PRNG algorithm.

Origin: https://github.com/01org/tinycrypt/tree/v0.2.0

The code was refactored to eliminate malloc and free function
calls and checkpatch errors. However, many warnings are still
present. Refactoring history is available at:

Repo:	https://gitlab.com/santes/tinycrypt/commits/refactoring
Commit:	5d0482c26c4ad69e7854dde58d15bb57a3e5f18f

Jira: ZEP-614
Jira: ZEP-860

Change-Id: I0620868d092941931762718c81fe13fc01f251b2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-15 03:36:14 +00:00
Anas Nashif 01a3e442e8 tests: move test code from samples to tests
Jira: ZEP-760
Change-Id: I3afa847864f9a593696ee832f291f438fd291f8e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-14 15:34:17 +00:00
Mariusz Skamra 044e15743d Bluetooth: tester: Add support for L2CAP send data command
Adds support for handling L2CAP send data command.

Change-Id: I120a9ed56506ce205e32c5efe15c5d967d7726b6
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Grzegorz Kolodziejczyk a4f526fb6b Bluetooth: tester: Add support for L2CAP listen command
This patch adds support for handling L2CAP listen command.

Change-Id: I2c9c27f925c923a14ddb28b41fbefd612b32d63a
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Grzegorz Kolodziejczyk c4957ea0e8 Bluetooth: tester: Add support for L2CAP disconnect commands
This patch adds support for handling L2CAP disconnect command.

Change-Id: If6f8f3a7485dc8ae270481ed6af4f0a4d4c69fac
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Grzegorz Kolodziejczyk 086eac4344 Bluetooth: tester: Add support for L2CAP connect command
This patch adds support for handling L2CAP connect command.

Change-Id: I95d27831f65ed6a3e02e1d6e7583baa6890b588c
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Benjamin Walsh 87f1232770 unified/tests: tag working some tests kernel as 'unified_capable'
This allows running the sanitycheck with:

  --tag unified_capable -x KERNEL_TYPE=unified

to run the unified kernel with the tests it is currently known to be
able to run.

Change-Id: Ic145fc6adca162745887672372226fd67447b34a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 8011221712 unified/test_mutex: adapt to run on unified kernel
- Use a more limited range of priorities, since the current
  implementation of the unified kernel only works with 32 priorities
  total. Instead of starting at 10 and going up by 5 up to  50, start
  at 5 and go up by 1 up to 12.

- The definition of kmutex_t has changed from a uint32_t to a struct
  k_mutex *, causing this to not work anymore:

    const kmutex_t private_mutex;

  since this makes the object constant instead of the reference to it.
  Private object must be referenced like this instead:

    kmutex_t const private_mutex;

  since const is left-associative.

Change-Id: I9d70bfa3944ea46033a6b49251a4993e9bd2b588
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 2a669da7bc unified/test_fp: mark test so that it runs the nanokernel version
The test does not run out-of-the-box currently, mark it with a #error.

Change-Id: Ia720c674290e59e95db1c2948c508c0464caa672
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 68a8059603 unified/test_sema: fix isr wrapper names
isr wrapper names conflicted with real kernel APIs.

Change-Id: Ia85245fcd3025f9d15175523982883e16e97010c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 45054a6e02 unified: Fix test_sema/microkernel
Fixes test_sema/microkernel so that the variable assigned the return
value from task_sem_group_take() is of type 'ksem_t' instead of 'int'.

Work by: Peter Mitsis <peter.mitsis@windriver.com>

Change-Id: Iee9f321a6bd51ca3bc0cd8b0c7eceae8a5bf7ce0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 3bcd880594 unified/test_timer: adapt for unified kernel
Test is poking into microkernel private data structuresa, but the
unified kernel provides an API to retrieve that value.

Abstract the call in the microkernel case to minic the unified kernel
API.

Work by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>

Change-Id: Ic3195d470fda178164268d9c71c55a2a6daa61a3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh c24d844eec unified/test_pipe: adapt to not use sem groups
Not available yet on unified kernel.

Change-Id: I70c7c07ab26a66b7a89246a335fa2af0db2ec72c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh cda52c7adb unified/test_mail: adapt test to not use sem groups and mem pools
Not available on unified kernel yet.

Change-Id: I834482f3ad94d1c6ecc67c70c1fce78e43db31c5
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 6f4b9a64cf unified/test_context: adapt test to run on unified kernel
Fixing issues with the test itself really:

- reply_timeout semaphore was not initialized, causing its limit value
  to be 0 on unified kernel

- There is no API to set a fiber's priority after it is started in a
  nanokernel. However, tcs.prio can be written to and this works without
  issues. On unified kernel, this does not work however because the
  thread has to move between linked lists representing each priority in
  the ready queue.

Change-Id: I3c5585da05cbc4ac3d2f0f9ae0297d24d41b1309
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Andrew Boie c579ca43ac test_context: use correct timer IRQ for mint valley
LOAPIC timer driver is used by both LOAPIC and MVIC, but the
correct #define needs to be used for the IRQ line.

Issue: ZEP-848
Change-Id: Ib682dd95c08ba437d1ff409e0e0352944d13b633
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:21 +00:00
Anas Nashif 44362df31d boards: ia32_pci is long gone, use galileo instead
Change-Id: Id60593cfa900a7a14a3a3be6f3870112bd506b2b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:28:46 +00:00
Anas Nashif c7faacf3d6 samples: move pci tests to tests/
Change-Id: Ibeb50b25b2f897dc1be87aa0739ef3f31d9015e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:26:06 +00:00
Anas Nashif 1ecbea283c samples: move spi tests to tests/
Change-Id: I8d4a50bcbf479c35ccb209fbb04b5b1095075933
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:26:06 +00:00
Vinicius Costa Gomes 3a53a73d8f tests: Add simple CoAP tests
Change-Id: I3d7b11ac5a623eab8e07d484b60c24c8a9a824f1
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:24 +00:00
Genaro Saucedo Tejada 59b06e2860 fix: previously uninitialized variables break DEBUG sanity
Fix several compiler warnings that were preventing sanity from
completing successfully when running with the CONFIG_DEBUG=y setting.
(related to compiler flag -Werror=maybe-uninitialized)

JIRA: ZEP-735

Change-Id: I3cb79eb0f254f15d18f18ace50b0cf24e9ef5f10
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-09-12 02:25:22 +00:00
Qiu Peiyang cf0efbb51f drivers/pinmux: delete deprecated PINMUX_DEV_QUARK_MCU
CONFIG_PINMUX_DEV_QUARK_MCU is deprecated and QUARK MCU support
is replaced by CONFIG_PINMUX_DEV_QMSI. So delete this deprecated
CONFIG option.

Change-Id: I2cad6cfd4344386a00d45a579e8cc586935b041f
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2016-09-12 02:08:08 +00:00
Johan Hedberg 5ada33a862 Merge bluetooth branch to master
Main changes:

 - Introduce support for a native Bluetooth controller implementation. Current
   supported controller is the nRF52, with nRF51 soon to follow.
 - Initial support for the RFCOMM protocol
 - New raw HCI interface to enable exporting HCI externally
 - New sample application to expose HCI over USB (using the new raw API)
 - Close-to-complete BR/EDR L2CAP implementation
 - Cross-transport key derivation support from LE to BR/EDR

-----------------------------------------------------------------------------
Andrei Emeltchenko (8):
      Bluetooth: Simplify configuration and fix warnings
      Bluetooth: Add RAW API interface to Bluetooth
      Bluetooth: Add documentation to HCI RAW interface
      Bluetooth: Export USB HCI controller using RAW HCI channel
      Bluetooth: Include btusb sample to sanity check
      Bluetooth/drivers: Fix missing argument in printf for h5 driver
      Bluetooth/samples: Fix missing argument in printf for btusb
      drivers/nble: Rename nrf51 power management functions

Arkadiusz Lichwa (8):
      Bluetooth: L2CAP: Make common RTX commands timer
      Bluetooth: L2CAP: Initialize & cleanup RTX timer on BR/EDR
      Bluetooth: L2CAP: Add RTX timer for 'get info' command
      Bluetooth: L2CAP: Add RTX timer for 'configuration' command
      Bluetooth: L2CAP: Add RTX timer for 'disconnect' command
      Bluetooth: L2CAP: Refactor connection security handler
      Bluetooth: L2CAP: Fix reset channel state context
      Bluetooth: L2CAP: Implement connect command on BR/EDR

Carles Cufi (7):
      Bluetooth: Cleanup and extend HCI header
      Bluetooth: Controller: Use offsetof() in memory sizing
      Bluetooth: Controller: Unify handling of unknown command
      Bluetooth: Controller: Unify handling of CC and CS
      Bluetooth: HCI: Rename cmd complete struct
      Bluetooth: HCI: Add definitions and macros
      Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling

Grzegorz Kolodziejczyk (1):
      Bluetooth: tester: Add L2CAP init method

Jaganath Kanakkassery (23):
      Bluetooth: L2CAP: Implement bt_l2cap_br_chan_send()
      Bluetooth: RFCOMM: Initialize and register to L2CAP
      Bluetooth: RFCOMM: Implement Register Server channel API
      Bluetooth: RFCOMM: Init buffer for outgoing signalling packets
      Bluetooth: RFCOMM: Handle signalling connection request
      Bluetooth: RFCOMM: Handle PN request
      Bluetooth: RFCOMM: Handle incoming dlc request
      Bluetooth: shell: Add support for RFCOMM test
      Bluetooth: RFCOMM: Move rfcomm_make_uih_msg() up
      Bluetooth: RFCOMM: Perform MSC transaction after dlc
      Bluetooth: RFCOMM: Handle data and credit from peer
      Bluetooth: RFCOMM: Fix cr bit of address in MSC response
      Bluetooth: L2CAP: Disable fragmentation of rx pdu
      Bluetooth: RFCOMM: Implement send data API
      Bluetooth: shell: Add support for RFCOMM send data
      Bluetooth: Kconfig: Add default for L2CAP_IN_MTU if BREDR is enabled
      Bluetooth: RFCOMM: Introduce helper to create rfcomm pdu
      Bluetooth: RFCOMM: Introduce Kconfig for max L2CAP MTU
      Bluetooth: shell: Use bt_rfcomm_create_pdu() in RFCOMM send
      Bluetooth: RFCOMM: Fix BT_RFCOMM_BUF_SIZE to include FCS and len
      Bluetooth: RFCOMM: Remove BT_RFCOMM_SEND_RESERVE
      Bluetooth: RFCOMM: Implement TX flow control
      Bluetooth: RFCOMM: Modify bt_rfcomm_dlc() to return dlc

Johan Hedberg (13):
      Bluetooth: monitor: Fix condition for disabling UART interrupts
      Bluetooth: Fix race condition when initializing ECC FIFO
      Bluetooth: Add missing guards to hci_raw.h header file
      Bluetooth: Controller: Fix coding style in ctrl.c, util/ and main.c
      Bluetooth: Kconfig: Remove unnecessary default conditionals
      Bluetooth: Make lmp_ext_feat_capable() more generic
      Bluetooth: Fix reading local features
      Bluetooth: Fix feature page count for single-mode configuration
      Bluetooth: Clean up feature test macros
      Bluetooth: ATT: Fix usage of unsupported %zu format specifier
      Bluetooth: Kconfig: Be consistent with the use of tabs vs spaces
      MAINTAINERS: Fix path for BLUETOOTH CONTROLLER
      Bluetooth: GATT: Fix unaligned access to CCC value

Jonathan Gelie (1):
      Bluetooth: Enable and disable BLE chip sleep mode dynamically

Kaustav Dey Biswas (1):
      Bluetooth: UUID: Add 32bit UUID support

Luiz Augusto von Dentz (7):
      Bluetooth: eddystone: Add timeout to deactivate configuration mode
      Bluetooth: GATT: Add queuing support
      Bluetooth: UUID: Add HID Service
      Bluetooth: Add service sample for HoG
      Bluetooth: Add sample implementing HIDS
      Bluetooth: HoG: Require authentication for connections
      Bluetooth: GATT: Fix unaligned accesses

Mariusz Skamra (1):
      Bluetooth: btp: Extend BTP specification to cover L2CAP tests

Ricardo Salveti (1):
      board: nrf52_nitrogen: Include BLE controller by default

Szymon Janc (22):
      Bluetooth: Split keys into LE and BR/EDR specific storage
      Bluetooth: SMP: Remove not needed stubs from NULL backend
      Bluetooth: Mark AES encrypted BR/EDR link as FIPS security level
      Bluetooth: SMP: Add helper for notifying pairing complete
      Bluetooth: SMP: Refactor keys distribution bitfields
      Bluetooth: SMP: Add support for Link Key derivation
      Bluetooth: SMP: Add self test for H6 function
      Bluetooth: Fail on init if BR/EDR is enabled but not supported
      Bluetooth: L2CAP: Remove mask from struct bt_l2cap_fixed_chan
      Bluetooth: L2CAP: Use BIT macro for supported BR/EDR fixed channels
      Bluetooth: L2CAP: Make bt_l2cap_br_fixed_chan_register global
      Bluetooth: Set BR/EDR device name on init
      Bluetooth: tests/shell: Set same name on BR/EDR and LE
      Bluetooth: tests/shell: Add dedicated BR/EDR config
      Bluetooth: tests/shell: Remove not needed RFCOMM option from config
      Bluetooth: Fix typo in code comment
      Bluetooth: Build RFCOMM documentation
      Bluetooth: Refactor Link Key notification event handling
      Bluetooth: Add support for P256 Link Keys
      Bluetooth: Read local extended features on init
      Bluetooth: Enable Secure Connections if supported
      Bluetooth: Move reading extended features to BR/EDR section of init

Vinayak Chettimada (22):
      soc: Use nrf.h instead of nrf52.h and nrf52_bitfields.h
      Bluetooth: Fix race condition between ecc_send and ecc_task
      MAINTAINERS: Add BLUETOOTH CONTROLLER section
      Bluetooth: Controller: Hardware abstraction layer for nRF5x radio
      Bluetooth: Controller: Add a util folder with basic primitives
      Bluetooth: Controller: Add initial HCI implementation
      Bluetooth: Controller: A full, hardware-agnostic BLE Link Layer
      Bluetooth: Controller: Add BLE controller driver
      board: nrf52_pca10040: Include BLE controller by default
      Bluetooth: tests: Add BLE controller init tests
      Bluetooth: Controller: Fix coding style, use of (void)
      Bluetooth: Controller: Fix assert on advertise start
      Bluetooth: Controller: Fix memory required calculation macro
      Bluetooth: Controller: Fix deadlock in recv fiber
      Bluetooth: GATT: Fix notifications to non-bonded peers
      misc/byteorder.h: Add sys_get_le64 interface
      Bluetooth: Add LE read supported states
      Bluetooth: Controller: Measure and use correct stack size
      Bluetooth: Controller: Enable all supported LE states
      Bluetooth: GAP: Support multiple peripheral role connections
      Bluetooth: GATT: Fix ccc cfg leak
      Bluetooth: Controller: alternate ticker compare set logic

 MAINTAINERS                                     |    6 +
 arch/arm/soc/nordic_nrf5/nrf52/soc.h            |    3 +-
 boards/nrf52_nitrogen/nrf52_nitrogen_defconfig  |    4 +
 boards/nrf52_pca10040/nrf52_pca10040_defconfig  |    4 +
 doc/api/bluetooth.rst                           |   19 +
 drivers/bluetooth/Kconfig                       |   13 +-
 drivers/bluetooth/Makefile                      |    1 +
 drivers/bluetooth/controller/Kconfig            |   39 +
 drivers/bluetooth/controller/Makefile           |   18 +
 drivers/bluetooth/controller/hal/ccm.h          |   31 +
 drivers/bluetooth/controller/hal/clock.c        |  230 +++++
 drivers/bluetooth/controller/hal/clock.h        |   26 +
 drivers/bluetooth/controller/hal/cpu.h          |   30 +
 drivers/bluetooth/controller/hal/debug.h        |  233 +++++
 drivers/bluetooth/controller/hal/ecb.c          |  188 ++++
 drivers/bluetooth/controller/hal/ecb.h          |   45 +
 drivers/bluetooth/controller/hal/hal_irq.h      |   27 +
 drivers/bluetooth/controller/hal/hal_rtc.h      |   27 +
 drivers/bluetooth/controller/hal/hal_work.h     |   33 +
 drivers/bluetooth/controller/hal/irq.c          |   53 +
 drivers/bluetooth/controller/hal/radio.c        |  552 ++++++++++
 drivers/bluetooth/controller/hal/radio.h        |  108 ++
 drivers/bluetooth/controller/hal/rand.c         |  125 +++
 drivers/bluetooth/controller/hal/rand.h         |   25 +
 drivers/bluetooth/controller/hal/rtc.c          |   68 ++
 drivers/bluetooth/controller/hci/hci.c          | 1979 ++++++++++++++++++++++++++++++++++++
 drivers/bluetooth/controller/hci/hci.h          |   26 +
 drivers/bluetooth/controller/ll/ctrl.c          | 7407 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/bluetooth/controller/ll/ctrl.h          |  255 +++++
 drivers/bluetooth/controller/ll/ctrl_internal.h |  239 +++++
 drivers/bluetooth/controller/ll/ll.c            |  295 ++++++
 drivers/bluetooth/controller/ll/ll.h            |   39 +
 drivers/bluetooth/controller/ll/pdu.h           |  260 +++++
 drivers/bluetooth/controller/ll/ticker.c        | 1538 ++++++++++++++++++++++++++++
 drivers/bluetooth/controller/ll/ticker.h        |  138 +++
 drivers/bluetooth/controller/main.c             |  400 ++++++++
 drivers/bluetooth/controller/util/defines.h     |   34 +
 drivers/bluetooth/controller/util/mem.c         |  196 ++++
 drivers/bluetooth/controller/util/mem.h         |   35 +
 drivers/bluetooth/controller/util/memq.c        |   96 ++
 drivers/bluetooth/controller/util/memq.h        |   25 +
 drivers/bluetooth/controller/util/util.c        |  134 +++
 drivers/bluetooth/controller/util/util.h        |   26 +
 drivers/bluetooth/controller/util/work.c        |  168 ++++
 drivers/bluetooth/controller/util/work.h        |   38 +
 drivers/bluetooth/h5.c                          |    2 +-
 drivers/bluetooth/nble/gatt.c                   |    5 +-
 drivers/bluetooth/nble/gatt_internal.h          |    6 +-
 drivers/bluetooth/nble/uart.c                   |   10 +-
 drivers/bluetooth/nrf51_pm.c                    |    6 +-
 drivers/bluetooth/nrf51_pm.h                    |    4 +-
 include/bluetooth/att.h                         |   18 +
 include/bluetooth/gatt.h                        |   27 +-
 include/bluetooth/hci.h                         |  653 ++++++++----
 include/bluetooth/hci_raw.h                     |   64 ++
 include/bluetooth/l2cap.h                       |    6 +-
 include/bluetooth/rfcomm.h                      |  162 +++
 include/bluetooth/uuid.h                        |   50 +
 include/misc/byteorder.h                        |   15 +
 net/bluetooth/Kconfig                           |  121 ++-
 net/bluetooth/Makefile                          |   21 +-
 net/bluetooth/att.c                             |  298 +++---
 net/bluetooth/att_internal.h                    |   13 +-
 net/bluetooth/conn.c                            |   50 +-
 net/bluetooth/conn_internal.h                   |   16 +-
 net/bluetooth/gatt.c                            |   60 +-
 net/bluetooth/hci_core.c                        |  405 +++++---
 net/bluetooth/hci_core.h                        |   18 +-
 net/bluetooth/hci_ecc.c                         |   19 +-
 net/bluetooth/hci_raw.c                         |  142 +++
 net/bluetooth/keys.c                            |   96 +-
 net/bluetooth/keys.h                            |   55 +-
 net/bluetooth/keys_br.c                         |   85 ++
 net/bluetooth/l2cap.c                           |   29 +-
 net/bluetooth/l2cap_br.c                        |  431 +++++++-
 net/bluetooth/l2cap_internal.h                  |   18 +-
 net/bluetooth/monitor.c                         |    2 +
 net/bluetooth/rfcomm.c                          |  728 ++++++++++++++
 net/bluetooth/rfcomm_internal.h                 |  125 +++
 net/bluetooth/smp.c                             |  241 ++++-
 net/bluetooth/smp_null.c                        |    9 -
 net/bluetooth/uuid.c                            |   10 +
 samples/bluetooth/README                        |    5 +
 samples/bluetooth/btusb/Makefile                |    5 +
 samples/bluetooth/btusb/prj.conf                |   10 +
 samples/bluetooth/btusb/src/Makefile            |    3 +
 samples/bluetooth/btusb/src/btusb.c             |  725 ++++++++++++++
 samples/bluetooth/btusb/testcase.ini            |    5 +
 samples/bluetooth/eddystone/src/main.c          |   40 +-
 samples/bluetooth/gatt/hog.c                    |  178 ++++
 samples/bluetooth/gatt/hog.h                    |   21 +
 samples/bluetooth/peripheral_hids/Makefile      |    7 +
 samples/bluetooth/peripheral_hids/prj.conf      |    7 +
 samples/bluetooth/peripheral_hids/prj.mdef      |    5 +
 samples/bluetooth/peripheral_hids/prj_nble.conf |    5 +
 samples/bluetooth/peripheral_hids/src/Makefile  |    4 +
 samples/bluetooth/peripheral_hids/src/main.c    |  155 +++
 samples/bluetooth/peripheral_hids/testcase.ini  |   19 +
 tests/bluetooth/init/prj_controller.conf        |   13 +
 tests/bluetooth/init/prj_controller_dbg.conf    |   25 +
 tests/bluetooth/init/testcase.ini               |   16 +
 tests/bluetooth/shell/prj.conf                  |    3 +-
 tests/bluetooth/shell/prj_br.conf               |   18 +
 tests/bluetooth/shell/src/main.c                |  115 ++-
 tests/bluetooth/shell/testcase.ini              |    9 +
 tests/bluetooth/tester/btp_spec.txt             |  149 +++
 tests/bluetooth/tester/prj.conf                 |    1 +
 tests/bluetooth/tester/prj_nimble.conf          |    1 +
 tests/bluetooth/tester/src/Makefile             |    4 +-
 tests/bluetooth/tester/src/bttester.c           |    9 +
 tests/bluetooth/tester/src/bttester.h           |    3 +
 tests/bluetooth/tester/src/gatt.c               |    9 +-
 tests/bluetooth/tester/src/l2cap.c              |   14 +
 113 files changed, 19979 insertions(+), 860 deletions(-)
 create mode 100644 drivers/bluetooth/controller/Kconfig
 create mode 100644 drivers/bluetooth/controller/Makefile
 create mode 100644 drivers/bluetooth/controller/hal/ccm.h
 create mode 100644 drivers/bluetooth/controller/hal/clock.c
 create mode 100644 drivers/bluetooth/controller/hal/clock.h
 create mode 100644 drivers/bluetooth/controller/hal/cpu.h
 create mode 100644 drivers/bluetooth/controller/hal/debug.h
 create mode 100644 drivers/bluetooth/controller/hal/ecb.c
 create mode 100644 drivers/bluetooth/controller/hal/ecb.h
 create mode 100644 drivers/bluetooth/controller/hal/hal_irq.h
 create mode 100644 drivers/bluetooth/controller/hal/hal_rtc.h
 create mode 100644 drivers/bluetooth/controller/hal/hal_work.h
 create mode 100644 drivers/bluetooth/controller/hal/irq.c
 create mode 100644 drivers/bluetooth/controller/hal/radio.c
 create mode 100644 drivers/bluetooth/controller/hal/radio.h
 create mode 100644 drivers/bluetooth/controller/hal/rand.c
 create mode 100644 drivers/bluetooth/controller/hal/rand.h
 create mode 100644 drivers/bluetooth/controller/hal/rtc.c
 create mode 100644 drivers/bluetooth/controller/hci/hci.c
 create mode 100644 drivers/bluetooth/controller/hci/hci.h
 create mode 100644 drivers/bluetooth/controller/ll/ctrl.c
 create mode 100644 drivers/bluetooth/controller/ll/ctrl.h
 create mode 100644 drivers/bluetooth/controller/ll/ctrl_internal.h
 create mode 100644 drivers/bluetooth/controller/ll/ll.c
 create mode 100644 drivers/bluetooth/controller/ll/ll.h
 create mode 100644 drivers/bluetooth/controller/ll/pdu.h
 create mode 100644 drivers/bluetooth/controller/ll/ticker.c
 create mode 100644 drivers/bluetooth/controller/ll/ticker.h
 create mode 100644 drivers/bluetooth/controller/main.c
 create mode 100644 drivers/bluetooth/controller/util/defines.h
 create mode 100644 drivers/bluetooth/controller/util/mem.c
 create mode 100644 drivers/bluetooth/controller/util/mem.h
 create mode 100644 drivers/bluetooth/controller/util/memq.c
 create mode 100644 drivers/bluetooth/controller/util/memq.h
 create mode 100644 drivers/bluetooth/controller/util/util.c
 create mode 100644 drivers/bluetooth/controller/util/util.h
 create mode 100644 drivers/bluetooth/controller/util/work.c
 create mode 100644 drivers/bluetooth/controller/util/work.h
 create mode 100644 include/bluetooth/hci_raw.h
 create mode 100644 include/bluetooth/rfcomm.h
 create mode 100644 net/bluetooth/hci_raw.c
 create mode 100644 net/bluetooth/keys_br.c
 create mode 100644 net/bluetooth/rfcomm.c
 create mode 100644 net/bluetooth/rfcomm_internal.h
 create mode 100644 samples/bluetooth/btusb/Makefile
 create mode 100644 samples/bluetooth/btusb/prj.conf
 create mode 100644 samples/bluetooth/btusb/src/Makefile
 create mode 100644 samples/bluetooth/btusb/src/btusb.c
 create mode 100644 samples/bluetooth/btusb/testcase.ini
 create mode 100644 samples/bluetooth/gatt/hog.c
 create mode 100644 samples/bluetooth/gatt/hog.h
 create mode 100644 samples/bluetooth/peripheral_hids/Makefile
 create mode 100644 samples/bluetooth/peripheral_hids/prj.conf
 create mode 100644 samples/bluetooth/peripheral_hids/prj.mdef
 create mode 100644 samples/bluetooth/peripheral_hids/prj_nble.conf
 create mode 100644 samples/bluetooth/peripheral_hids/src/Makefile
 create mode 100644 samples/bluetooth/peripheral_hids/src/main.c
 create mode 100644 samples/bluetooth/peripheral_hids/testcase.ini
 create mode 100644 tests/bluetooth/init/prj_controller.conf
 create mode 100644 tests/bluetooth/init/prj_controller_dbg.conf
 create mode 100644 tests/bluetooth/shell/prj_br.conf

Change-Id: I98253a11e4ca6953def3d7a764ca6aa60a7f29ff
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-09-07 16:21:38 +03:00
Anas Nashif 0699191d33 tests: fixed resulting binary name in README
We no longer produce nanokernel.elf or microkernel.elf.

Change-Id: I37cb985ddc90f4129f122b9209d306898a71a596
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-07 12:56:03 +00:00
Grzegorz Kolodziejczyk 81e10314ef Bluetooth: tester: Add L2CAP init method
This adds method which initialize data pool for L2CAP data.

Change-Id: I2b170489aa4b2afc3c1f962591f377e23d147161
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-07 09:08:47 +00:00
Mariusz Skamra de124844b3 Bluetooth: btp: Extend BTP specification to cover L2CAP tests
This adds commands to the Bluetooth Testing Protocol for L2CAP.

Change-Id: Ie9ea180c4db62c238ce1450e5714ffd7b0ca2f5f
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-07 08:17:26 +03:00
Jaganath Kanakkassery 2a3a95b24d Bluetooth: shell: Use bt_rfcomm_create_pdu() in RFCOMM send
Remove BT_RFCOMM_SEND_RESERVE usage since it will be removed
eventually.

Change-Id: Iada20cf0692ae12996e7ed820601bb77fe47d438
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-09-07 08:17:26 +03:00
Jaganath Kanakkassery eb443ddffc Bluetooth: shell: Add support for RFCOMM send data
Sets new command in BT shell app to send data to peer
Syntax:
>br-rfcomm-send <number of packets>

Change-Id: Ic795d007a03f657afb833719ae0e800ca0ac6e0b
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-09-07 08:17:26 +03:00
Luiz Augusto von Dentz 50997f2ccd Bluetooth: GATT: Add queuing support
This adds queueing support for requests that requires a response making
it simpler to use the API. The storage is keep in the parameters of the
request so it is up to the application to define how many can be queued
but in case the application don't want a request to block waiting for
a buffer it can use BLUETOOTH_ATT_REQ_COUNT to control the available
buffers which is recommended in case the requests will be sent from the
RX fiber.

Change-Id: I407c3982a7ecdc4a9eff7172d9d0addd46949783
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-09-07 08:17:26 +03:00
Vinayak Chettimada 8e722ef545 Bluetooth: tests: Add BLE controller init tests
Jira: ZEP-702

Origin: Original
Change-Id: I55fa102069db155e8fd461513abbe898f64d8977
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-07 08:17:26 +03:00
Szymon Janc 1c81bdffc4 Bluetooth: tests/shell: Remove not needed RFCOMM option from config
prj.conf is for single mode LE controllers.

Change-Id: I138a560f4e33f6663135bbcbb4d8aeb5955342a1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-07 08:17:26 +03:00
Szymon Janc ada1b0a594 Bluetooth: tests/shell: Add dedicated BR/EDR config
BR/EDR support in chip is mandatory if BR/EDR is enabled so add
separate config for it. This is to avoid problems when using
single mode LE controller.

Change-Id: I9d9692b89883dd1980803d66818fb6e3a368afb0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-07 08:17:26 +03:00
Jaganath Kanakkassery d19752b955 Bluetooth: shell: Add support for RFCOMM test
Sets new command in BT shell app to allow register one RFCOMM server.
Syntax:
>br-rfcomm-register <Channel>

It also accept the connection from remote and provides dlc object

Change-Id: I99f672ee68785338f3bf22948d4f33b3e1aecd2e
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-09-07 08:17:26 +03:00
Szymon Janc 0b67e04922 Bluetooth: tests/shell: Set same name on BR/EDR and LE
This sets BR/EDR name with same value used over LE.

Change-Id: I29407b0b44907b520b0f39afe868fc612c5e47d4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-07 08:17:26 +03:00
Andrew Boie c545e19a00 x86: remove dynamic interrupts and exceptions
Change-Id: I7e9756e9a0735a7d8257ee2142d5759e883e12cc
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 18:35:24 +00:00
Andrew Boie 0279d9b2cb test_context: don't test dynamic exceptions
This API has been deprecated and scheduled for removal.
It was only implemented on X86, and ARM systems that
aren't XIP.

Static exceptions (only implemented on x86) will
continue to be tested by test_static_idt.

Change-Id: I6d63347ead8200002ee1edd8dd4572b418800400
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 16:15:59 +00:00
Anas Nashif 8229904a00 checkpatch: fix ERROR:POINTER_LOCATION
Change-Id: I1daf382281f50c2fb1254d340dd499ae76513a5d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-08-29 08:47:05 -04:00
Andrew Boie 02261ae401 tests: benchmark: fix incorrect printk() usage
Change-Id: Id08d2e55399401244bfc52277415bc5d4167b288
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 2a8aee133a tests: bluetooth: fix incorrect printk() usage
Change-Id: I9493fddf9d7d1120ae54a58673835c64d2042188
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie d89ddc6441 tests: net: fix incorrect printk() usage
Change-Id: Iee5b94c24e1cce1f3a0e607deee2c5bc73e22d7b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 73e5bfda5a tests: kernel: fix incorrect printk() usage
Change-Id: Id7c18edd93eac71d31eaba628158a2badc306238
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 7853e0a1af tests: crypto: fix incorrect printk() usage
Change-Id: Iec8a3277952287e1a54d0ae67b56e88edc3068a9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 6d2ab0ea11 test_cbc: fix indentation
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.

Change-Id: Iece925ae40cad342fde1e33c240cb2ac23a15a9b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 474a52f730 test_ctr: fix indentation
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.

Change-Id: I7aa5c3f25a800fdaec6852e0d36daa07f1424f9a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 9153996f90 test_hmac: fix indentation
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.

Change-Id: I7294d1cef98031ba4ca1c202e0f19dbb7e504e16
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 5aa94cdd68 test_sha256: fix indentation
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.

Change-Id: I7ecb6dfd602ea4768d6a53e509f29b208d96c479
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 0ef0136a04 tests: test_printk: crude printk test case
Print some stuff, and verify that the output is as expected.
Not comprehensive (yet).

Change-Id: Ib1ce8dff8165d8ee6b02ff6272513fd76a7be842
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andy Ross 72f00d930e Make outdir board-specific to avoid build collisions
Casual building in the tree leads to regular messups where I forget to
clean up the outdir first when switching platforms and the build fails
in strange ways.

Put a $(BOARD) subdirectory under outdir, and use that at $(O) when
the user does not provide an output directory.

Note that "make pristine" continues to remove the entire outdir,
including other architecutres (so as to make the tree pristine).

Also update a few spots where outdir was mentioned in documentation to
clarify the new scheme.

Change-Id: I365eec06ea440f17380b9f9ace5f5d34b9bed4dc
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-08-27 11:48:05 +00:00
Benjamin Walsh e1dad060c3 tests/crypto: rename MICROKERNEL entry from 'mainloop' to 'main'
Microkernels now support 'main' as a task entry point.

Change-Id: I39b07c191a98748191536ade6f87ec02da064bf1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-08-27 10:49:02 +00:00
Benjamin Walsh ab3babcff7 latency test: remove references to unused legacy "KERNEL" preproc flag
Change-Id: I53e9338ecaa42f57e5a58dfecfa36dd6d5ff5815
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-08-27 10:49:01 +00:00
Andrew Boie d02b96d5a7 test_ipm: disable on Quark SE ARC core
This test can't run properly because it already defines
an IPM console sender, and instantiating the dummy one
prevents any messages from being forwarded to the x86 side.

Issue: ZEP-708
Change-Id: Ib13c5df5db67f3d9fde960f8e5cda354c60efae1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-17 20:52:30 +00:00
Andrew Boie d6fb8d3611 Revert "REVERTME exclude test_sha256 on Nios2"
The QEMU bug in the SDK has been fixed.
This reverts commit eb63710960.

Change-Id: Ic405c9df0f7aebb2a9d20180c7b0c04889669610
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-17 20:20:13 +00:00
Andy Ross 5c1011a30a test_sleep: More latency workarounds
We are also seeing qemu failures in the synchronous wakeup tests,
where the fiber should be resuming instantly but in practice sees a
one-tick delay due to the emulation environment not being
deterministic.  Allow one tick of slop in those too.

Change-Id: Idab7c45ea0b10bd955b90a98d3884b5fe0571187
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-08-12 20:36:11 +00:00
Andy Ross 5a8add7821 tests/kernel/{test_task,test_sleep}: Less aggressive timer testing
On some hardware (Qemu) the timer guarantees aren't honored as well as
we like, and these tests are observed to spuriously fail in practice
(e.g. CI testing).  Allow for one tick of slop when testing sleep
durations.

Change-Id: I4b694c0a9ddfc1ee48510fa5deda2bb31499debf
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-08-10 16:42:51 +00:00
Szymon Janc 114985a8a8 Bluetooth: tester: Use SYS_LOG_ERR instead of printk
Change-Id: Ideadc7344dcf7d1cdd550623a02d74c8ad9414f5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-08-10 14:54:19 +00:00
Szymon Janc ffe8f0ccf4 Bluetooth: tester: Fix extra new lines
Change-Id: Ie3de7d7baeaff386f8683624ee1284834495d6de
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-08-10 14:54:19 +00:00
Genaro Saucedo Tejada 58f88179ef sys_log: replace old debug macros at bluetooth tester
Bluetooth tester is now using new system log macros.

JIRA: ZEP-311

Change-Id: I6398f2de12d5ba1073e40fd45aa8e0177d1e279d
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-01 18:39:50 +00:00
Andrew Boie 7027231e9a test_mbedtls: exclude platforms with insufficient RAM/ROM
This will un-break the daily build.

Change-Id: I516ddab4a905d51fb1fd59f7fa009df3511c7076
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 21:22:19 +00:00
Andrew Boie 17c0b372a2 x86: improve exception APIs
Previously, exception stubs had to be declared in assembly
language files. Now we have two new APIs to regsiter exception
handlers at C toplevel:

 _EXCEPTION_CONNECT_CODE(handler, vector)
 _EXCEPTION_CONNECT_NOCODE(handler, vector)

For x86 exceptions that do and do not push error codes onto
the stack respectively.

In addition, it's now no longer necessary to #define around
exception registration. We now use .gnu.linkonce magic such that
the first _EXCEPTION_CONNECT_*() that the linker finds is used
for the specified vector. Applications are free to install their
own exception handlers which will take precedence over default
handlers such as installed by arch/x86/core/fatal.c

Some Makefiles have been adjusted so that the default exception
handlers in arch/x86/core/fatal.c are linked last. The code has
been tested that the right order of precedence is taken for
exceptions overridden in the floating point, gdb debug, or
application code. The asm SYS_NANO_CPU_EXC_CONNECT API has been
removed; it was ill- conceived as it only worked for exceptions
that didn't push error codes. All the asm NANO_CPU_EXC_CONNECT_*
APIs are gone as well in favor of the new _EXCEPTION_CONNNECT_*()
APIs.

CONFIG_EXCEPTION_DEBUG no longer needs to be disabled for test
cases that define their own exception handlers.

Issue: ZEP-203
Change-Id: I782e0143fba832d18cdf4daaa7e47820595fe041
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 18:13:24 +00:00
Kumar Gala 58647277ed tests: test_tickless: Fix NXP K64 symbol dependency
We filtered on CONFIG_SOC_FSL_FRDM_K64F which doesn't exist change it to
CONFIG_SOC_MK64F12 to allow this testcase to run on the K64 platform

Change-Id: Ifdd89e66aa403c3bb28c07d3a546037275a5118d
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-28 07:20:12 -05:00
Sergio Rodriguez 950f45b532 samples/net : Adding mbedTLS self test routine
This contain the run of the self test for the ciphers, crypto
algorithms and utilities of mbedTLS.

Jira: ZEP-327
Jira: ZEP-340
Jira: ZEP-495

Origin: https://tls.mbed.org/download/start/mbedtls-2.3.0-apache.tgz

Change-Id: Ic1bb30b7ed691f17421510cd914ec5096e4e70ea
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-27 22:19:06 +00:00
Andrew Boie 96cadd1a9a arc: move special-purpose irq priorities to flags
We have already done this on x86 and ARM. The policy is as follows:

* IRQ priority levels starting at 0 all have the same semantics and
do not have special properties. The priority level is either ignored
on arches which do not support programmable priority levels, or lower
priority levels take precedence over higher ones.
* Special-case priorty levels are specified via flags, in which case
the supplied priority level is ignored.

Issue: ZEP-60
Change-Id: Ic603f49299ee1426fb9350ca29d0b8ef96a1d53a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-26 15:06:28 +00:00
Inaky Perez-Gonzalez 68e0c50211 testcases: introduce defaults to build/deploy/evaluate
This introduces the default language to use for building, deploying
and evaluating testcases on real hardware in the automation framework.

To be able to filter testcases out based on .config values, we split
the build process into generating the configuration file, filtering
and then the actual building.

The configuration step is done first, to be able to skip as soon
as possible.

This file is in the top level as the test runner will look for
defaults in parent directories.

Note that the default's entry in tests/.tcdefaults takes advantage of
the fact that all:

- the test cases under tests/ print standarized strings for success
  or failure.

- the tc_util.h kernel header will print the passed runid if specified
  when finalizing the testcase. We will make sure it is found to deem
  the TC succesful, ensuring that the right image is flashed and
  verified.

Change-Id: If40b226aef9583f7ce4064405d9334de379f2b00
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-23 18:31:18 +00:00
Mariusz Skamra 602724a91a Bluetooth: tester: Expose device address
This adds device address to the controller_info data. This address
may be used then by PTS for establishing connection etc.

Change-Id: Ic2319c452d94ac79376659ba37b4c9d812ccf9ae
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-23 06:16:14 +00:00
Mariusz Skamra c06a13a93d Bluetooth: tester: Set privacy flag in current_settings
If CONFIG_BLUETOOTH_PRIVACY is set in Kconfig, current settings
shall indicate it's usage.

Change-Id: I0645aedf1b774617c9d97cec0070908aef919ca7
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-23 06:16:09 +00:00
Mariusz Skamra 7fe81b92a6 Bluetooth: tester: Add missing GAP_SETTINGS_* defines
Based on BTP specification following GAP_SETTINGS_* flags were added:
GAP_SETTINGS_CONTROLLER_CONFIG,
GAP_SETTINGS_STATIC_ADDRESS

Change-Id: Ic87d13772c0ef9c9bc8bba331c8bc9f3ffc93f87
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-23 06:15:48 +00:00
Mariusz Skamra a028e43a97 Bluetooth: tester: Send IUT ready event on tester_init
When tester application has been initialized, send this event
to indicate that Upper Tester can send first BTP command.

Change-Id: Id3f4dd246c4e67982057f9518b4b0036e79a6a01
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-22 20:03:28 +00:00
Mariusz Skamra 3c15027799 Bluetooth: btp: Add IUT ready event
Before sending any command, the tester shall wait for this event
indicating that IUT is ready to accept first BTP command.
This is needed, because some devices need more time to initialize
their stacks, so that the first BTP command can be lost.

Change-Id: I92d1c6ea8be905734037eb29f7f270a70ab1583e
Signed-off-by: Mariusz Skamra <mariusz.skamra@gmail.com>
2016-07-22 19:19:28 +00:00
Szymon Janc d2549115ca Bluetooth: Rename connectable_addr member in struct bt_le_oob
Depending on advertising options this can be non-connectable address.
NFC pairing application document also allows broadcaster/observer
roles.

Change-Id: I9b104ac8fb9752a083a7a31fc20598c66f23f608
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-07-22 13:09:30 +02:00
Johan Hedberg 1668624a2f Bluetooth: tests/shell: Remove unnecessary redefinition of AD types
Change-Id: I411618b1cc8ecdf67f84d6debb43bde314eaed10
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-22 09:18:02 +00:00
Inaky Perez-Gonzalez 3e63a74514 net/yaip: revert merge
Follow up to TSC decission for further discussion in the networking
WIG.

Change-Id: I148b484dfe308661573e47ed3e60cceed673bddf
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-22 04:43:09 +00:00
Andrew Boie eb63710960 REVERTME exclude test_sha256 on Nios2
Daily build failing due to this test case timing out
execution after 3 hours. Locally this test takes about
a minute, the issues with CI are being looked into.

Change-Id: I27e40846dde25fc65281b4aea61d10b403c6512d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-21 16:31:31 +00:00
Szymon Janc c8cb32c462 Bluetooth: shell: Add support for getting OOB data
This allows to query LE and BR/EDR OOB data.

Change-Id: I8bc281a9549092c1c4b40c346580abb5fd51d02d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-07-20 20:20:44 +02:00
Johan Hedberg 211ae314e8 Bluetooth: Pass net_buf_simple to scan callback
This lets the callback take advantage of the powerful net_buf API for
parsing the advertising data content.

Change-Id: Id65e6e83efd60c0f36c47bc5446a2e8ec2833d7c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-07-20 16:19:01 +00:00
Luiz Augusto von Dentz c51bcbb9d9 Bluetooth: GATT: Add write struct parameter to its callback
This makes bt_gatt_write consistent with the rest of the API where the
parameters are passed back to its callback.

Change-Id: Ie94208aa661d3620d0cbc5be4a4fb5b3c3ef061c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-20 13:40:55 +00:00
Luiz Augusto von Dentz d84dcb9626 Bluetooth: shell: Loopback L2CAP data
This can be used to test if receiving and sending simultaneously is
working properly with tools such as BlueZ's l2test.

Change-Id: Ic6bcd00a4e1448bebd3ae74bcc58986872332bbe
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-20 05:34:50 +00:00
Andrew Boie afaba4a98b altera_max10: enable and use 16550 UART
The 16550 will now be the default console device.

Change-Id: I92a6b49984b055e7d5f5c97e5192150be0d5c5c7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-15 19:31:44 +00:00
Andrew Boie 8c524a291e x86: merge IAMCU and SYS V core arch code
Having two parallel implementations is a maintenance issue, especially
when some strategically placed #ifdefs will suffice.

We prefer the ASM versions for SYS V, as we need complete control of
the emitted assembly for interrupt handling and context switching.
The SYS V code is far more mature. IAMCU C code has known issues with
-fomit-frame-pointer.

The only difference between the two calling conventions is that the
first three function arguments are provided in eax, edx, ecx instead
of on the stack.

Issue: ZEP-49
Change-Id: I9245e4b0ffbeb6d890a4f08bc8a3a49faa6d8e7b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-13 17:56:39 +00:00
Mariusz Skamra d98b9bd139 Bluetooth: Get the included service 128bit UUID
This adds reading of included service attribute 128bit UUID.
The limitation of this solution is that if several attr handle-range
pairs will be received, this will read first attribute UUID and then
start discovery from the the succeeding handle.

ZEP-373

Discovery related test results:

 2/76   GATT   TC_GAD_CL_BV_02_C   PASS
 3/76   GATT   TC_GAD_CL_BV_03_C   PASS
 4/76   GATT   TC_GAD_CL_BV_04_C   PASS
 5/76   GATT   TC_GAD_CL_BV_05_C   PASS
 6/76   GATT   TC_GAD_CL_BV_06_C   PASS

Change-Id: I27185b3a3ae96c9c03b0f356492df18ba83b183a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-13 14:18:03 +00:00
Jukka Rissanen 19dc87ea7d net: tests: Additional tests for ICMPv4 checksum verification
Change-Id: I21566c9365b8abc5753f6bedba55a3fb494745b9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:12 +00:00
Jukka Rissanen 99fd48acdd net: tests: Fixed the ARP test
Now uses net_nbuf_ll() to point to link layer header.
Also the ARP req test passes properly.

Change-Id: If649ff19a064490bff33d03b4ce70ef11bfa7cd5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:11 +00:00
Jukka Rissanen a5b96021a7 net: tests: Unit tests for IPv4 ARP code
Change-Id: I607ffdbffc7348fae70272c7add57456fcaf79af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:08 +00:00
Jukka Rissanen 9924b41297 net: tests: Add tests for IPv4 netmask, gw and subnet compare
Unit tests added for checking network interface netmask, gateway
and IPv4 subnet compare utility functions.

Change-Id: I5b4a07d6a064097ab41ad6552d14181b1631eb53
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:07 +00:00
Jukka Rissanen dd42617b2f net: tests: Tweak the IP address test to use new net_if API
Instead of using hard coded net_if, get the default network
interface using net_if_get_default() function.

Change-Id: I6248555ce57ae5196adea7baa9db325660a71255
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:04 +00:00
Andrew Boie dd2273146c test_pool: exclude on olimexino_stm32 and nucleo_f103rb
These two boards don't have enough RAM to effectively run this
test case without making the stacks so small they don't work
on other platforms. ARM is sill covered by other boards.

Change-Id: Ibf20eefaf29f989cbb6da6cd3a8eeed2faa1950b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-12 19:29:19 +00:00
Jukka Rissanen 663ba2b7f0 net: yaip: Add unit tests for ICMPv6 handler
Change-Id: Ibdbe82ed56f110e2e0c6443700863632ee1ef56b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:56 +00:00
Jukka Rissanen 441a054a07 net: tests: Unit tests for network utilities
Right now there are tests for IP packet checksum calculation.

Change-Id: I1e9e72d01d4690728269c4484f8628350cf95729
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:55 +00:00
Jukka Rissanen cedd655cdb net: tests: Add more IPv6 address getters unit tests
Change-Id: I0ab22af76073c02c93eb205686472f69b58a1107
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:49 +00:00
Jukka Rissanen 03294c3f75 net: tests: Add IPv4 address unit tests
These tests will check that caller is able to set IPv4 address
to a network interface and check if an address is one of the
assigned to a network interface.

Change-Id: I8aa748c40fbc02eef50ccf76d10a0057ef29021b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:48 +00:00
Jukka Rissanen eb87a36e44 net: tests: Add IPv6 address manipulation unit tests
Change-Id: Ide3bce35dcfd3ec31bfe3cd842a87ca3b639ba4f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:47 +00:00
Jukka Rissanen cf673cf585 net: tests: Add unit test for IP and MAC address printing
Change-Id: Ida0901fa9687814932119d006459de12e6a229d5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:45 +00:00
Jukka Rissanen 2d7d86bdde net: tests: Temporarily remove nbuf unit test
Tests have issues right now so these will be activated later.

Change-Id: Ib5549f9ed5600a20b2cfddbddcde8e7f7b297eef
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 11:23:04 +00:00
Jukka Rissanen b7bc53ece9 net: yaip: Add nbuf buffer API
User should use the net_nbuf API that is supporting a concept
of RX, TX and DATA buffers, instead of using directly the net_buf
low level API.

Change-Id: I3b8f5f13cd37d42d2322a58b35573e117d520c54
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 07:22:24 +00:00
Jukka Rissanen 95f5cd2b9a net: buf: Add tests for net_buf fragmentation
More realistic IPv6 packet creation tests created.
One test creates one big IPv6 packet and manipulates that.
Second test creates a list of IPv6 header + data fragments
and sets some user data in those fragment buffers.

Change-Id: Ic8309ff115e1d735e98c30b3c8292b0d6ffc5f42
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-11 18:06:11 +00:00
Jukka Rissanen 7d6197cf94 net: buf: Add fragmentation API tests
Add tests for checking that the net_buf fragmentation works ok.

Change-Id: I778f79bae971314b6f19c1bf00ed42e1c2128e99
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-11 18:05:41 +00:00
Andrew Boie 8a80ce5c6f Revert "REVERTME: test_pool disable due to memory corruption bug"
Allan fixed the underlying issue, re-enable.

This reverts commit 19fa82ab91.

Change-Id: I6e517f76a6650a3e9ba5a09118187e6c965a147a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-11 17:53:45 +00:00
Juan Manuel Cruz 655a2c89f8 tracing: test includes ipc console fiber if enabled
The test test_thread_monitor fails when a platform enables
the IPC console.
This commit fixes the test to count the IPC console fiber
if it is enabled in the project or the platform.

Change-Id: I9faf9d120b35d9211e558be8f5788885f30c3081
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-07-08 20:34:30 +00:00
Andrew Boie ef29812d51 nios2: support more global pointer scenarios
We now allow use of -mgpopt=global and -mgpopt=data. The 'global'
option is now the default instead of compiler-default local, expanding
global pointer usage to all small data in the system.

For systems where all RAM is less than 64K, the 'data' option may be
appropriate.

Some fixes had to be made to the system in order to get around some
issues:

* prep_c.c no longer uses fake linker variables to figure out the size
of data or BSS, as these gave the linker fits as it tried to compute
relative addresses to them.

* _k_task_ptr_idle is create by sysgen and placed in a special section.
Any small data in a special section needs to be declared extern
with __attribute__((section)) else the compiler will assume it's in
.sdata.

* same situation with extern references to k_pipe_t (fixed pipe_priv
test)

For legacy applications being ported to Nios II which do things that
freak out global pointer calculation, it can be disabled entirely.

Change-Id: I5eb86ee8aefb8e2fac49c5cdd104ee19cea23f6f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-06 18:14:31 +00:00
Andrew Boie 19fa82ab91 REVERTME: test_pool disable due to memory corruption bug
See ZEP-514

Change-Id: I7e9c2c5f81c01e73f1f7ce892fe835ebe3a7a36b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-01 19:44:30 +00:00
Peter Mitsis b4eee20e4b test_fp_sharing: Enable for Cortex-M4
Update the FP sharing test project for use with the Cortex-M4.

Change-Id: If04a191b26291058bd7002ce8a0939eda8a5eb48
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:16 +00:00
Peter Mitsis 3490627a97 test_fp_sharing: clean up test code
Clean up test code in preparation for adding Cortex-M4 support.

Change-Id: I64a32e8aa2808b4e0348601e2fc0f7f39cdb413c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:15 +00:00
Andrew Boie 571ccee400 test_pool: increase task stack sizes
We were getting a stack overflow on Nios II.

Change-Id: Id2c9be27552f31f5cdbf72dc31e77a106082746b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-01 19:01:58 +00:00
Mariusz Skamra 997765def2 Bluetooth: tester: Increase prepare write buffers pool for qemu and nble
Buffers pool has to be increased for all configurations.

Change-Id: Id24caced5043c1672ca5f753d1e86d9a72c728ea
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-01 14:57:02 +02:00
Mariusz Skamra 940ee5e6e5 Bluetooth: tester: Increase prepare write buffers pool
TP/GAW/SR/BV-10-C test case requires two long values to perform
nested prepare write operation. Using one ATT Execute Write command
this two values are going to be written simultaneously.

Change-Id: I2950409ed8f1d121dcc706b432cdf071b9af00c0
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-01 12:34:06 +02:00
Genaro Saucedo Tejada c8d9b6b5e3 tags: basic kernel objects test for actual hardware
Tagged some tests/kernel testcases with 'bat_commit'. Only test that
work on actual hardware are tagged, while tests with known issues
were left not tagged, test meant for emulator or build only were
also not tagged.

Change-Id: Icede6bc76788aba60d8f1fdcf624e95a7d3116a2
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-01 00:38:31 +00:00
Andrew Boie e3ffa67bde test_stackprot: disable for Nios II
No compiler support for -fstack-protector on this arch with the
current toolchain.

Change-Id: Ifa793599b6760c318f16748f9e71c31e0d4edbe7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:51 +00:00
Andrew Boie 5da328b07b tests: test_tickless: exclude on Nios II
Tickless idle will not be enabled on Nios II due to the
lack of a powersaving instruction.

Change-Id: Ib3c23d803d6335aeb791983e31ad7da2d0deb118
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:51 +00:00
Andrew Boie fe40d1071e REVERTME test: bluetooth: init: exclude Nios II JTAG UART
This driver does not yet support interrupt-driven console.
Revert when ZEP-280 is implemented.

Change-Id: Ib430c39138194ab441c95a1b1856c3661102a625
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:50 +00:00
Kumar Gala 7dcbbc39e7 build: move from srctree to ZEPHYR_BASE for app include paths
$srctree for the application might not be set to be $ZEPHYR_BASE, use
$ZEPHYR_BASE instead to be more explicit in the build.

Change-Id: Iefa5ff59f246b584949329044f7a6531adc6ed62
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 14:36:39 +00:00
Tomasz Bursztyka 83c82e6cd6 tests: Allow tc_util to use printf when requested
printk() is too simplistic and does not handle byte precision on formats
like %02x etc... printf does, so letting the possibility to use it when
relevant. This might be useful when dumping out some network packets,
byte by byte where a precision of 1 byte (thus 2 0's) is necessary.

It's better to have this output:
	41 d8 ...
instead of:
	00000041 000000d8 ...

Change-Id: Idc15bbae67830f41388373e2ca1947bb274fb550
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-06-29 05:19:26 +00:00
Andrew Boie ab5f6de4af test_context: build/run on ARC and Nios II
Change-Id: If3e03fef8ed9448bdba82b442ac976bfd6a7ddce
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-29 00:08:13 +00:00
Andrew Boie 30db3401e8 nanokernel: tests: increase stack size from 256 bytes
A recent change modified the fiber stack size of these tests
to 256 bytes, which causes a stack overflow on Nios II. (This
arch has lots of registers)

Increase to 384 bytes, which still compiles well on RAM-constrained
targets like Quark SE SS, Nucleo, etc.

Change-Id: I2152ea9fc1fac693638b8f7a00a6b6628e0c42d3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-29 00:08:08 +00:00
Andrew Boie 2ecb9d45d5 test_irq_offload: unit test for running functions in IRQ context
This is used in many other test cases. However when implementing this
function it's helpful to have a testcase dedicated for it, without
dependencies on other kernel objects.

Change-Id: I66a7cdd0b13712665384d5ad4e79050c82d32e3a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-28 15:56:05 -07:00
Andrew Boie 54b58827b0 test_intmath: new Nios II test case for integer math
Not all CPUs implemement the mul, div, or mulx instructions. Ensure
that any runtime handling of these works correctly.

Change-Id: I50426bd5704cd913f290c9677d1760d53c9e4b56
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-28 22:48:28 +00:00
Luiz Augusto von Dentz e9083dfcd7 Bluetooth: GATT: Add flags to attribute write callback
This adds flags parameter to write callback which can be used to indicate
that data only need to be prepared with use of BT_GATT_WRITE_FLAG_PREPARE
fixing qualification tests that needs to check authorization or other
errors that cannot be verified with just the permissions.

Change-Id: I3d662b2027718ffb52a280e3bbc9750be14f89ae
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-28 17:36:08 +03:00
Mariusz Skamra c474a03c58 Bluetooth: tester: Fix copying attribute to the server_buf
BT_GATT_INCLUDE_SERVICE user_data shall point to the service declaration
of service to be included. So user_data_len shall be set to 0 to avoid
copying the contents of bt_gatt_attr to the server_buf, and just use
pointer to the actual attribute.

Change-Id: Id770daeb6d64644c51f2bc5d3962dd80363ec8c3
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-06-28 10:57:44 +02:00
Andrei Emeltchenko 437c0e18e3 Bluetooth/shell: Add HRS simulation to btshell
Add HRS simulation to shell allowing to switch on / off HRS simulation
helping testing GATT notifications.

Change-Id: Idf99b74ac73d45d2f0d3279d50431be4027fef8a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-27 18:43:44 +00:00
Mariusz Skamra acc28a9631 Bluetooth: Fix invalid pointer to local variable
attr pointer is local here, so it may be overwritten anytime, because
this attribute user_data will be used out of scobe of this function.

Change-Id: I85b390299980dac213d8ce1939078fe8b242c887
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-06-27 10:49:09 +00:00
Arkadiusz Lichwa 5192c44e72 Bluetooth: shell: Suplement BR/EDR L2CAP channel handlers
Adds to BR/EDR L2CAP client channel object required handlers and allocate
room for channel data traffic to make it operational when fully
setup and to be interactive with internal stack.

Change-Id: Id1e90d7ea318ed8a875383995e4d175e124939eb
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-23 19:58:57 +00:00
Andrew Boie b6d9c5ca80 bluetooth: init: disble for CONFIG_UART_ALTERA_JTAG
Interrupt-driving UART not implemented yet for this driver.

Change-Id: Ida60d7e09e9eca2d7e6452a84f6d95529d0af9b6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-22 16:42:20 +00:00
Arkadiusz Lichwa 83fd0cf62e Blutooth: shell: Fix printout BR/EDR PSM server registration
Fixes wrong server instance used during printing details on registration
PSM server.

Change-Id: I269d20bf4d12f24ce143a04c1c23ed8711b9cdba
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-17 11:56:56 +02:00
Luiz Augusto von Dentz 372a8905d5 Bluetooth: tester: Fix write callback not returning errors properly
There is no need for any prepare write variables as this is now handled
transparently by the stack and so any errors that happens during write
shall be reported in the return.

Change-Id: I3e629016cb7f5f6cd9106ff07c3cbb464e81734f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-16 14:57:16 +03:00
Johan Hedberg 8ea57bd5d3 Bluetooth: Shorten limited discovery parameter name
The parameter is already inside a struct that's specific to BR/EDR
discovery, so there's no need to repeat "discovery" in its name.

Change-Id: Idb95788bfc9d62ecd52adecc35104e212724cb78
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-16 11:28:59 +03:00
Johan Hedberg 1a756d6f8d Bluetooth: Fix validity check for Inquiry parameters
Since we only have a single user we can enforce length > 0x01. We
should also ensure that the results count is 1-255.

Change-Id: Id5d91acae06c6c6fc66dd59c0e367682a98dc08c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-16 10:58:50 +03:00
Inaky Perez-Gonzalez aba4b555f4 testcases: sample static testcase to run checkpatch on the source
This is a sample static testcase (so it needs no target machine) to
run checkpatch as a testcase and produce output only if it fails.

Change-Id: I055c0125ac785058e101faa68eb5aaff9f7caf16
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 23:49:57 +00:00
Inaky Perez-Gonzalez 9e66787a33 test_timer: give it more time, in real HW it seems 60s is not enough
Change-Id: Ifea72f4b0e40aa9351f4d377a032c6133b167055
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 23:49:57 +00:00
Inaky Perez-Gonzalez fcec9e37c0 testcases: sanity check TCs get more language for real HW
Add more specifications or qualify some to the sanity check test cases
for them to be ran in real hardware:

 - kernel types (micro vs nano)
 - platforms / arches to exclude / include
 - one that is removed (for the PCI sample) as it cannot be ran
   without extra information

Change-Id: Id14dc15eb89358c3656d2814ea41bb6fec051278
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 23:49:56 +00:00
Inaky Perez-Gonzalez c9cd9ef3f0 testcases: sample testcase to generate project's documentation
This is a sample static testcase (that needs no hardware target) that
will build the documentation and ensure it builds without issues.

Change-Id: I7174205522be9aead350e67b1672b8e976cb9191
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 22:01:39 +00:00
Inaky Perez-Gonzalez 960a498182 benchmark/sys_kernel: use TC_PRINT_RUNID
For automation to detect this is the right test case being executed,
print the RUNID if defined

This TC doesn't use TC_*() macros, so we need to invoke it manually.

Change-Id: I6f7417621d649a59412bb92d8b665130757d926a
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 22:01:27 +00:00
Inaky Perez-Gonzalez 6aa7bd0c65 tc_utils: introduce TC_PRINT_RUNID / TC_RUNID
This is a helper to print a token passed form the compilation
environment.

Further documentation and rationale in the code.

Change-Id: I8d5e6b2246ba5c4f09b78532b3c600891f94bb63
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 21:48:47 +00:00
Benjamin Walsh 53c3106520 tests: test nano_fifo_put_list and nano_fifo_put_slist.
Change-Id: I35ab267070126dcf7c8649ed79a7a4a5479b1f55
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-06-13 20:24:42 +00:00
Arkadiusz Lichwa b2647d84b3 Bluetooth: L2CAP: Refactor l2cap core types
Refactors L2CAP core data structures and modifies functions that uses them.
Now we can have separate L2CAP feature channel objects for LE and BR/EDR
transport. This's also a ground for make L2CAP CoC API to be common
for both transports.

Change-Id: Ic1197b0e3c4f505764b23fb9c7eb27123a44a675
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-06-13 11:49:07 +00:00
Johan Hedberg ebd5011adf Bluetooth: Update Intel copyright for files modified in 2016
Change-Id: I10a7cab9a7f911b9f64e17bf24ddce82c2f08c40
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-10 12:10:53 +03:00
Johan Hedberg c78a5a9aae net: tests: Clean up logging of net_buf tests
Change-Id: I8f82c586c730691c72f8996a25843ba786c73fe6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-09 10:26:38 +03:00
Johan Hedberg bab34ea49c net: tests: Add task-fiber test for net_buf_get/put
Change-Id: I48c050254fca913c59bfbfd9a160c7d6ca79d53b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-09 10:26:38 +03:00
Szymon Janc 6248407c00 Bluetooth: shell: Fix data_pool declaration
Buffers pass to BT stack need to have minimum BT_BUF_USER_DATA_MIN
of reserved user space data.

Change-Id: Iaeb85faa20b1c5281bfd0331336295ad7cfdd68e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 19:09:59 +02:00
Luiz Augusto von Dentz f54c5b744d Bluetooth: GATT: Remove obsolete flush callback
It is no longer necessary to implement flush callback for long
descriptors since the stack can queue prepare writes this callback
will never be called which makes BT_GATT_LONG_DESCRIPTOR obsolete
as well.

Change-Id: Idca31ba8e4404d2acba760c420394d5adee0a508
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:29:02 +00:00
Luiz Augusto von Dentz 56419a135b drivers/nble: Add buffer pool for prepare writes
This is similar to previous patch which makes the API much more simple
when handling long writes.

Change-Id: Ibd3856863a43927195e23936872a160d5ff94648
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:28:35 +00:00
Luiz Augusto von Dentz d7e0294227 Bluetooth: ATT: Add incoming buffer pool
This adds a buffer for incoming prepare writes which can be
tunned using BLUETOOTH_ATT_PREPARE_COUNT, these buffers are then used in
execute write to commit the data thus making flush callback obsolete:

[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x16 len 50
[bt] [DBG] att_prepare_write_req: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] prep_write_cb: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x16 len 34
[bt] [DBG] att_prepare_write_req: (0x001159c0)handle 0x0022 offset 45
[bt] [DBG] prep_write_cb: (0x001159c0)handle 0x0022 offset 45
[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x18 len 2
[bt] [DBG] att_exec_write_req: (0x001159c0)flags 0x01
[bt] [DBG] write_cb: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] write_cb: (0x001159c0)handle 0x0022 offset 45

Change-Id: Iae071d7b4b5b042285952da57e3f7a853cf58afb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:28:11 +00:00
Johan Hedberg 6d93cbb627 net: tests: Refactor net_buf tests for easier extensibility
Change-Id: I23380b1c78b5a9c8814c037a2d48b3505c99f6ea
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 11:22:23 +03:00
Johan Hedberg 7029d6ed62 net: tests: Remove unnecessary microkernel ifdef for mainloop
Change-Id: Ifbf41aeece7f889eb8f4e836c59df5e830882942
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 11:22:23 +03:00
Johan Hedberg 8919bdc573 net: tests: Update net_buf test
Add testing for fragmented buffers to the net_buf test.

Change-Id: Id6c541b86c30ac94931a7086ebb6f1312fbc34f7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-06 08:17:24 +03:00
Szymon Janc 61c2353fc0 Bluetooth: shell: Fix missing new lines
This makes shell logs cleaner.

Change-Id: I5ecc751e3062b9cb581471c5399dd01decc9fa57
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-06 04:45:30 +00:00
Johan Hedberg 118a36fc26 net: tests: Fix returning net_buf to free pool
When using a custom destroy callback it's the responsibility of the
callback of placing the buffer back in the free pool.

Change-Id: I5ff99c32bcb31ccc5eb0fad544d86b0c830e7051
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-05 19:28:54 +03:00
Anas Nashif b67baefefd tests: fix build test configuration
Change-Id: I14f2c0a1c80f0c128db6a5d24830cc31c46308d1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 18:42:33 +00:00
Johan Hedberg e8620aaada Bluetooth: Take advantage of net_buf_get_timeout()
Use the more explicit net_buf_get_timeout() call where it makes sense
(e.g. where we always want to wait or never want to wait).

Change-Id: Id1eabe0ad2f9fa79f7be39e51fefa5161f9cc550
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-02 10:32:29 +00:00
Anas Nashif 7d76e9619b ext: move tinycrypt to ext/lib
Tinycrypt is maintained at github and thus should be treated as an
external library and hosted under ext/.

Change-Id: I4c4a3bcdacf01d4922919e5ea1f9dec21a19cd37
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-01 14:27:41 -04:00
Luiz Augusto von Dentz f6dd1e4144 Bluetooth: Add support for using SYS_LOG
This add CONFIG_BLUETOOTH_DEBUG_LOG which depends on SYS_LOG since the
later can actually use either CONFIG_PRINTK or CONFIG_STDOUT_CONSOLE.

Change-Id: Ib2974d1331f6c91d119a218ec95e8bf01069377b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 05:04:10 +00:00
Luiz Augusto von Dentz 8b1afeaaa3 tests: Add tests for delayed workqueue
Change-Id: If62f44a989012047008c0d782aef2aa7b6016190
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:52:52 +00:00
Andrei Emeltchenko 4f696dd779 Bluetooth/shell: Correct confirm shell commands spelling
Change-Id: I832d8898a0e49b2d7b07a9f81193f52f31d45c7d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 11:03:25 +00:00
Szymon Janc 7cd474b3d7 Bluetooth: shell: Fix help message for LE address
LE address can be either public or random.

Change-Id: I5578732bd9929da22ef83f78fbe7ad608847a0d7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 13:11:25 +00:00
Szymon Janc 743437bc7b Bluetooth: shell: Add support for setting local ID address
This allows to set custom ID address from shell app.

Change-Id: I293800f116a7e56e183720a9b908ccb0e9622c12
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 13:11:14 +00:00
Chuck Jordan bc5cc98966 test: timestamp_serialize() empty macro for ARCv2
If the CPU is ARC, define timestamp_serialize() to be an
empty macro so that this test builds properly.

Change-Id: I36f00dd429972b610c327cbe59bedb24b33553ed
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-27 21:11:27 +00:00
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