summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2017-03-16 01:09:31 +0200
committerTimothy Arceri <[email protected]>2017-03-24 11:20:09 +1100
commit5136c09e700bea2e1becbc32b073cfbbefdec1ec (patch)
tree142a6e0398f14058a285db481102f37a95f95ba3 /src/compiler/glsl/tests
parentfeb716239e1a318eb844fd3bcaca1ffd6903067c (diff)
util/disk_cache: hash pointer size and gpu name into cache keys
This allows to get rid of the arch and gpu name directories. v2: (Timothy Arceri) don't use an opaque data type to store pointer size and gpu name. v3: (Timothy Arceri) use blob to store driver keys just make sure to store null terminator for strings, and make sure blob is defined by disk_cache and not it's users. v4: (Timothy Arceri) fix typo, and make ptr_size a uint8_t. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/tests')
-rw-r--r--src/compiler/glsl/tests/cache_test.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c
index b604943feeb..2302f448d21 100644
--- a/src/compiler/glsl/tests/cache_test.c
+++ b/src/compiler/glsl/tests/cache_test.c
@@ -181,16 +181,11 @@ test_disk_cache_create(void)
expect_null(cache, "disk_cache_create with XDG_CACHE_HOME set with"
"a non-existing parent directory");
- /* Create string with expected directory hierarchy */
- char expected_dir_h[255];
- sprintf(expected_dir_h, "%s%s%s", CACHE_TEST_TMP "/xdg-cache-home/mesa/",
- get_arch_bitness_str(), "/test");
-
mkdir(CACHE_TEST_TMP, 0755);
cache = disk_cache_create("test", "make_check");
expect_non_null(cache, "disk_cache_create with XDG_CACHE_HOME set");
- check_directories_created(expected_dir_h);
+ check_directories_created(CACHE_TEST_TMP "/xdg-cache-home/mesa");
disk_cache_destroy(cache);
@@ -203,15 +198,11 @@ test_disk_cache_create(void)
expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DIR set with"
"a non-existing parent directory");
- sprintf(expected_dir_h, "%s%s%s", CACHE_TEST_TMP
- "/mesa-glsl-cache-dir/mesa/", get_arch_bitness_str(),
- "/test");
-
mkdir(CACHE_TEST_TMP, 0755);
cache = disk_cache_create("test", "make_check");
expect_non_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DIR set");
- check_directories_created(expected_dir_h);
+ check_directories_created(CACHE_TEST_TMP "/mesa-glsl-cache-dir/mesa");
disk_cache_destroy(cache);
}