mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ovn-test: Fix 'test-ovn composition' crash
Without this fix, the added test will core dump. Signed-off-by: Andy Zhou <azhou@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -175,6 +175,10 @@ ct_state = NXM_NX_CT_STATE
|
||||
]])
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ovn -- compsition])
|
||||
AT_CHECK([ovstest test-ovn composition 2], [0], [ignore])
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ovn -- expression parser])
|
||||
dnl For lines without =>, input and expected output are identical.
|
||||
dnl For lines with =>, input precedes => and expected output follows =>.
|
||||
|
@@ -452,11 +452,11 @@ next_composition(unsigned int *state, int s[], int sn)
|
||||
j++;
|
||||
} else {
|
||||
j--;
|
||||
s[j] = s[j + 1];
|
||||
s[j - 1]++;
|
||||
if (!j) {
|
||||
return 0;
|
||||
}
|
||||
s[j] = s[j + 1];
|
||||
s[j - 1]++;
|
||||
}
|
||||
}
|
||||
return j + 1;
|
||||
|
Reference in New Issue
Block a user