Rajkumar Kanagaraj
f94eb3cf13
Fix for the Ci build issue
2019-06-03 15:24:01 +02:00
Rajkumar Kanagaraj
47030cd23f
SW watchdog unittest cases
...
-Added the mock class function to mock mbed_assert_internal
-Added the unit test case to test start,kick,stop
-Modified the interface api name from is_alive to process
-added the unit test cases for process
2019-06-03 15:23:59 +02:00
Rajkumar Kanagaraj
eb98c38226
Hw Watchdog UnitTest cases
...
-Added the unit test case for testing Hw watchdog
-Added the supported stubs files
2019-06-03 15:23:59 +02:00
Martin Kojtal
523ad23a30
Merge pull request #10656 from jarvte/fix_cellularctx_destr
...
Cellular: AT_CellularContext disconnect in non-blocking mode
2019-05-31 12:35:59 +01:00
Antti Kauppila
83d62fbb9c
astyle fixes
2019-05-29 20:13:22 +03:00
Antti Kauppila
77e8374058
Cellular: Removed boiler plate code
2019-05-29 16:17:08 +03:00
Teppo Järvelin
8922eeb014
Cellular: add method to set authentication type to CellularContext
...
Authentication type must be able to set. It was hard coded to CHAP.
Added unit tests for CellularContext to be able to add test for new function.
2019-05-29 09:46:15 +03:00
Kevin Bracey
2fbbd9d2ca
Introduce Semaphore::acquire methods
...
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().
Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".
Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Teppo Järvelin
779fb6defd
Cellular: AT_CellularContext disconnect in non-blocking mode
...
Disconnect was supporting only blocking mode.
2019-05-27 12:23:29 +03:00
Teppo Järvelin
d559338b3b
Cellular: fix unit test valgrind warnings
...
Stub files did have some memory leaks and using
unintialized variables.
2019-05-21 14:23:21 +03:00
Martin Kojtal
26aa16ff39
Merge pull request #10557 from jarvte/fix_cellularcontext_init
...
Cellular: Initialize CellularContext member variables in correct class
2019-05-15 08:48:54 +01:00
Martin Kojtal
3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
...
Assembler atomics
2019-05-13 14:18:05 +01:00
Teppo Järvelin
e4ee870b2e
Cellular: Initialize CellularContext member variables in correct class
...
CellularContext member variables were initialized in inheriting class.
Now in base class where they should be initialized so that every inheriting
class don't have to init them.
2019-05-10 11:43:48 +03:00
Ari Parkkila
830b4234e9
Cellular: Fix setting of statemachine timeout
2019-05-09 04:42:30 -07:00
Martin Kojtal
6d1b7596e6
Merge pull request #10490 from mirelachirica/at_read_string_stop_tag_ut
...
Cellular: Added UT for case when read_string buff size hits middle of…
2019-04-29 13:31:35 +01:00
Kevin Bracey
87396e0bf6
Assembler atomics
...
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.
API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++
This gives our existing C implementation essentially all the functionality
needed by C++11.
An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Mirela Chirica
4d58e58b6b
Cellular: Added UT for case when read_string buff size hits middle of stop tag
2019-04-26 12:48:26 +03:00
Teppo Järvelin
9d67a8b61c
Cellular: send disconnect to correct ctx
...
Disconnect was sent to all CellularContext classes even it concerned
one specific context. Some disconnect events are still sent to all
context classes. These event are coming from network and ment for all
context classes or event did not specify cid.
2019-04-17 13:53:40 +03:00
Martin Kojtal
5e73a83332
Merge pull request #10391 from lorjala/unittesting-example
...
Update the writing example in unit testing README
2019-04-16 09:09:09 +01:00
Amanda Butler
1d1e78cac5
Edit README.md
...
Edit file for consistent person.
2019-04-15 15:56:26 -05:00
Lari-Matias Orjala
a4308426da
add a code independent unit test writing example
2019-04-12 15:28:01 +03:00
Ari Parkkila
e0f8b2116a
Cellular: Fix CellularStateMachine timeout configurations
2019-04-09 22:02:38 -07:00
Cruz Monrreal
d1672d0200
Merge pull request #10341 from mirelachirica/check_urc_resp_stop_1
...
Cellular: Check for URC during AT response stop
2019-04-09 11:05:56 -05:00
Teppo Järvelin
2470a3611c
Cellular: new state machine state and better info from stm
...
Added new state (signal quality) and more information about progress
so application/driver can build recovery logic.
2019-04-09 13:44:45 +03:00
Mirela Chirica
f100cd59c8
Cellular: Check for URC during AT response stop
2019-04-09 11:15:28 +03:00
Teppo Järvelin
fe5f97895b
Cellular: Fix deleting of state machine to correct class
2019-04-08 12:50:29 +03:00
Martin Kojtal
2369c12dea
Merge pull request #10269 from TeemuKultala/cellular_valgrind_fix
...
cellular: valgrind defect fix
2019-04-03 13:49:26 +02:00
Teemu Kultala
453d7b86af
cellular: valgrind defect fix
...
at_cellulardevicetest.cpp: fix potential memory leak
at_cellularsmstest.cpp: fix potential memory leak, uninitialized memory conditional
athandlertest.cpp: fix potential memory leak, uninitialized memory conditional,
uninitialized memory read
ATHandler_stub.cpp, ATHandler_stub.h: fix potential memory leak, uninitialized memory conditional
2019-04-03 10:35:15 +03:00
Teppo Järvelin
c6e5595cec
Cellular: retry logic for CellularContext connect
...
State machine has retry logic until device is attached to network.
After this CellularContext does the context activation e.g. connect.
There was no retry logic for context activation. Added logic to
CellularContext level so it's available for at and (upcoming)ril layers.
2019-03-29 14:12:23 -05:00
Cruz Monrreal
4af3c38078
Merge pull request #10210 from jarvte/cellulardevice_from_context
...
Cellular: CellularContext must provide access to CellularDevice
2019-03-28 17:09:48 -05:00
Hasnain Virk
cd3a032d2a
Unit test fix for RX TOA change
...
The change had an impact on unittests and we needed to adjust the test
cases a little to accomodate the change.
2019-03-27 10:23:43 +02:00
Teppo Järvelin
b0ee22c96b
Cellular: CellularContext must provide access to CellularDevice
...
When using NetworkInterface::get_default_instance() application gets handle
to CellularInterface which is actually CellularContext derived from CellularInterface.
Application needs also handle to CellularDevice to open other interfaces.
2019-03-26 07:29:11 +02:00
Hasnain Virk
4c1b8a8816
Unit test fix LoRaPHY_stub
...
get_rx_window_params() API is changed. To reflect that changing the
stub.
2019-03-22 15:45:45 +02:00
Teppo Järvelin
dba3d42362
Cellular: call AT+CGEREP after sim is ready
...
Current implementation did call AT+CGEREP before sim was ready
and it was failing in most modems.
2019-03-18 08:10:09 +02:00
Cruz Monrreal
6c4b4a5212
Merge pull request #10084 from mirelachirica/info_resp_issue_8829
...
Cellular: AT information response to return false on empty prefix
2019-03-16 22:59:24 -05:00
Cruz Monrreal
dbb33ef423
Merge pull request #9801 from vmedcy/fix-eventqueue-h
...
Correctly include EventQueue.h
2019-03-16 22:52:40 -05:00
Martin Kojtal
759627ff12
Merge branch 'plmn_stm_fix2' of https://github.com/jarvte/mbed-os into rollup
2019-03-15 08:45:14 +00:00
Martin Kojtal
d5eb98e66a
Merge branch 'cellular_BC95_leak_fix' of https://github.com/TeemuKultala/mbed-os into rollup
2019-03-14 11:37:10 +00:00
Martin Kojtal
cf76b74aad
Merge pull request #9837 from jarvte/drop_bg96_cgact_support
...
Cellular: CGACT not supported in coming firmware in BG96
2019-03-14 09:16:39 +01:00
Mirela Chirica
d12de2a199
Cellular: AT information response to return false on empty prefix
2019-03-13 15:49:33 +02:00
Teemu Kultala
71a1ed9c8e
cellular: BC95 memory leak fix
2019-03-07 11:58:20 +02:00
Teppo Järvelin
a830dbf47d
Cellular: removed manual registering state.
...
Simplified state machine by removing manual registering state.
This was done as some modems did not have all the needed at commands
for checking the registered network. Some modem run out of memory as when
checking correct network there might be so many networks available.
Manual registration still works but it does not do any checks to which network
it's registered. Moved manual registering at command earlier in state machine so it forces
registering to a correct network. Internal refactor/fix, does not affect applications.
2019-03-05 13:17:25 +02:00
kegilbert
194fa129fb
Update recently added previous macro name uses in tests
2019-03-01 13:53:47 -06:00
Martin Kojtal
10f2c05318
Merge pull request #9898 from jarvte/connect_disconnect_fix
...
Cellular: fix connect-disconnect sequence called many times
2019-03-01 17:34:30 +01:00
Martin Kojtal
596b9f740e
Merge pull request #9797 from ARMmbed/fh_enable
...
API to temporarily enable/disable FileHandles
2019-03-01 14:26:18 +01:00
Teppo Järvelin
0905f01438
Cellular: Removed API get_connection_status() from CellularNetwork
...
This was left accidentally after refactoring.
It wasn't giving correct states after refactoring.
CellularContext::get_connection_status should be used instead.
2019-03-01 14:51:05 +02:00
Teppo Järvelin
ec73c8a9c7
Cellular: fix connect-disconnect sequence called many times
...
Fix syncing back to at mode after ppp disconnect.
Fix AT_CellularContext flags and states to allow new connect after disconnect.
Fix that state machine is not reseted in disconnect is it's running (might be
running because of another context or new connect already started).
2019-03-01 14:47:41 +02:00
Kevin Bracey
7098f1b7f9
UARTSerial stub: add enable calls
2019-03-01 10:05:25 +02:00
Teppo Järvelin
4077898de1
Cellular: fix issue where CGACT not supported in coming firmware in BG96.
2019-02-28 08:36:31 +02:00
Martin Kojtal
6bdbe754cd
Merge pull request #9799 from VeijoPesonen/bugfix-esp8266-dns
...
Increase events.share-eventsize to 768B because of ESP8266 AT driver and asynchronous DNS
2019-02-27 11:30:38 +01:00
Veijo Pesonen
517799fd06
NetworkStack: halts if unable to add an event to the event queue
2019-02-26 09:44:15 +02:00
Volodymyr Medvid
b0a33273ff
Correctly include EventQueue.h
...
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h
By accident, `mbed compile` generates includes.txt with the correct
order of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:
mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error:
'events' has not been declared
Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
2019-02-21 17:59:05 +02:00
Martin Kojtal
dbd92c746b
Merge pull request #9387 from tymoteuszblochmobica/Sockets
...
Multihoming initial release
2019-02-21 13:50:03 +01:00
Cruz Monrreal
b088bd493a
Merge pull request #9759 from michalpasztamobica/memory_handling_fixes
...
Multiple memory handling fixes
2019-02-20 12:07:45 -06:00
Tymoteusz Bloch
641189c357
Multihoming change parameter orded in gethostbyname
2019-02-20 14:37:33 +02:00
Michal Paszta
b241943c12
Multiple memory handling fixes
...
Correct memory clean-ups in multiple tests and a stub.
2019-02-20 10:50:55 +01:00
Cruz Monrreal
feae56eea1
Merge pull request #9493 from RonEld/add_platform_initialization_in_trng_test
...
Initialize platform in trng test
2019-02-19 15:27:40 -06:00
Tymoteusz Bloch
49141376ee
Multihoming initial release
...
Added Multihoming feature to LWIP (ability to use more than one network interfaces) for increasing networking reliability.
This involves:
LWIP interface
LWIP IP routing
DNS storage
Sockets (bind to interface name possibility)
possibility to add non default network interface
cellular middleware modifications if cellular connection is used
2019-02-19 17:39:46 +02:00
Ari Parkkila
605a42d38f
Cellular: Fix Gemalto/Cinterion socket open defer
2019-02-18 06:24:42 -08:00
Ron Eldor
c94b5861e4
Add mbedtls platform setup and teardown to modules
...
Add calls to `mbedtls_platform_setup()`
and `mbedtls_platform_teardown()` to all modules and tests using Mbed TLS.
2019-02-18 11:43:32 +02:00
Cruz Monrreal
fdd2a9402a
Merge pull request #9728 from AriParkkila/at-handler-clear-sigio
...
Cellular: Fix sigio to be released in ATHandler destructor
2019-02-15 12:41:44 -06:00
Cruz Monrreal
7f248970ec
Merge pull request #9660 from blind-owl/clean_cellular_trace
...
Cellular: clean sensitive information from trace
2019-02-15 12:28:25 -06:00
Ari Parkkila
0c697f4421
Cellular: Fix sigio to be released in ATHandler destructor
2019-02-15 05:07:36 -08:00
Hasnain Virk
a14acfad14
Updating unit tests
...
Updating unit test in response to the change in the link ADR related
APIs.
2019-02-14 17:15:47 +02:00
Hasnain Virk
d257d7287f
Including CTest explicitly
...
enable_test() seems to include CTest framework in the CMakeLists.txt but
that would result in inconsistencies and CTest framework will not be
able to find DartConfiguration file or MemCheck tool.
Including CTest framework explicitely in the CMakeLists.txt seems to
solve the issue.
2019-02-14 17:15:22 +02:00
Jari Poyhonen
b6a0892e86
Cellular: clean sensitive information from trace
...
Information removed from the cellular subsystem trace log:
* SIM pin
* APN username and password
Added get_debug() to ATHandler.h to get the current trace state in order
to support suspend/resume of trace output.
2019-02-14 09:22:54 +02:00
Cruz Monrreal
709e6ff795
Merge pull request #9600 from kjbracey-arm/atomic_exchange_64
...
Atomic extensions: 64-bit, bool, exchange
2019-02-12 20:28:00 -06:00
Martin Kojtal
10bb66a053
Merge pull request #9424 from SeppoTakalo/ONME-4125
...
Allows multiple network status listeners
2019-02-11 10:41:35 +01:00
Nir Sonnenschein
8c2ad14ace
Merge pull request #9568 from ARMmbed/feature-cellular-refactor
...
Merge feature cellular refactor
2019-02-07 18:17:32 +02:00
Martin Kojtal
a0ec77d9a8
Merge pull request #9378 from oscarh/master
...
Add get_connection_status() override in CellularContext
2019-02-05 10:39:00 +01:00
Kevin Bracey
694adaae8b
Add atomic exchange
2019-02-05 10:53:30 +02:00
Kevin Bracey
f8e3f5dc2c
Add 64-bit atomics
2019-02-05 10:45:40 +02:00
Oscar Hellström
0ff91c1d5c
Add unit test stub for get_connection_status()
2019-01-31 20:56:21 +01:00
Seppo Takalo
86019af7eb
Add unittest to verify removal of last event listener
2019-01-31 15:11:48 +02:00
Seppo Takalo
9c98d1572b
Allow multiple network status listeners
...
Allow more than one callback to be register to NetworkInterfaces.
This introduces new APIs:
void NetworkInterface::add_event_listener(...);
void NetworkInterface::remove_event_listener(...);
Which internally calls interfaces attach() functions.
2019-01-31 15:04:24 +02:00
Ari Parkkila
47a8f24b1e
Cellular: Fix astyle
2019-01-31 04:15:01 -08:00
Martin Kojtal
2cd83b45a4
Merge pull request #9392 from michalpasztamobica/tlssocket_documentation_update
...
Documentation of TLSSocket behavior on AUTH_FAILURE
2019-01-23 14:20:43 +01:00
Jari Poyhonen
626935f331
Fix valgrind error in cellular athandler unit test
2019-01-23 09:43:03 +02:00
Jari Poyhonen
b16d8dbf3b
cellular unit test updates due valgrind run
2019-01-23 09:43:02 +02:00
Michal Paszta
2cda5d28b8
Documentation of TLSSocket behavior on AUTH_FAILURE
2019-01-22 12:40:42 +01:00
Ari Parkkila
007caa0235
Cellular: Update modem drivers with get_default and other new APIs
2019-01-22 02:24:45 -08:00
Ari Parkkila
c4de2f2f0e
Cellular: Power API updated to match onboard_modem_api
2019-01-22 02:24:45 -08:00
Ari Parkkila
75caa75a96
Cellular: Add get_target_default_instance in CellularDevice
2019-01-22 02:24:45 -08:00
Ari Parkkila
139d506a24
Cellular: Move power on/off to device and remove CellularPower
2019-01-22 02:24:45 -08:00
Mirela Chirica
55b54f7c97
Cellular: Added API for setting default parameters to a network interface
2019-01-22 02:24:45 -08:00
Mirela Chirica
ba3727b4e8
Cellular: Unit tests for Non-IP socket
2019-01-22 02:24:45 -08:00
Mirela Chirica
d301e13610
Cellular: Non-IP socket and PDP context for EPS control plane data delivery
2019-01-22 02:24:44 -08:00
Teppo Järvelin
84e5013a2d
Cellular: added setting of data carrier support for UART.
2019-01-22 02:23:04 -08:00
Teppo Järvelin
725e14d15f
Cellular: Add State machine unit tests.
2019-01-22 02:23:04 -08:00
Teppo Järvelin
0c9130efeb
Cellular: change stack_type_supported to get_property
...
Change usage of AT_CellularContext::stack_type_supported to
AT_CellularBase::get_property. This way we can rid of
targets overriding stack_type_supported and delete
unnecessary classes and simplify new targets.
2019-01-22 02:23:04 -08:00
Teppo Järvelin
7c9f9d47ec
Cellular: Remove target files inheriting from AT_CellularNetwork
...
After AT_CellularNetwork::has_registration was replaced with
CellularProperties and better
AT_CellularNetwork::set_access_technology_impl default
implementation we can delete most of the target specific classes
that inherit AT_CellularNetwork.
2019-01-22 02:23:04 -08:00
Teppo Järvelin
9a72c221d8
Cellular: Change AT_CellularNetwork to use CellularProperties.
...
This change enables removing function has_registration from
class AT_CellularNetwork and all targets inheriting
AT_CellularNetwork.
2019-01-22 02:23:04 -08:00
Teppo Järvelin
b0d37ebec4
Cellular: Removed unnecessary checks after new
...
After this change we were able to change methods
ATHandler::set_urc_handler and CellularDevice::set_ready_cb to void
and simplify error handling.
2019-01-22 02:23:04 -08:00
Teppo Järvelin
8fcd2e0401
Cellular: changed support features to CellularProperty array.
2019-01-22 02:23:04 -08:00
Ari Parkkila
c7486b2a0d
Cellular: Added shutdown()
2019-01-22 02:23:04 -08:00
Ari Parkkila
bdddb445a6
Cellular: Moved reset from power to device
2019-01-22 02:23:03 -08:00
Ari Parkkila
1bc84404b2
Cellular: Removed set_power_level()
2019-01-22 02:23:03 -08:00
Ari Parkkila
0813b969f7
Cellular: Unify set_at_mode and init_module into init()
2019-01-22 02:23:03 -08:00
Ari Parkkila
2dde5a4376
Cellular: Move ready_cb from power to device
2019-01-22 02:23:03 -08:00
Ari Parkkila
19b24946df
Cellular: AT remove_urc_handler changed to set_urc_handler(prefix, 0)
2019-01-22 02:23:03 -08:00
Ari Parkkila
e49f90fb0b
Cellular: Move device_ready from power to device
2019-01-22 02:23:03 -08:00
Ari Parkkila
38f79a9b65
Cellular: Move PSM setting from power to device
2019-01-22 02:23:03 -08:00
Ari Parkkila
36292a4f14
Cellular: Move eDRX setting from power to network
2019-01-22 02:23:03 -08:00
Teemu Kultala
22a536a78a
cellular: eps ciot optimization network support check astyle fix
2019-01-22 02:23:03 -08:00
Teemu Kultala
f94117559b
cellular: eps ciot optimization network support check
...
-added an API for checking network eps ciot optimization support
-renamed the API for getting the UE parameters
-the API for setting the UE parameters includes now a callback, which
will be called once network support for eps ciot optimization is known
2019-01-22 02:23:03 -08:00
Teppo Järvelin
22d9105318
Removed CellularSIM interface.
...
Moved methods to classes CellularDevice and CellularInformation.
SIM interface was removed to simplify cellular usage and
methods better suite new classes.
Updated greentea and unit tests.
2019-01-22 02:23:03 -08:00
Ari Parkkila
235c2bc00d
Cellular: Removed get_extended_signal_quality and changed get_signal_quality
2019-01-22 02:23:03 -08:00
Volodymyr Medvid
af56cd8b87
Fix links to documentation on https://os.mbed.com
2019-01-21 14:56:40 -08:00
Martin Kojtal
a23a850a42
Merge pull request #9247 from kjbracey-arm/atomic_load_store
...
Add atomic loads and stores and barriers
2019-01-21 13:39:00 +01:00
Kevin Bracey
ab037c6f69
InternetSocket: better protect _callback
...
sigio callbacks can be triggered from interrupt, so changing _callback
needs critical section protection, not just a mutex.
2019-01-18 15:37:11 +02:00
Kevin Bracey
0f6a4cd0bd
InternetSocket: Use atomics, not volatile
...
Use a better tool for the job.
2019-01-18 15:37:11 +02:00
Kevin Bracey
703e44031c
Add atomic loads and stores and barriers
...
Add atomic load and store functions, and add barriers to the existing atomic
functions.
File currently has no explicit barriers - we don't support SMP, so don't
need CPU barriers.
But we do need to worry about compiler barriers - particularly if link time
optimisation is activated so that the compiler can see inside these
functions. The assembler or intrinsics that access PRIMASK for
enter/exit critical act as barriers, but LDREX, STREX and simple
volatile pointer loads and stores do not.
2019-01-18 09:32:04 +02:00
Kevin Bracey
6f757a5824
LoRAWAN: volatile bool -> atomic_flag
...
Now we have a proper atomic flag API, use it rather than a volatile
cheat.
2019-01-14 11:59:25 +02:00
Martin Kojtal
ad76c94369
Merge pull request #9066 from deepikabhavnani/equeue_chain_fixed
...
Equeue chaining bug fixes
2019-01-02 09:16:19 +00:00
Deepika
14606b5e08
Update the unit test stubs as per API changes
2018-12-27 15:44:32 -06:00
Anna Bridge
1d230c1d37
Merge pull request #9168 from JuhPuur/unittest_logging_fix
...
Fix to unit test losing process output due to timing issue
2018-12-24 12:49:26 +00:00
Juhani Puurula
039fbe7e26
Fix to unit test losing process output due to timing issue
2018-12-21 10:24:13 +02:00
Teemu Kultala
b87b52a45c
cellular: AT Handler API changes after review
2018-12-14 13:19:03 +02:00
Teemu Kultala
dbdbae3632
cellular: AT Handler API
2018-12-14 13:19:03 +02:00
Cruz Monrreal
ecd1133baf
Merge pull request #8819 from lorjala/unittests-docs
...
Improve the unit testing documentation
2018-12-13 18:17:12 -06:00
Mel W
b71391040b
Editorial changes
2018-12-13 09:44:13 +02:00
Hasnain Virk
138fd740b7
Unit test fix
...
A missing macro definition is added to the unit-test cmake file for
LoRaPHY class.
2018-12-10 08:53:30 +02:00
Hasnain Virk
ca083671ff
Updating get_rx_window_params() API in stubs
...
Unittest stubs needed to be updated for the API change.
Although this API is private and internal to LoRaPHY, somehow it
appeared in the LoRaPHYStub. Updating it for consistency.
2018-12-10 08:53:30 +02:00
Martin Kojtal
b9927e5f27
Merge pull request #8795 from TeemuKultala/cellular_connect_status_fix
...
cellular: registration status change fix
2018-11-30 14:32:34 +01:00
Deepika
09f4d0bb85
Add stats stub functions to rest of the cmake files
2018-11-26 11:04:37 -06:00
deepikabhavnani
c272377a81
Make sure no memory overhead if statistics are disabled
2018-11-26 09:42:45 -06:00
deepikabhavnani
117eb0bc87
Add socketstats stub functions for unittest and addressed reviews
2018-11-26 09:42:50 -06:00
Teemu Kultala
e767255093
cellular: registration status change unit test fix
2018-11-26 11:58:54 +02:00
Teemu Kultala
af534f592e
cellular: registration status change astyle fix
2018-11-26 11:20:21 +02:00
Teemu Kultala
a1b1d7c4bd
cellular: registration status change fix
2018-11-26 11:20:21 +02:00
Martin Kojtal
b9ea30abf1
Merge branch 'socket_open_deprecated' of https://github.com/michalpasztamobica/mbed-os into dev_rollup
2018-11-23 18:38:02 +00:00
Martin Kojtal
61c7947b47
Merge branch 'cell-trace' of https://github.com/AriParkkila/mbed-os into dev_rollup
2018-11-23 18:37:40 +00:00
Lari-Matias Orjala
2ac557bcb1
update unittesting documentation
2018-11-20 13:04:51 +02:00
Seppo Takalo
8e41cac583
Add license headers into TLSSocket unittests
2018-11-20 11:47:29 +02:00
Seppo Takalo
bdc355f873
Astyle fixes
2018-11-19 15:31:31 +02:00
Seppo Takalo
6192ed1480
Compare the intermediate timestamps as well
2018-11-19 15:19:50 +02:00
Michal Paszta
392bccf835
Add unit tests for TLSSocket and TLSSocketWrapper
...
This also includes their Datagram counterparts: DTLSSocket and DTLSSocketWrapper.
Coverage missing for timer-related functionality, but this would require more advanced stub development.
The extra (d)tls_test_config.h is necessary for successful compilation without HW support for the mbedtls features in unittests.
I reused the mbedtls stub found in features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c and amended it slightly with a few missing functions.
2018-11-19 15:19:49 +02:00
Michal Paszta
42940fab3c
Deprecate TCP/UDPSocket open-calling constructors
...
Updated Doxygen, removed the only one call of the deprecated constructor from the tests.
2018-11-19 12:19:52 +01:00
Ari Parkkila
9bdeb68e74
Cellular: Updated debug prints, and network registration return value
...
Updated cellular debug trace prints:
- Removed unnecessary prints.
- Tracing more in DEBUG level.
- Read/write bytes not printed on big packets.
- Signal quality (RSSI) traced to log network problems.
- Dismissed AT data is traced.
- Modem type and firmware version are traced.
Network registration returns NotRegistered instead of StatusNotAvailable,
because that's not in 3GPP TS 27.007.
2018-11-19 02:55:43 -08:00
Teppo Järvelin
24213b4601
astyles fixes for UNITESTS.
2018-11-16 13:14:38 +02:00
Teppo Järvelin
e5c3024849
Cellular: adding unit tests for new class CellularContext and changed classes.
2018-11-16 13:14:38 +02:00
Cruz Monrreal II
5c1c7bf71f
Merge branch 'fix_astyle_error' of ssh://github.com/0xc0170/mbed-os into rollup-b.1
2018-11-15 18:26:09 -06:00
Cruz Monrreal II
8cbd310858
Merge branch 'Lora_compliance' of ssh://github.com/AnttiKauppila/mbed-os into rollup-b.1
2018-11-15 18:26:06 -06:00
Martin Kojtal
a2bced7db5
Merge branch 'lora_ut_fix' of https://github.com/AnttiKauppila/mbed-os into dev_rollup
2018-11-15 14:05:00 +00:00
Martin Kojtal
3f289c217f
unittest: fix stubs coding style
2018-11-15 10:47:14 +00:00
Martin Kojtal
53c427735c
filehandle test: fix coding style
2018-11-15 07:20:12 +00:00
Anna Bridge
4d07bcbd6e
Merge pull request #8579 from jarvte/cellular_context
...
Major refactoring: changing Network inheritance from CellularNetwork to new class CellularContext
2018-11-14 14:37:19 +00:00
Antti Kauppila
cf53494f2e
Compliance test errors fixed
2018-11-14 09:46:38 +02:00
Teppo Järvelin
14f3740c13
Cellular: fixed cellular greentea tests after major refactoring.
2018-11-13 18:33:55 +02:00
Antti Kauppila
077777163e
LoRaWANTimer UT fixed
2018-11-13 13:58:31 +02:00
Seppo Takalo
619bcb5b4e
Implement Socket::getpeername() API
...
This is equivalent of POSIX getpeername() function. It allows to
get remote address associated with the socket.
For example:
socket *s = server.accept();
SocketAddress remote;
s->getpeername(&remote);
2018-11-13 11:02:51 +02:00
Teppo Järvelin
1a047efade
Cellular: review fixes, added missing fixes from master.
2018-11-11 14:13:05 +02:00
Teppo Järvelin
9fb83024ea
Changed CellularContext to inherit from CellularBase instead of NetworkInterface. \n Changed Device constructor to take Filehandle instead of eventqueue.
2018-11-11 14:13:05 +02:00
Teppo Järvelin
43e08a0adf
Cellular: fixing unit test after refactor.
2018-11-11 14:12:49 +02:00
Martin Kojtal
79d4fd8173
tests: fix coding style
2018-11-08 08:54:29 +00:00
Antti Kauppila
8cdf1d34fc
Unittest fixes
2018-11-01 14:57:18 +02:00
Cruz Monrreal
13d6703676
Merge pull request #8401 from mirelachirica/at_handler_changes_2
...
At handler fixes
2018-10-29 12:07:07 -05:00
Cruz Monrreal
9403a2f16c
Merge pull request #8499 from michalpasztamobica/master
...
Socket closing improvements and tests adjustments
2018-10-29 08:47:25 -05:00
Mirela Chirica
c8f2ed3d30
Cellular: ATHandler to reset match URC generated errors and continue response handling
2018-10-29 13:33:11 +02:00
Mirela Chirica
f016d1126f
Cellular: AT handler to support only one callback per URC/prefix
2018-10-29 13:32:15 +02:00
Michal Paszta
0da0f16d60
TCPSocket accept refactored to close cleanly and icetea test added
...
Private constructor called in TCPSocket accept, when creating a new Socket.
Close() method calls moved "up" to InternetSocket.
InternetSocket::close() returns proper error code when no socket available.
Add TcpSocket::accept icetea tests.
Deleting sockets moved to teardown.
2018-10-26 12:02:25 +03:00
Martin Kojtal
6efa4f293c
unittest: fix style for empty functions
2018-10-25 09:58:19 +01:00
Martin Kojtal
3a5ef5ee24
unittests: fix astyle
2018-10-25 09:58:18 +01:00
Martin Kojtal
7cd1478147
Merge pull request #8003 from Taiki-San/patch-2
...
Leverage the simplification of the IPv6 parsing primitive
2018-10-24 14:13:16 +01:00
Cruz Monrreal
69904ea43e
Merge pull request #8313 from kivaisan/reduce_memory_footprint
...
Reduce cellular memory footprint
2018-10-23 09:05:39 -05:00
Taiki
3bc33f6c3e
Use the parsing status as a way to detect if the IP string represent a valid IPv6 address
2018-10-23 11:25:52 +02:00
Cruz Monrreal
ba23fef90b
Merge pull request #8350 from mirelachirica/at_consume_to_tag_fix
...
Cellular: Fix for AT handler consume to tag
2018-10-22 19:45:24 -05:00
Kimmo Vaisanen
963bf8146d
Cellular: Refactor basic AT command stop and response reading into own method
...
This reduces ROM usage by few hundred bytes.
2018-10-22 09:44:12 +03:00
Mirela Chirica
31f153af7d
Cellular: Fix for AT handler consume to tag
...
If sequence from buffer contains tag but symbol before tag is same as
first symbol of the tag, then the tag wasn't detected.
For example, "\r\n" tag was not found from "\r\r\nOK" sequence.
2018-10-19 15:21:02 +03:00
Cruz Monrreal II
1febe31d8d
Merge branch 'upd-doc' of ssh://github.com/lorjala/mbed-os into rollup
2018-10-18 20:01:41 -05:00
Antti Kauppila
f0864be1c5
Fixed lorawan unittests valgrind issues
2018-10-17 15:25:53 +03:00
Hasnain Virk
9c3f73b8ed
Unit test fix for cancel_send()
...
PR 8299 went in but correct unit tests were not there.
This commit is adding proper unittests for 8299.
2018-10-16 19:14:51 +03:00
Hasnain Virk
3bfef7f43f
Unit Test Fixes for LoRaWAN
...
Missing methods are added.
Logic was broken at various places which needed to be fixed.
2018-10-16 12:23:21 +03:00
Cruz Monrreal
00f8ecfb7a
Merge pull request #8336 from sentinelt/socket-closed
...
Fix hard-fault when socket created using accept() is closed
2018-10-15 10:22:17 -05:00
Cruz Monrreal
ec03df4823
Merge pull request #7980 from kjbracey-arm/thread_deprecations
...
Clean up rtos::Thread deprecation warnings
2018-10-15 10:09:55 -05:00
Lari-Matias Orjala
76b15726a4
update unit testing documentation for Mac OS Mojave
2018-10-15 09:02:52 +03:00
Cruz Monrreal II
0f8e337547
Merge branch 'unittests-docs' of ssh://github.com/lorjala/mbed-os into lorjala-unittests-docs
2018-10-12 12:07:03 -05:00
Kevin Bracey
1ef213ec89
Clean up Thread deprecation warnings
...
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Cruz Monrreal
21b4ecad1a
Merge pull request #8316 from michalpasztamobica/master
...
unittests: Add tests for netsocket classes
2018-10-10 10:11:12 -05:00
Mirela Chirica
ffb9cdb4b3
Cellular: Registration parameters as struct
2018-10-09 10:49:47 +03:00
Mirela Chirica
723e913bcc
Cellular: AT handler read string up to delimiter or stop tag
2018-10-09 10:47:25 +03:00
Cruz Monrreal
b15d09173e
Merge pull request #8315 from kivaisan/fix_cellular_unittests
...
Fix cellular unittests
2018-10-08 10:24:31 -05:00
Michal Paszta
5b4634a1fe
unittests: Added tests for netsocket classes
...
New classes covered with unit tests: SocketAddress, EthernetInterface, EMACInterface, WiFiAccessPoint.
Also added missing namespace in front of mbed::Callback usages.
EMACInterface is covered by the EthernetInterface unit tests.
2018-10-08 14:21:01 +02:00
Sławek Piotrowski
9b89ad2fa9
Fix hard-fault when socket created using accept() is closed
...
When socket created using accept() is closed by calling the close()
method, "delete this" is executed which triggers the destructor call
on TCPSocket which in turn calls close() once again. Because _stack
is already 0 this results in a hard-fault.
Add a check that skips the rest of the close() method is the _stack
is already 0.
2018-10-06 21:15:29 +02:00
Kimmo Vaisanen
b57bc3d044
Cellular: Fix ATHandler_stub compiler warnings
2018-10-03 14:46:45 +03:00
Kimmo Vaisanen
05f0ba8e97
Cellular: Fix AT_CellularStack unittest
...
Missing CellularSocket constructor caused uninitialized values to be used.
Also changed comparision macros to ASSERT_EQ as suggested by GoogleTest guide.
2018-10-03 14:44:34 +03:00
Antti Kauppila
48e2ccd006
equeue_stub updated and code fixed accordingly
2018-09-27 12:26:48 +03:00
Antti Kauppila
a54c271814
cmake Paths corrected
2018-09-27 11:30:52 +03:00
Antti Kauppila
f6ecb319d0
LoRaMac unittested
2018-09-27 11:30:52 +03:00
Antti Kauppila
bd9066431f
LoRaWANStack unit tested
2018-09-27 11:30:52 +03:00
Antti Kauppila
e07940d5e7
LoRaMacCrypto unittested
2018-09-27 10:49:07 +03:00
Antti Kauppila
f3d402f70e
LoRaPHY unittested, small fixed done during tests
2018-09-27 10:49:07 +03:00
Antti Kauppila
0f8cfd8631
LoRa regions unittested, stubs licences revisited
2018-09-27 10:49:07 +03:00
Antti Kauppila
445384852e
LoraPhy and regions unit test skeletons added
2018-09-27 10:49:07 +03:00
Antti Kauppila
b6848c4ea4
Unit test for LorawanInterface
2018-09-27 10:49:07 +03:00
Antti Kauppila
595caf6699
LorawanInterface unit test added
2018-09-27 10:49:07 +03:00
Antti Kauppila
0f83f08043
More lorawan unit tests added
2018-09-27 10:49:07 +03:00
Antti Kauppila
b6465340b5
Lorawan unittests
2018-09-27 10:49:07 +03:00
Amanda Butler
027e030d76
Edit README.md
...
Edit readme.
2018-09-26 12:00:47 -05:00
Martin Kojtal
4957dd537e
Merge pull request #8138 from michalpasztamobica/master
...
Unit tests for TCPSocket, TCPServer, UDPSocket, NetworkStack, InternetSocket
2018-09-26 09:38:20 +02:00
Martin Kojtal
fc820f539c
Merge pull request #8154 from lorjala/unittests-coveragefiltering
...
Unit tests: add code coverage filtering
2018-09-26 09:37:46 +02:00
Mirela Chirica
30da9c1965
Cellular: Fix cellular util unit test
2018-09-24 15:15:59 +03:00
Mirela Chirica
983425e4fc
Cellular: Fix cellular network unit test
2018-09-24 15:15:18 +03:00
Lari-Matias Orjala
00397b232c
Unit tests: improve argument checking in coverage.py
2018-09-24 11:41:34 +03:00
Lari-Matias Orjala
04c98b0223
add coverage filtering
2018-09-24 11:41:34 +03:00
Lari-Matias Orjala
4687e50dfd
Improve unit testing instructions.
2018-09-24 11:26:21 +03:00
Martin Kojtal
c503dedac6
Merge pull request #8212 from lorjala/unittests-docs
...
Unit tests: update README.md
2018-09-24 08:34:27 +02:00
Cruz Monrreal
da0c5d9a71
Merge pull request #8182 from lorjala/fix_unittests
...
Unit tests: fix cellular athandler unit tests and wait() declaration conflict
2018-09-21 21:30:50 -05:00
Seppo Takalo
b98e6b6c23
Use SocketAddr that actually has IP bytes in UDP test
2018-09-21 14:35:12 +03:00
Seppo Takalo
fa7547abd4
Fix TCPSocket::accept() unittest.
...
accept() is not anymore returning NULL pointer. It was a bug.
2018-09-21 14:23:06 +03:00
Michal Paszta
72233b01dd
unittests: Add tests for NetworkStack class.
...
Improved the stubs for event queue and nsapi_dns, to allow checking if callback are handled correctly. This involves some memory allocation and deallocation.
The NetworkStackWrapper is not covered as it seems to be deprecated code.
2018-09-21 14:23:06 +03:00
Michal Paszta
aa90f5bb78
unittests: Add TCPServer unit tests
...
TCPServer class only really implements attach method.
2018-09-21 14:23:06 +03:00
Michal Paszta
51dedfd873
unittests: Added NetworkInterface unit tests
...
Most functions are empty or simply return "UNSUPPORTED", but it is still worth covering this functions with unit tests to have better control of unwanted changes.
2018-09-21 14:23:06 +03:00
Michal Paszta
d740d698ba
unittests: InternetSocket class coverage improved.
...
Added more tests, improved the existing ones. setblocking tests were not checking anything, so they were removed and these functions are called in TCPSocket tests instead.
2018-09-21 14:23:06 +03:00
Michal Paszta
e609e2fc5e
unittests: Check NULL pointer scenario in TCPSocket::recvfrom
2018-09-21 14:23:05 +03:00
Michal Paszta
5a74481a2a
unittests: improved coverage for UDPSocket and TCPSocket
...
Add functional and line coverage for UDPSocket and TCPSocket. The EventFlagsstub and NetworkStackstub classes are allowed to store multiple return values to allow running internal loops multiple times.
2018-09-21 14:23:05 +03:00
Lari-Matias Orjala
60bb9b7678
replace missing types
2018-09-21 13:00:47 +03:00
Lari-Matias Orjala
e1f22e4982
update UNITTESTS/README.md
2018-09-21 11:55:08 +03:00
Martin Kojtal
082ba151ac
Merge pull request #8112 from studavekar/update_doc_unittest
...
specify mbed-cli version requirement
2018-09-21 09:48:26 +02:00
Martin Kojtal
83fc2e2d20
Merge pull request #8176 from AnttiKauppila/ut_fix
...
CellularDevice_stub added
2018-09-20 15:14:35 +02:00
Lari-Matias Orjala
8ff0ec7814
fix athandler unit tests and declaration conflict
2018-09-19 15:42:33 +03:00
Lari-Matias Orjala
8f340b1953
remove test suite names from cellular tests
2018-09-19 11:19:27 +03:00
Lari-Matias Orjala
e0e759e0a4
update test file generator
2018-09-19 11:10:40 +03:00
Lari-Matias Orjala
3e7ee6c4d1
add auto-naming of unit test suites
2018-09-19 11:10:40 +03:00
Antti Kauppila
4f97eaee67
CellularDevice_stub added
2018-09-19 10:30:43 +03:00
Antti Kauppila
2b7a087849
Rebased & fixed
2018-09-17 12:07:43 +03:00
Antti Kauppila
a6b4938844
Small improvements for test cases
2018-09-17 12:07:43 +03:00
Antti Kauppila
adc4ce4385
Old Cellular UNITTESTS removed
2018-09-17 12:07:43 +03:00
Antti Kauppila
9f9aa4a210
cellular unittests ported to googletest framework
2018-09-17 12:07:43 +03:00
Cruz Monrreal
aee6325baa
Merge pull request #8123 from lorjala/fix_coverage_excludes
...
Unit tests: fix coverage exclude paths on Windows
2018-09-14 22:58:11 -05:00
Cruz Monrreal
48d212fe51
Merge pull request #8086 from SeppoTakalo/fix_socketaddr_unittests
...
Fix SocketAddress unittests
2018-09-14 10:34:37 -05:00
Lari-Matias Orjala
cad2761687
fix coverage exclude paths on Windows
2018-09-13 20:30:08 +03:00
Cruz Monrreal
2e5e23f7c1
Merge pull request #8066 from bridadan/move_unittest_paths_to_hyphens
...
Move unittest paths to hyphens
2018-09-13 11:03:01 -05:00
studavekar
493a8cd4a7
specify mbed-cli version requirement
2018-09-13 03:06:42 -05:00
Jenny Plunkett
8af0afdd2e
Fix quotes around gcovr install command
2018-09-11 17:07:02 -05:00
Seppo Takalo
7c6f1c38a8
Fix SocketAddress unittests
...
Add ip4tos() and stoip4() into unittests.
NOTE: Probably should have been stubbed but this way we can also
test these helper functions.
2018-09-11 18:19:11 +03:00
Brian Daniels
0bda46df07
Moving all unit tests to use hyphenated test name
2018-09-10 13:42:51 -05:00
Brian Daniels
ebd1c16c9e
Updating readme to use hyphens for unittest paths
2018-09-10 12:12:38 -05:00
Martin Kojtal
970bc7369c
Merge pull request #7985 from theotherjimmy/update-unittest-subcommand
...
Unittesting: Update Mbed CLI subcommand in Readme
2018-09-06 15:11:43 +02:00
Lari-Matias Orjala
4b042271d6
fix mutex stub for unit tests
2018-09-05 13:41:35 +03:00
Jimmy Brisson
6dcd9e13b3
Update mbed-cli subcommand
2018-09-04 10:47:04 -05:00
Lari-Matias Orjala
4cf98dda6d
Unittests: update documentation for Windows
2018-08-28 09:23:25 +03:00
Lari-Matias Orjala
4dde13db6d
Add unit testing framework
2018-08-27 14:32:35 +03:00