Commit Graph

180 Commits

Author SHA1 Message Date
Johan Hedberg
c2e5d1ff16 unit: Fix gobex GPL version reference
These files (like everything else in the tree) should be GPL 2 or later
instead of GPL 2 only.
2013-02-15 16:19:54 +02:00
Marcel Holtmann
fbd7494672 unit: Add extracted UUID string list to each test case 2013-01-27 06:04:18 +01:00
Marcel Holtmann
9553437865 unit: Compare UUID list from EIR data 2013-01-27 06:04:11 +01:00
Marcel Holtmann
d00eeba33b unit: Print UUID list from EIR parsing in verbose mode 2013-01-27 05:36:49 +01:00
Marcel Holtmann
1939c1f2d5 unit: Add inquiry data from Nokia Reaction BH-907 headset for testing 2013-01-27 05:20:57 +01:00
Marcel Holtmann
45e206e859 unit: Include tests for TX power from EIR and AD 2013-01-27 05:20:16 +01:00
Marcel Holtmann
bebc286724 unit: Add inquiry data from Gigaset SL400H and SL910 for teseting 2013-01-25 01:57:37 +01:00
Marcel Holtmann
7921f73379 unit: Add advertising data from Wahoo scale for testing 2013-01-23 15:24:23 -08:00
Luiz Augusto von Dentz
ce3b4e0817 unit: Add gdbus/client_get_uint64_property 2013-01-18 13:33:43 +02:00
Luiz Augusto von Dentz
3cbdf5607d unit: Add gdbus/client_get_array_property 2013-01-18 13:33:43 +02:00
Luiz Augusto von Dentz
84bf1800e3 unit: Add gdbus/client_get_boolean_property 2013-01-18 13:33:43 +02:00
Luiz Augusto von Dentz
ecb4a6c9d1 unit: Add gdbus/client_get_string_property 2013-01-18 13:33:43 +02:00
Luiz Augusto von Dentz
e0ef7d52a1 unit: Add gdbus/client_get_dict_property 2013-01-18 13:33:42 +02:00
Marcel Holtmann
89176f5763 unit: Add advertising data from MIO Alpha heartrate watch for testing 2013-01-16 10:50:17 -08:00
Anderson Lizardo
53da9df4da unit: Add tests for SDP integer Data Elements
SDP_DATA_NIL does not have a value, but its sdp_data_t val field is
zeroed by memset(), so just treat it as UINT8 with zero value to
simplify checking (and not require a separate macro.)

SDP_BOOL is handled by SDP library as a INT8.

SDP_UINT128/SDP_INT128 are just byte arrays converted to host order, so
use memcmp() to compare them (converting from host to network order
first.)
2013-01-16 14:35:07 +02:00
Anderson Lizardo
cc291810aa unit: Add {TEXT,URL}_STR{8,16} tests for sdp_extract_attr()
These tests are for valid data. Other tests might be added later to
check for error paths, but will require separate macros.

{TEXT,URL}_STR32 cannot be tested with the same macros because
sdp_extract_attr() does not support them. They will be tested
separately with other SDP library functions.

As example of failure output, if commit
504a0cf46a is reverted for testing, the
STR16 test will fail with:

ERROR:unit/test-sdp.c:776:test_sdp_de_attr: assertion failed
(test->input_size == size): (7 == 11)
2013-01-16 14:35:05 +02:00
Marcel Holtmann
58ac0d24a0 unit: Add advertising data from Citizen Proximity watch for testing 2013-01-12 19:00:10 -08:00
Marcel Holtmann
97a841008c unit: Providing empty info() implementation is no longer needed 2013-01-10 20:06:14 -08:00
Anderson Lizardo
7699549b26 unit: Fix remaining references to bluetooth/uuid.h
These headers are not public anymore, so need to use "lib/uuid.h".
2013-01-10 15:12:32 +02:00
Anderson Lizardo
e90c260d7d unit: Avoid D-Bus calling _exit() during SDP tests
While running tests, the D-Bus library was set to call _exit() when the
client leaves the bus. This caused the second test to be interrupted
without providing a PASS/FAIL result. This was confirmed by running
test-sdp with DBUS_VERBOSE=1.

This commit disables this behavior, which does not exist on BlueZ
because g_dbus_set_disconnect_function() implicitly does this.
2013-01-10 14:29:07 +02:00
Anderson Lizardo
6600b2585b unit: Print D-Bus error message in verbose mode
If g_dbus_setup_private() fails (e.g. a session bus is not available,
and there is no X11 for dbus-launch to work), the tests are silently
skipped.

With this commit, the D-Bus error message is also printed if verbose
mode is enabled. The test is still skipped as before.
2013-01-09 17:22:46 -08:00
Marcel Holtmann
38c4c17d55 unit: Add advertising data from Cookoo watch for testing 2013-01-09 11:35:33 -08:00
Anderson Lizardo
47f40b5584 unit: Rename x_pdu() macro on SDP test program
Using the "raw_data" name makes sense, given the macro is just casting
input (raw) data. It will also be reused in other tests with raw input
data.

