Message ID | 20200728052048.7485-1-briana.oursler@gmail.com |
---|---|
State | Accepted |
Delegated to: | David Ahern |
Headers | show |
Series | [iproute2] tc: Add space after format specifier | expand |
On Mon, 2020-07-27 at 22:20 -0700, Briana Oursler wrote: > Add space after format specifier in print_string call. Fixes broken > qdisc tests within tdc testing suite. Per suggestion from Petr > Machata, > remove a space and change spacing in tc/q_event.c to complete the > fix. > > Tested fix in tdc using: > ./tdc.py -c qdisc > > All qdisc RED tests return ok. > > Fixes: d0e450438571("tc: q_red: Add support for > qevents "mark" and "early_drop") > > Signed-off-by: Briana Oursler <briana.oursler@gmail.com> > --- > tc/q_red.c | 4 ++-- > tc/tc_qevent.c | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/tc/q_red.c b/tc/q_red.c > index dfef1bf8..df788f8f 100644 > --- a/tc/q_red.c > +++ b/tc/q_red.c > @@ -222,12 +222,12 @@ static int red_print_opt(struct qdisc_util *qu, > FILE *f, struct rtattr *opt) > print_uint(PRINT_JSON, "min", NULL, qopt->qth_min); > print_string(PRINT_FP, NULL, "min %s ", sprint_size(qopt- > >qth_min, b2)); > print_uint(PRINT_JSON, "max", NULL, qopt->qth_max); > - print_string(PRINT_FP, NULL, "max %s", sprint_size(qopt- > >qth_max, b3)); > + print_string(PRINT_FP, NULL, "max %s ", sprint_size(qopt- > >qth_max, b3)); > > tc_red_print_flags(qopt->flags); > > if (show_details) { > - print_uint(PRINT_ANY, "ewma", " ewma %u ", qopt->Wlog); > + print_uint(PRINT_ANY, "ewma", "ewma %u ", qopt->Wlog); > if (max_P) > print_float(PRINT_ANY, "probability", > "probability %lg ", max_P / pow(2, > 32)); > diff --git a/tc/tc_qevent.c b/tc/tc_qevent.c > index 2c010fcf..34568070 100644 > --- a/tc/tc_qevent.c > +++ b/tc/tc_qevent.c > @@ -82,8 +82,9 @@ void qevents_print(struct qevent_util *qevents, > FILE *f) > } > > open_json_object(NULL); > - print_string(PRINT_ANY, "kind", " qevent %s", > qevents->id); > + print_string(PRINT_ANY, "kind", "qevent %s", > qevents->id); > qevents->print_qevent(qevents, f); > + print_string(PRINT_FP, NULL, "%s", " "); > close_json_object(); > } > } I made the subject PATCH iproute2 after the question discussion with everyone, but I realized that the patch it fixes is in iproute2-next but not yet in iproute2. Sorry about the confusion. Should I resend to iproute2-next?
Briana Oursler <briana.oursler@gmail.com> writes: > Add space after format specifier in print_string call. Fixes broken > qdisc tests within tdc testing suite. Per suggestion from Petr Machata, > remove a space and change spacing in tc/q_event.c to complete the fix. > > Tested fix in tdc using: > ./tdc.py -c qdisc > > All qdisc RED tests return ok. > > Fixes: d0e450438571("tc: q_red: Add support for > qevents "mark" and "early_drop") > > Signed-off-by: Briana Oursler <briana.oursler@gmail.com> Tested-by: Petr Machata <petrm@mellanox.com> Thanks for taking care of this!
On 7/27/20 11:53 PM, Briana Oursler wrote: > I made the subject PATCH iproute2 after the question discussion with > everyone, but I realized that the patch it fixes is in iproute2-next > but not yet in iproute2. Sorry about the confusion. Should I resend to > iproute2-next? no, it is fine.
On 7/27/20 11:20 PM, Briana Oursler wrote: > Add space after format specifier in print_string call. Fixes broken > qdisc tests within tdc testing suite. Per suggestion from Petr Machata, > remove a space and change spacing in tc/q_event.c to complete the fix. > > Tested fix in tdc using: > ./tdc.py -c qdisc > > All qdisc RED tests return ok. > > Fixes: d0e450438571("tc: q_red: Add support for > qevents "mark" and "early_drop") > > Signed-off-by: Briana Oursler <briana.oursler@gmail.com> > --- > tc/q_red.c | 4 ++-- > tc/tc_qevent.c | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > Applied to iproute2-next after fixing the 'Fixes' line. It should be a single line before the Signed-off-by
diff --git a/tc/q_red.c b/tc/q_red.c index dfef1bf8..df788f8f 100644 --- a/tc/q_red.c +++ b/tc/q_red.c @@ -222,12 +222,12 @@ static int red_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) print_uint(PRINT_JSON, "min", NULL, qopt->qth_min); print_string(PRINT_FP, NULL, "min %s ", sprint_size(qopt->qth_min, b2)); print_uint(PRINT_JSON, "max", NULL, qopt->qth_max); - print_string(PRINT_FP, NULL, "max %s", sprint_size(qopt->qth_max, b3)); + print_string(PRINT_FP, NULL, "max %s ", sprint_size(qopt->qth_max, b3)); tc_red_print_flags(qopt->flags); if (show_details) { - print_uint(PRINT_ANY, "ewma", " ewma %u ", qopt->Wlog); + print_uint(PRINT_ANY, "ewma", "ewma %u ", qopt->Wlog); if (max_P) print_float(PRINT_ANY, "probability", "probability %lg ", max_P / pow(2, 32)); diff --git a/tc/tc_qevent.c b/tc/tc_qevent.c index 2c010fcf..34568070 100644 --- a/tc/tc_qevent.c +++ b/tc/tc_qevent.c @@ -82,8 +82,9 @@ void qevents_print(struct qevent_util *qevents, FILE *f) } open_json_object(NULL); - print_string(PRINT_ANY, "kind", " qevent %s", qevents->id); + print_string(PRINT_ANY, "kind", "qevent %s", qevents->id); qevents->print_qevent(qevents, f); + print_string(PRINT_FP, NULL, "%s", " "); close_json_object(); } }
Add space after format specifier in print_string call. Fixes broken qdisc tests within tdc testing suite. Per suggestion from Petr Machata, remove a space and change spacing in tc/q_event.c to complete the fix. Tested fix in tdc using: ./tdc.py -c qdisc All qdisc RED tests return ok. Fixes: d0e450438571("tc: q_red: Add support for qevents "mark" and "early_drop") Signed-off-by: Briana Oursler <briana.oursler@gmail.com> --- tc/q_red.c | 4 ++-- tc/tc_qevent.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)