Skip to content

Commit

Permalink
[tests] Attempt to fix compatibility break from SAI headers (#3321)
Browse files Browse the repository at this point in the history
Error is show up when we move sai headers from v1.14 to v1.15

sonic-net/sonic-sairedis#1431 (comment)

What I did
Fix tests so they can pass during backward compatibility break
  • Loading branch information
kcudnik authored Oct 16, 2024
1 parent 55fd3f1 commit 90fcead
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/mock_tests/portsorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ namespace portsorch_test
mockReply->element[2] = (redisReply *)calloc(sizeof(redisReply), 1);
mockReply->element[2]->type = REDIS_REPLY_STRING;
sai_port_oper_status_notification_t port_oper_status;
memset(&port_oper_status, 0, sizeof(port_oper_status));
port_oper_status.port_state = oper_status;
port_oper_status.port_id = port.m_port_id;
std::string data = sai_serialize_port_oper_status_ntf(1, &port_oper_status);
Expand Down
4 changes: 3 additions & 1 deletion tests/mock_tests/switchorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ namespace switchorch_test
initSwitchOrch();

sai_timespec_t timestamp = {.tv_sec = 1701160447, .tv_nsec = 538710245};
sai_switch_health_data_t data = {.data_type = SAI_HEALTH_DATA_TYPE_GENERAL};
sai_switch_health_data_t data;
memset(&data, 0, sizeof(data));
data.data_type = SAI_HEALTH_DATA_TYPE_GENERAL;
vector<uint8_t> data_from_sai({100, 101, 115, 99, 114, 105, 112, 116, 105, 245, 111, 110, 245, 10, 123, 125, 100, 100});
sai_u8_list_t description;
description.list = data_from_sai.data();
Expand Down

0 comments on commit 90fcead

Please sign in to comment.