listed For a list of log levels like LIBCAMERA_LOG_LEVELS="CatA:0,CatB:1" only the severity of the last entry is correctly parsed. Due to the change of level to a string_view in24c2caa1c1
("libcamera: base: log: Use `std::string_view` to avoid some copies") the level is no longer necessarily null terminated as it is a view on the original data. Replace the check for a terminating null by a check for the end position to fix the issue. Fixes:24c2caa1c1
("libcamera: base: log: Use `std::string_view` to avoid some copies") Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
16 lines
523 B
Meson
16 lines
523 B
Meson
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
log_test = [
|
|
{'name': 'log_api', 'sources': ['log_api.cpp']},
|
|
{'name': 'log_process', 'sources': ['log_process.cpp']},
|
|
]
|
|
|
|
foreach test : log_test
|
|
exe = executable(test['name'], test['sources'],
|
|
dependencies : libcamera_private,
|
|
link_with : test_libraries,
|
|
include_directories : test_includes_internal)
|
|
|
|
test(test['name'], exe, suite : 'log',
|
|
should_fail : test.get('should_fail', false))
|
|
endforeach
|