mirror of
https://github.com/opnsense/src.git
synced 2026-02-21 17:00:58 -05:00
The current code silently ignores characters after the unit as long the unit themselves were recognized. This commit makes expand_number(3) to fail with EINVAL if buf did not terminate after the unit character. Historically, the function accepts and ignores "B" as a SI unit, this behavior is preserved and e.g. KB, MB are still accepted as aliases of K and M, document this behavior in the manual page. While I am there, also write a few test cases to validate the behavior. Reviewed-by: emaste MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40482
15 lines
302 B
Makefile
15 lines
302 B
Makefile
# $FreeBSD$
|
|
|
|
TAP_TESTS_C+= flopen_test
|
|
TAP_TESTS_C+= grp_test
|
|
TAP_TESTS_C+= humanize_number_test
|
|
TAP_TESTS_C+= pidfile_test
|
|
TAP_TESTS_C+= trimdomain_test
|
|
TAP_TESTS_C+= trimdomain-nodomain_test
|
|
ATF_TESTS_C+= cpuset_test
|
|
ATF_TESTS_C+= expand_number_test
|
|
|
|
WARNS?= 2
|
|
LIBADD+= util
|
|
|
|
.include <bsd.test.mk>
|