[Mesa-dev] [PATCH 4/7] glsl/tests: changes to test_disk_cache_create test

Emil Velikov emil.l.velikov at gmail.com
Wed Jan 31 13:41:12 UTC 2018


On 31 January 2018 at 07:17, Tapani Pälli <tapani.palli at intel.com> wrote:

> -   /* Before doing anything else, ensure that with
> -    * MESA_GLSL_CACHE_DISABLE set to true, that disk_cache_create returns NULL.
> -    */
> -   setenv("MESA_GLSL_CACHE_DISABLE", "true", 1);
> -   cache = disk_cache_create("test", "make_check", 0);
> -   expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DISABLE set");
>
We want to ensure that cache can be disabled. If needed, can we tweak
i965/other places instead?


> -   /* Test with XDG_CACHE_HOME set */
> -   setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1);
> -   cache = disk_cache_create("test", "make_check", 0);
> -   expect_null(cache, "disk_cache_create with XDG_CACHE_HOME set with"
> -               "a non-existing parent directory");
> -

> -   /* Test with MESA_GLSL_CACHE_DIR set */
> -   err = rmrf_local(CACHE_TEST_TMP);
> -   expect_equal(err, 0, "Removing " CACHE_TEST_TMP);
> -


> -   mkdir(CACHE_TEST_TMP, 0755);
> -   cache = disk_cache_create("test", "make_check", 0);
> -   expect_non_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DIR set");
> -

Why did these tests disappear? Might be having a dull moment, but I
cannot see why they won't work. Even with the lazy indexing.

-Emil


More information about the mesa-dev mailing list