Skip to content

Commit

Permalink
[syncd] Add pre match logic for acl entry (sonic-net#1240)
Browse files Browse the repository at this point in the history
this will test scenario where we have 1 acl entry with counter and after
warm boot 2 acl entries and 2 counters the same which could end up
matching wrong acl counter and causing fail "object exist" on broadcom
acl entry set, which will require improve pre match logic for acl entry
  • Loading branch information
kcudnik committed Aug 2, 2023
1 parent 576d1b3 commit 1474e99
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/BCM56850.pl
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,32 @@ sub test_acl_counter_match
}
}

sub test_acl_counter_match
{
# this will test scenario where we have 1 acl entry with counter and after
# warm boot 2 acl entries and 2 counters the same which could end up
# matching wrong acl counter and causing fail "object exist" on broadcom
# acl entry set, which will require improve pre match logic for acl entry

fresh_start;

play "acl_counter_match.rec";

open (my $H, "<", "applyview.log") or die "failed to open applyview.log $!";

my $line = <$H>;

close ($H);

chomp$line;

if (not $line =~ /ASIC_OPERATIONS: (\d+)/ or $1 != 2)
{
print color('red') . "expected 2 ASIC_OPERATIONS count on first line, but got: '$line'" . color('reset') . "\n";
exit 1;
}
}

# RUN TESTS

test_acl_counter_match;
Expand Down

0 comments on commit 1474e99

Please sign in to comment.