Skip to content

Commit

Permalink
[meta] Check sai_json_t type size (#1909)
Browse files Browse the repository at this point in the history
Should be equal to sai_s8_list_t
  • Loading branch information
kcudnik authored Oct 2, 2023
1 parent 683d727 commit a94bbbe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions meta/saisanitycheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -5668,6 +5668,13 @@ void check_declare_entry_macro()
SAI_METADATA_DECLARE_EVERY_BULK_ENTRY(_BULK_ENTRY);
}

void check_json_type_size()
{
SAI_META_LOG_ENTER();

META_ASSERT_TRUE(sizeof(sai_s8_list_t) == sizeof(sai_json_t), "json type is expected to have same size as s8 list");
}

int main(int argc, char **argv)
{
debug = (argc > 1);
Expand Down Expand Up @@ -5714,6 +5721,7 @@ int main(int argc, char **argv)
check_global_apis();
check_struct_and_union_size();
check_declare_entry_macro();
check_json_type_size();

SAI_META_LOG_DEBUG("log test");

Expand Down

0 comments on commit a94bbbe

Please sign in to comment.