From 745c351b8bcf017dd22c398e14baed022fdd5b41 Mon Sep 17 00:00:00 2001 From: Jordan R Abrahams-Whitehead Date: Mon, 30 May 2022 22:28:11 +0000 Subject: [PATCH] vts: Upsize 8bit uniform_int_distribution uniform_int_distribution for types sizeof(a) < 2 are not valid by the C++ library standard. Newer versions of LLVM (particularly spurred on by ChromeOS toolchain changes) require at least std::uniform_int_distribution. This is a required change for rolling LLVM to r458507. This is necessary, but may not be sufficient to resolve the issue. Bug: 231351802 Test: mma Change-Id: I04c3cc91507f3467c432b9a25effdac3f5fb56f3 --- neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp | 2 +- neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp | 2 +- neuralnetworks/aidl/vts/functional/CompilationCachingTests.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp index 3d783d9aa1..fe38e61c57 100644 --- a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp +++ b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp @@ -1262,7 +1262,7 @@ class CompilationCachingSecurityTest FILE* pFile = fopen(filename.c_str(), "a"); uint32_t appendLength = getRandomInt(1, 256); for (uint32_t i = 0; i < appendLength; i++) { - ASSERT_NE(fputc(getRandomInt(0, 255), pFile), EOF); + ASSERT_NE(fputc(getRandomInt(0, 255), pFile), EOF); } fclose(pFile); *skip = false; diff --git a/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp index a2013ecd3a..f2cfa3f3d0 100644 --- a/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp +++ b/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp @@ -1253,7 +1253,7 @@ class CompilationCachingSecurityTest FILE* pFile = fopen(filename.c_str(), "a"); uint32_t appendLength = getRandomInt(1, 256); for (uint32_t i = 0; i < appendLength; i++) { - ASSERT_NE(fputc(getRandomInt(0, 255), pFile), EOF); + ASSERT_NE(fputc(getRandomInt(0, 255), pFile), EOF); } fclose(pFile); *skip = false; diff --git a/neuralnetworks/aidl/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/aidl/vts/functional/CompilationCachingTests.cpp index 7451f7eec3..da0fe64bab 100644 --- a/neuralnetworks/aidl/vts/functional/CompilationCachingTests.cpp +++ b/neuralnetworks/aidl/vts/functional/CompilationCachingTests.cpp @@ -1068,7 +1068,7 @@ class CompilationCachingSecurityTest FILE* pFile = fopen(filename.c_str(), "a"); uint32_t appendLength = getRandomInt(1, 256); for (uint32_t i = 0; i < appendLength; i++) { - ASSERT_NE(fputc(getRandomInt(0, 255), pFile), EOF); + ASSERT_NE(fputc(getRandomInt(0, 255), pFile), EOF); } fclose(pFile); *skip = false;