Also fix this minor checkpatch.pl error:

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in
parenthesis
+#define raw_data(args...) (const unsigned char[]) { args }
2013-01-09 11:09:37 -08:00
Anderson Lizardo
c71f05f6a1 unit: Reuse define_test() macro for /TP/SERVER/BRW/* tests
This is made possible by adding the mtu parameter, given
/TP/SERVER/BRW/* tests use MTU of 672.
2013-01-09 11:08:02 -08:00
Syam Sidhardhan
4c4872c0bd unit: Replace g_test_fail() with g_assert_not_reached()
g_test_fail() is introduced in Glib v2.30 and we are using Glib v2.28 as
the minimum requirement for the build. This patch resolves the
compilation error that happen with Glib v2.28.

Error log:
  CC     unit/test-mgmt.o
unit/test-mgmt.c: In function ‘check_actions’:
unit/test-mgmt.c💯2: error: implicit declaration of
    function ‘g_test_fail’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[1]: *** [unit/test-mgmt.o] Error 1
make: *** [all] Error 2
2013-01-09 11:13:59 +02:00
Johan Hedberg
8aa2d757f5 unit: Fix hardcoded test for complete name in EIR 2013-01-09 10:27:05 +02:00
Marcel Holtmann
989cd2fd81 unit: Add advertising data from Wahoo BlueSC for testing 2013-01-08 22:30:01 -08:00
Marcel Holtmann
040000d653 unit: Add inquiry data from Nike+ FuelBand for testing 2013-01-08 20:10:02 -08:00
Marcel Holtmann
85f5c707b4 unit: Add inquiry data from iPhone 5 and iPad mini for testing 2013-01-08 20:05:53 -08:00
Marcel Holtmann
b3e78d7eec unit: Add inquiry data from MacBook Air for testing 2013-01-08 19:45:28 -08:00
Marcel Holtmann
31a9d40c89 unit: Remove the unused pdu_id value from the SDP tests 2013-01-07 13:19:52 -08:00
Marcel Holtmann
56e07cd72a unit: Add SDP Service Search Attribute Requests attribute responses 2013-01-07 00:25:49 -08:00
Marcel Holtmann
4c5fe173fa unit: Add SDP Service Search Attribute Requests success responses 2013-01-07 00:25:49 -08:00
Marcel Holtmann
7c44bc4e7b unit: Add SDP Service Search Attribute Requests with an empty response 2013-01-06 18:50:12 -08:00
Marcel Holtmann
916a29bac4 unit: Fix a few memory leaks with the SDP record registration 2013-01-06 16:20:16 -08:00
Marcel Holtmann
24aa8a8a33 unit: Provide static test data and dynamically allocated PDUs 2013-01-06 16:19:29 -08:00
Marcel Holtmann
4aeb8b5979 unit: Add test cases for SDP Service Browse handling 2013-01-06 15:29:59 -08:00
Marcel Holtmann
60faa1eb04 unit: Add SDP Service Search Attribute Requests invalid behavior tests 2013-01-06 15:23:51 -08:00
Marcel Holtmann
ed0ee6eb93 unit: Add support for SDP test cases with different MTU settings 2013-01-06 15:19:13 -08:00
Marcel Holtmann
323eede967 unit: Add test cases for SDP Service Attribute Requests 2013-01-06 14:38:40 -08:00
Marcel Holtmann
1e2c32119d unit: Add test cases for SDP Service Search Requests 2013-01-06 14:37:36 -08:00
Marcel Holtmann
60aa371009 unit: Create a more flexible framework for SDP testing 2013-01-06 14:36:26 -08:00
Anderson Lizardo
010982b026 unit: Fix compilation issue with ignored return value
Fix this compilation warning:

unit/test-sdp.c: In function ‘send_pdu’:
unit/test-sdp.c:600:7: error: ignoring return value of ‘write’, declared
with attribute warn_unused_result [-Werror=unused-result]
2013-01-04 16:17:47 +02:00
Marcel Holtmann
187da51fb3 unit: Add tool for testing the SDP protocol PDUs 2013-01-03 21:26:54 -08:00
Marcel Holtmann
d146d07c9a unit: Add simpler mgmt unit test utility 2013-01-03 15:51:30 -08:00
Marcel Holtmann
55dcb118b8 unit: Use separate context for each D-Bus test case 2013-01-02 15:35:37 -08:00
Marcel Holtmann
0bca38fad0 unit: Update D-Bus client helper test handling 2012-12-28 00:10:07 -08:00
Cristian Rodríguez
b6268e1350 unit: Fix missing config.h includes 2012-12-23 18:58:11 -08:00
Marcel Holtmann
bea034e821 unit: Fix issue with D-Bus client unit test when building packages 2012-12-18 00:12:35 +01:00
Marcel Holtmann
81ae935d1b unit: Add test case for D-Bus client connect/disconnect handling 2012-12-16 23:03:16 +01:00