diff mbox series

[bpf-next,v1,5/6] selftests/bpf: Switch to non-unicode character in output

Message ID 20211105234243.390179-6-memxor@gmail.com (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series Change bpftool, libbpf, selftests to force GNU89 mode | expand

Checks

Context Check Description
bpf/vmtest-bpf-next success VM_Test
bpf/vmtest-bpf-next-PR success PR summary
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 10 maintainers not CCed: songliubraving@fb.com linux-kselftest@vger.kernel.org shuah@kernel.org daniel@iogearbox.net john.fastabend@gmail.com yhs@fb.com kpsingh@kernel.org netdev@vger.kernel.org ast@kernel.org kafai@fb.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Kumar Kartikeya Dwivedi Nov. 5, 2021, 11:42 p.m. UTC
GNU89 doesn't allow unicode characters in printf output, and build gives
the following warning:

warning: universal character names are only valid in C++ and C99

Fix by using ASCII +/-.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
 tools/testing/selftests/bpf/bench.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c
index cc4722f693e9..58a32ff2eb1b 100644
--- a/tools/testing/selftests/bpf/bench.c
+++ b/tools/testing/selftests/bpf/bench.c
@@ -126,11 +126,11 @@  void hits_drops_report_final(struct bench_res res[], int res_cnt)
 		drops_stddev = sqrt(drops_stddev);
 		total_ops_stddev = sqrt(total_ops_stddev);
 	}
-	printf("Summary: hits %8.3lf \u00B1 %5.3lfM/s (%7.3lfM/prod), ",
+	printf("Summary: hits %8.3lf +/- %5.3lfM/s (%7.3lfM/prod), ",
 	       hits_mean, hits_stddev, hits_mean / env.producer_cnt);
-	printf("drops %8.3lf \u00B1 %5.3lfM/s, ",
+	printf("drops %8.3lf +/- %5.3lfM/s, ",
 	       drops_mean, drops_stddev);
-	printf("total operations %8.3lf \u00B1 %5.3lfM/s\n",
+	printf("total operations %8.3lf +/- %5.3lfM/s\n",
 	       total_ops_mean, total_ops_stddev);
 }