Hi Marcel, On 3 March 2014 16:23, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: > Hi Marcin, > >> unit/test-hfp.c | 31 +++++++++++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> >> diff --git a/unit/test-hfp.c b/unit/test-hfp.c >> index 5e4fc11..64ecc60 100644 >> --- a/unit/test-hfp.c >> +++ b/unit/test-hfp.c >> @@ -266,6 +266,33 @@ static const struct test_data test_register_2 = { >> .prefix = prefix_brsf >> }; >> >> +static const char atbrsf_read[] = {'A', 'T', '+', 'B', 'R', 'S', 'F', '?', >> + '\r'}; >> + > > = "AT+BRSF?\r"; > >> +static const struct test_data test_register_3 = { >> + .command_cb = cmd_handler, >> + .server_send = atbrsf_read, >> + .data_len = sizeof(atbrsf_read), >> + .expected_rsp = err_rsp, >> + .expected_rsp_len = sizeof(err_rsp), >> + .result_cb = prefix_handler, >> + .expected_cmd_type = HFP_GW_CMD_TYPE_READ, >> + .prefix = prefix_brsf >> +}; >> + >> +static const char prefix_d[] = "D"; > > I wonder why here it is acceptable and above you are making the huge effort to give every character separately. > > Regards > > Marcel > I thought it will be more readable if raw data passed to socket will be declared as array, not string. Prefixes are passed as strings, because they are used in hfp_gw_register() Anyway Luiz suggested to use common framework for this test like raw_pdu(args...) , define_test(name, function, args...), (it is used in test-avctp and test-avrcp). Will it look better for you? BR Marcin -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html