diff options
author | Marcin Kraglak <marcin.kraglak@tieto.com> | 2014-01-10 10:18:23 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-16 12:23:15 +0200 |
commit | 96283b9a5b65ada7e4c34111dc87776b07dbc117 (patch) | |
tree | fd522a4eb89b3a18692532a85502452962c62381 | |
parent | 292cd05057ee6214298ff659da3f5a4739326939 (diff) |
tools/rfcomm-tester: Add Connection refused client test case
This will test RFCOMM client connection to wrong server channel.
-rw-r--r-- | tools/rfcomm-tester.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c index 271f5540f..f471c3b5b 100644 --- a/tools/rfcomm-tester.c +++ b/tools/rfcomm-tester.c @@ -262,6 +262,12 @@ const struct rfcomm_client_data connect_success = { .client_channel = 0x0c }; +const struct rfcomm_client_data connect_nval = { + .server_channel = 0x0c, + .client_channel = 0x0e, + .expected_connect_err = -ECONNREFUSED +}; + static void test_basic(const void *test_data) { int sk; @@ -399,6 +405,8 @@ int main(int argc, char *argv[]) setup_powered_client, test_basic); test_rfcomm("Basic RFCOMM Socket Client - Success", &connect_success, setup_powered_client, test_connect); + test_rfcomm("Basic RFCOMM Socket Client - Conn Refused", + &connect_nval, setup_powered_client, test_connect); return tester_run(); } |