From: Jonathan Rajotte Date: Thu, 4 Feb 2021 20:46:27 +0000 (-0500) Subject: condition: buffer usage: validation does not check for ratio and bytes threshold X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=70ee6d20a4f79f223b57cf4e2496ec32f0694147;hp=70ee6d20a4f79f223b57cf4e2496ec32f0694147;p=lttng-tools.git condition: buffer usage: validation does not check for ratio and bytes threshold Buffer usage condition do not support having both ratio and bytes threshold set. Using `!usage->threshold_ratio.set && !usage->threshold_bytes.set` does not error out for `threshold_ratio.set == 1` and `usage->threshold_bytes.set == 1` 0 0 : 1 0 1 : 0 1 0 : 0 1 1 : 0 We want to check for a xnor (`usage->threshold_ratio.set == usage->threshold_bytes.set`) 0 0 : 1 0 1 : 0 1 0 : 0 1 1 : 1 We could also do 2 error check one for not set and one validating that both are not set. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: I5bfcf43bcaf9687ddf9fdebe5ace4f15bda28261 ---