Niranjhana N
e21e6c1b97
tests: posix: improve pthread_key test
...
In addition to testing all the APIs, this enhancement
tests the following two scenarios
- when multiple threads use a single key for storage
- when a single thread associates its value with
multiple keys
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-08-13 04:48:48 -07:00
Sebastian Bøe
c9e12493b2
cmake: Remove duplicate invocations of target_link_libraries on app
...
It is not necessary to link 'app' with ELMFAT or NFFS because their
usage requirements are covered by the 'APP_LINK_WITH_MBEDTLS'
mechanism that automatically links 'app' with the interface library
FS.
This patch removes the redundant target_link_libraries invocations.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-07-25 08:27:45 -04:00
Niranjhana N
8891beaf84
tests: posix: add test for pthread_key
...
Added a simple test case for pthread_key, which
tests all the APIs - the thread creates a key,
sets a value to the key, retrieves and asserts
they are equal, and then deletes the key.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-07-19 08:46:33 -04:00
Anas Nashif
9b2880fe6e
tests: posix: fix meta-data and rename test file
...
Be consistent with other posix tests, and name main file main.c.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-11 17:11:18 -04:00
Sritej Kanakadandi Venkata Rama
f5bf2816df
tests: posix: Function call return values need to be validated.
...
In this fix we are asserting the return value of pthread_attr_init.
Resolves #7084
Coverity-CID: 185280
Signed-off-by: Sritej Kanakadandi Venkata Rama <sritej.kvr@gmail.com>
2018-06-01 14:59:10 -04:00
Anas Nashif
9a28c87b42
tests: posix: rename entry file to main.c
...
Change all tests to have main.c as the main file.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-28 08:52:46 -04:00
Spoorthi K
21792fa020
tests: posix: timer: Fix integer handling issues
...
Fixes coverity issue and some cosmetic issues through uncrustify.
Fixes: GH-6667
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-05-25 09:30:20 -07:00
Punit Vara
843ad8b07e
tests: semaphore: Check return value
...
Check return value for pthread_create()
issue: #6701
Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-24 14:25:25 -07:00
David B. Kinder
071b1bd6b6
doc: fix misspellings in test documentation
...
Found some misspellings missed during normal review
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-23 15:27:19 -05:00
Ramakrishna Pallala
dccd275349
tests: posix: fs: Free dirp resource in case error
...
Free dirp reosurce by calling closedir() in case of
readdir() error.
CID: 186040
CID: 186043
Fixes Issues #7731 #7728
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-23 13:14:17 -04:00
Punit Vara
7a3ace35dd
tests: Remove newline character
...
Remove new line character from all zassert_*
messages. Following script has been used to do this.
https://github.com/punitvara/scripts/blob/master/remove_newlinech.py
zassert test framework adds newlines character implicitly.
issue: #7170
Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-23 12:59:12 -04:00
Ramakrishna Pallala
4c7a44b56d
tests: posix: Fix pthread attribute initialization
...
Fix pthread_rwlock test pthread attributes initialization.
Fixes Issue #7569
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-22 08:58:59 -04:00
Punit Vara
5e87c08a39
tests: posix: Increase sram size
...
Increase sram to avoid overflow due to new posix apis and structure
changes.
Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-18 23:02:28 +03:00
Punit Vara
f0eaa8e879
tests: mutex: Add test case to test mutex API
...
This test case tests posix mutex apis.
Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-18 23:02:28 +03:00
Ramakrishna Pallala
c1200cd3e2
tests: posix: fs: Add description for test cases
...
Add description for POSIX File System API test cases.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-18 17:01:41 +03:00
Ramakrishna Pallala
55cf6dd76c
tests: posix: Add test for Posix File System API's
...
Added a test to verify Posix File System API's.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-18 13:32:36 +03:00
Andy Gross
5575487da6
tests: posix: Fix sigevent initialization
...
This patch fixes a couple of coverity issues pertaining to
uninitialized members of a sigevent structure.
Coverity-ID: 183070
Coverity-ID: 185276
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-05-11 16:52:19 -04:00
Anas Nashif
0f5a88b0ef
tests: posix: mqueue remove extra printk
...
Remove useless printk at the end of the tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-25 14:18:15 +05:30
Anas Nashif
89a50932d3
tests: posix: style, tag, and category fixes
...
Fix coding style, test tags and use categories.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-25 14:18:15 +05:30
Anas Nashif
8e8d6de6f7
tests: posix: fix tags and sections
...
Improve tagging and fix test names.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Ramakrishna Pallala
46931c9a44
tests: posix: Resolve header file dependencies
...
Fixed header file dependencies by reordering the
inclusion sequence in posix tests.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-04-05 16:43:05 -04:00
Niranjhana N
80e221618d
tests: posix: add more tests
...
Added posix_checks, which checks supported priorities,
clocks and timer APIs, mainly in the point of negative
tests to increase code coverage.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-04-03 15:57:14 -04:00
Niranjhana N
2ecaee071c
tests: posix: Fixing pthread attr object initialization.
...
In some cases pthread attrib initialization may fail as
garbare value may indicate that this attribute is already
initialized. Destroy the attr object and recreate it.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
2018-04-03 15:57:14 -04:00
Youvedeep Singh
2486d5a2d2
tests: posix: mqueue: Add test for posix message queue APIs.
...
Added new test for message queue APIs.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-04-03 15:30:44 -04:00
Juan Manuel Torres Palma
4aa49053f6
tests: posix: fix semaphore.h test
...
Previous implementation was buggy, destroying
resources with pending thread and race conditions.
New version tests basic functionality with 2
threads and basic synchronization.
Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
2018-03-21 14:27:47 -07:00
Punit Vara
9edc7ce490
tests: semaphore: test APIs
...
Test sem_destroy and sem_trywait.
Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-03-10 21:30:14 -05:00
Youvedeep Singh
dbb6511c90
tests: posix: pthread_cancel: Added some APIs in test.
...
Added some APIs in test to increase code coverage.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-03-07 08:23:09 -05:00
Youvedeep Singh
5dd4ac9270
tests: posix: timer: Added some APIs in test.
...
Added some APIs in test to increase code coverage.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-03-07 08:23:09 -05:00
Youvedeep Singh
38a9a36b3e
tests: posix: pthread_rwlock: Added more APIs in test.
...
Added some APIs in test to increase in code coverage.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
2018-03-07 08:23:09 -05:00
Anas Nashif
f6558f57c9
tests: pthread: use posix semaphore
...
Now that we have sempahores, use them in the thread test.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-06 22:40:04 -05:00
Anas Nashif
0a59c6b30a
tests: posix: add negative testing for semaphore
...
More asserts on API calls and error handling.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-06 22:40:04 -05:00
Anas Nashif
d5e8a2c5a1
tests: posix: fix test names in yaml
...
Use meaningful test names.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-06 22:40:04 -05:00
Anas Nashif
13e1718660
tests: move posix layer tests out of kernel
...
Put everything under tests/posix, this is not stirctly part of the
kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-03-06 22:40:04 -05:00
Punit Vara
0306344f59
tests: add semaphore posix API test
...
This test case tests posix APIs which are implemented for semaphore.
Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-03-05 20:51:36 -05:00