[LTP] [PATCH v3 3/7] fzsync: Correctly print positive lower delay range bound
Richard Palethorpe
rpalethorpe@suse.com
Fri Mar 19 10:18:33 CET 2021
If the magnitude of delay_bias is large enough then it can turn the
lower bound positive.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
include/tst_fuzzy_sync.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/tst_fuzzy_sync.h b/include/tst_fuzzy_sync.h
index b8841d96d..4063e95cb 100644
--- a/include/tst_fuzzy_sync.h
+++ b/include/tst_fuzzy_sync.h
@@ -518,9 +518,9 @@ static void tst_fzsync_pair_update(struct tst_fzsync_pair *pair)
tst_res(TINFO,
"Reached deviation ratios < %.2f, introducing randomness",
pair->max_dev_ratio);
- tst_res(TINFO, "Delay range is [-%d, %d]",
- (int)(pair->diff_sb.avg / per_spin_time) + pair->delay_bias,
- (int)(pair->diff_sa.avg / per_spin_time) - pair->delay_bias);
+ tst_res(TINFO, "Delay range is [%d, %d]",
+ -(int)(pair->diff_sb.avg / per_spin_time) + pair->delay_bias,
+ (int)(pair->diff_sa.avg / per_spin_time) + pair->delay_bias);
tst_fzsync_pair_info(pair);
pair->sampling = -1;
}
--
2.30.1
More information about the ltp
mailing list