Skip to content

Commit

Permalink
test(edgesec): test "ATTACH" to ap server
Browse files Browse the repository at this point in the history
Currently, only the OpenWRT test presets of OpenWRT sends an "ATTACH" command to the AP server, which is compiled with GCC.

This causes an issue with code-coverage, because this means that this branch is only covered by code compiled/tested with
GCC, and not via LLVM/Clang. Testing this branch in Clang
should fix this code-coverage issue.
  • Loading branch information
aloisklink committed Mar 3, 2023
1 parent 39baecc commit 16c0704
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_edgesec.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ static void test_edgesec_ap_failure(void **state) {
{
int sfd = create_domain_client(NULL);
assert_return_code(sfd, errno);
// should do nothing (just log RECEIVED ATTACH)
assert_return_code(write_domain_data_s(sfd, ATTACH_AP_COMMAND,
strlen(ATTACH_AP_COMMAND),
socket_path),
errno);
ssize_t send_invalid_cmd_bytes = write_domain_data_s(
sfd, "INVALID COMMAND", strlen("INVALID COMMAND"), socket_path);
close_domain_socket(sfd);
Expand Down

0 comments on commit 16c0704

Please sign in to comment.