@@ -119,7 +119,7 @@ class PersistenDeviceCodeCache : public ::testing::Test {
119
119
Dev, Img,
120
120
sycl::vector_class<unsigned char >(
121
121
{' S' , ' p' , ' e' , ' c' , ' C' , ' o' , ' n' , ' s' , ' t' , ProgramID}),
122
- BuildOptions, NativeProg );
122
+ BuildOptions);
123
123
for (int i = 0 ; i < Res.size (); ++i) {
124
124
for (int j = 0 ; j < Res[i].size (); ++j) {
125
125
assert (Res[i][j] == i &&
@@ -187,8 +187,8 @@ TEST_F(PersistenDeviceCodeCache, CorruptedCacheFiles) {
187
187
NativeProg);
188
188
assert (!llvm::sys::fs::remove (ItemDir + " /0.bin" ) &&
189
189
" Failed to remove binary file" );
190
- auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
191
- Dev, Img, {}, BuildOptions, NativeProg );
190
+ auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
191
+ BuildOptions );
192
192
assert (Res.size () == 0 && " Item with missed binary file was read" );
193
193
llvm::sys::fs::remove_directories (ItemDir);
194
194
@@ -197,8 +197,8 @@ TEST_F(PersistenDeviceCodeCache, CorruptedCacheFiles) {
197
197
NativeProg);
198
198
assert (!llvm::sys::fs::remove (ItemDir + " /0.src" ) &&
199
199
" Failed to remove source file" );
200
- Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
201
- Dev, Img, {}, BuildOptions, NativeProg );
200
+ Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
201
+ BuildOptions );
202
202
assert (Res.size () == 0 && " Item with missed source file was read" );
203
203
llvm::sys::fs::remove_directories (ItemDir);
204
204
@@ -213,8 +213,8 @@ TEST_F(PersistenDeviceCodeCache, CorruptedCacheFiles) {
213
213
FileStream << 2 << 12 << " 123456789012" << 23 << " 1234" ;
214
214
FileStream.close ();
215
215
assert ((!FileStream.fail ()) && " Failed to create trancated binary file" );
216
- Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
217
- Dev, Img, {}, BuildOptions, NativeProg );
216
+ Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
217
+ BuildOptions );
218
218
assert (Res.size () == 0 && " Item with corrupted binary file was read" );
219
219
220
220
llvm::sys::fs::remove_directories (ItemDir);
@@ -226,8 +226,8 @@ TEST_F(PersistenDeviceCodeCache, CorruptedCacheFiles) {
226
226
std::ofstream FileStream (ItemDir + " /0.src" ,
227
227
std::ofstream::out | std::ofstream::trunc );
228
228
}
229
- Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
230
- Dev, Img, {}, BuildOptions, NativeProg );
229
+ Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
230
+ BuildOptions );
231
231
assert (Res.size () == 0 && " Item with corrupted binary file was read" );
232
232
llvm::sys::fs::remove_directories (ItemDir);
233
233
}
@@ -256,8 +256,8 @@ TEST_F(PersistenDeviceCodeCache, LockFile) {
256
256
{ std::ofstream File{LockFile}; }
257
257
258
258
// Cache item is locked, cache miss happens on read
259
- auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
260
- Dev, Img, {}, BuildOptions, NativeProg );
259
+ auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
260
+ BuildOptions );
261
261
assert (Res.size () == 0 && " Locked item was read" );
262
262
263
263
// Cache item is locked - new cache item to be created
@@ -267,14 +267,14 @@ TEST_F(PersistenDeviceCodeCache, LockFile) {
267
267
268
268
// Second cache item is locked, cache miss happens on read
269
269
{ std::ofstream File{ItemDir + " /1.lock" }; }
270
- Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
271
- Dev, Img, {}, BuildOptions, NativeProg );
270
+ Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
271
+ BuildOptions );
272
272
assert (Res.size () == 0 && " Locked item was read" );
273
273
274
274
// First cache item was unlocked and successfully read
275
275
std::remove (LockFile.c_str ());
276
- Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
277
- Dev, Img, {}, BuildOptions, NativeProg );
276
+ Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
277
+ BuildOptions );
278
278
for (int i = 0 ; i < Res.size (); ++i) {
279
279
for (int j = 0 ; j < Res[i].size (); ++j) {
280
280
assert (Res[i][j] == i && " Corrupted image loaded from persistent cache" );
@@ -305,17 +305,17 @@ TEST_F(PersistenDeviceCodeCache, AccessDeniedForCacheDir) {
305
305
assert (llvm::sys::fs::exists (ItemDir + " /1.bin" ) && " No file created" );
306
306
307
307
llvm::sys::fs::setPermissions (ItemDir + " /1.bin" , llvm::sys::fs::no_perms);
308
- auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
309
- Dev, Img, {}, BuildOptions, NativeProg );
308
+ auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
309
+ BuildOptions );
310
310
311
311
// No image to be read due to lack of permissions fro source file
312
312
assert (Res.size () == 0 );
313
313
314
314
llvm::sys::fs::setPermissions (ItemDir + " /0.bin" , llvm::sys::fs::all_perms);
315
315
llvm::sys::fs::setPermissions (ItemDir + " /1.bin" , llvm::sys::fs::all_perms);
316
316
317
- Res = detail::PersistentDeviceCodeCache::getItemFromDisc (
318
- Dev, Img, {}, BuildOptions, NativeProg );
317
+ Res = detail::PersistentDeviceCodeCache::getItemFromDisc (Dev, Img, {},
318
+ BuildOptions );
319
319
// Image should be successfully read
320
320
for (int i = 0 ; i < Res.size (); ++i) {
321
321
for (int j = 0 ; j < Res[i].size (); ++j) {
0 commit comments