summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-10-31 14:14:56 -0700
committerJarno Rajahalme <jrajahalme@nicira.com>2014-10-31 16:28:58 -0700
commit712b4d2470ed2e8cfe6bb16080d7e9d54003061a (patch)
treefa767e1158c3d9d15fb6476762473180e44e05bb /tests
parentc501b42702bc271ecf46e37bfa3a6ac7cfffa0a6 (diff)
downloadopenvswitch-712b4d2470ed2e8cfe6bb16080d7e9d54003061a.tar.gz
test-classifier: Ensure priority is not INT_MIN.
Classifier reserves the priority value INT_MIN for its own use. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-classifier.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-classifier.c b/tests/test-classifier.c
index 2c8b3ac65..66da60751 100644
--- a/tests/test-classifier.c
+++ b/tests/test-classifier.c
@@ -641,7 +641,9 @@ make_rule(int wc_fields, int priority, int value_pat)
}
rule = xzalloc(sizeof *rule);
- cls_rule_init(&rule->cls_rule, &match, wc_fields ? priority : INT_MAX);
+ cls_rule_init(&rule->cls_rule, &match, wc_fields
+ ? (priority == INT_MIN ? priority + 1 : priority)
+ : INT_MAX);
return rule;
}