[Mesa-dev] [PATCH] tests/cache_test: mark arguments const
Grazvydas Ignotas
notasas at gmail.com
Fri Mar 24 22:56:51 UTC 2017
While at it, also fix up a failure message to not reference timestamp
and gpu dirs as those are no longer being made.
Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
src/compiler/glsl/tests/cache_test.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c
index 2302f44..537a81b 100644
--- a/src/compiler/glsl/tests/cache_test.c
+++ b/src/compiler/glsl/tests/cache_test.c
@@ -126,11 +126,11 @@ rmrf_local(const char *path)
return nftw(path, remove_entry, 64, FTW_DEPTH | FTW_PHYS | FTW_MOUNT);
}
static void
-check_directories_created(char *cache_dir)
+check_directories_created(const char *cache_dir)
{
bool sub_dirs_created = false;
char buf[PATH_MAX];
if (getcwd(buf, PATH_MAX)) {
@@ -142,11 +142,11 @@ check_directories_created(char *cache_dir)
free(full_path);
}
}
- expect_true(sub_dirs_created, "create timestamp and gpu ip sub dirs");
+ expect_true(sub_dirs_created, "create sub dirs");
}
#define CACHE_TEST_TMP "./cache-test-tmp"
static void
@@ -206,11 +206,11 @@ test_disk_cache_create(void)
disk_cache_destroy(cache);
}
static bool
-does_cache_contain(struct disk_cache *cache, cache_key key)
+does_cache_contain(struct disk_cache *cache, const cache_key key)
{
void *result;
result = disk_cache_get(cache, key, NULL);
@@ -221,11 +221,11 @@ does_cache_contain(struct disk_cache *cache, cache_key key)
return false;
}
static void
-wait_until_file_written(struct disk_cache *cache, cache_key key)
+wait_until_file_written(struct disk_cache *cache, const cache_key key)
{
struct timespec req;
struct timespec rem;
/* Set 100ms delay */
--
2.7.4
More information about the mesa-dev
mailing list