diff --git a/shared/source/device_binary_format/yaml/yaml_parser.h b/shared/source/device_binary_format/yaml/yaml_parser.h index ee5c9dd95e..fb11982d40 100644 --- a/shared/source/device_binary_format/yaml/yaml_parser.h +++ b/shared/source/device_binary_format/yaml/yaml_parser.h @@ -54,7 +54,7 @@ constexpr bool isAlphaNumeric(char c) { } constexpr bool isNameIdentifierCharacter(char c) { - return isAlphaNumeric(c) || ('_' == c) || ('-' == c); + return isAlphaNumeric(c) || ('_' == c) || ('-' == c) || ('.' == c); } constexpr bool isNameIdentifierBeginningCharacter(char c) { diff --git a/shared/test/unit_test/device_binary_format/yaml/yaml_parser_tests.cpp b/shared/test/unit_test/device_binary_format/yaml/yaml_parser_tests.cpp index 3811a9e266..ff134e1889 100644 --- a/shared/test/unit_test/device_binary_format/yaml/yaml_parser_tests.cpp +++ b/shared/test/unit_test/device_binary_format/yaml/yaml_parser_tests.cpp @@ -87,6 +87,7 @@ TEST(YamlIsNameIdentifierCharacter, GivenCharThenReturnsTrueOnlyWhenCharIsNumber validChars.insert(It{'0'}, ++It{'9'}); validChars.insert('_'); validChars.insert('-'); + validChars.insert('.'); for (int c = std::numeric_limits::min(); c <= std::numeric_limits::max(); ++c) { bool expected = validChars.count(static_cast(c)) > 0; EXPECT_EQ(expected, NEO::Yaml::isNameIdentifierCharacter(static_cast(c))) << static_cast(c); diff --git a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp index 6b9ac2525a..b8948eb8ca 100644 --- a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp @@ -806,7 +806,7 @@ kernels_misc_info: TEST(DecodeKernelMiscInfo, givenUnrecognizedEntryInKernelsMiscInfoSectionWhenDecodingItThenEmitWarning) { NEO::ConstStringRef kernelMiscInfoUnrecognized = R"===(--- kernels_misc_info: - - name: some_kernel + - name: some_kernel.0 args_info: - index: 0 name: a @@ -818,7 +818,7 @@ kernels_misc_info: ... )==="; auto kernelInfo = new KernelInfo(); - kernelInfo->kernelDescriptor.kernelMetadata.kernelName = "some_kernel"; + kernelInfo->kernelDescriptor.kernelMetadata.kernelName = "some_kernel.0"; NEO::ProgramInfo programInfo; programInfo.kernelMiscInfoPos = 0u; @@ -827,7 +827,7 @@ kernels_misc_info: std::string outWarnings, outErrors; auto res = NEO::Zebin::ZeInfo::decodeAndPopulateKernelMiscInfo(programInfo.kernelMiscInfoPos, programInfo.kernelInfos, kernelMiscInfoUnrecognized, outErrors, outWarnings); EXPECT_EQ(DecodeError::Success, res); - EXPECT_TRUE(outErrors.empty()); + EXPECT_TRUE(outErrors.empty()) << outErrors; auto expectedWarning = "DeviceBinaryFormat::Zebin : Unrecognized entry: pickle in kernels_misc_info zeInfo's section.\n"; EXPECT_STREQ(outWarnings.c_str(), expectedWarning);