|
|
27ca55 |
diff -pruN fontconfig-2.13.1.orig/test/test-bz106632.c fontconfig-2.13.1/test/test-bz106632.c
|
|
|
27ca55 |
--- fontconfig-2.13.1.orig/test/test-bz106632.c 2018-08-29 09:55:14.000000000 +0000
|
|
|
27ca55 |
+++ fontconfig-2.13.1/test/test-bz106632.c 2018-11-13 11:57:37.822142424 +0000
|
|
|
27ca55 |
@@ -197,7 +197,7 @@ main (void)
|
|
|
27ca55 |
mkdir_p (cachedir);
|
|
|
27ca55 |
|
|
|
27ca55 |
fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir);
|
|
|
27ca55 |
- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir);
|
|
|
27ca55 |
+ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir);
|
|
|
27ca55 |
system (cmd);
|
|
|
27ca55 |
|
|
|
27ca55 |
fprintf (stderr, "D: Loading a config\n");
|
|
|
27ca55 |
@@ -226,15 +226,21 @@ main (void)
|
|
|
27ca55 |
goto bail;
|
|
|
27ca55 |
}
|
|
|
27ca55 |
fprintf (stderr, "D: Removing %s\n", fontdir);
|
|
|
27ca55 |
- snprintf (cmd, 512, "rm -f %s%s*", fontdir, FC_DIR_SEPARATOR_S);
|
|
|
27ca55 |
+ snprintf (cmd, 512, "sleep 1; rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S);
|
|
|
27ca55 |
system (cmd);
|
|
|
27ca55 |
fprintf (stderr, "D: Reinitializing\n");
|
|
|
27ca55 |
- if (!FcConfigUptoDate (config) || !FcInitReinitialize ())
|
|
|
27ca55 |
+ if (FcConfigUptoDate (config))
|
|
|
27ca55 |
{
|
|
|
27ca55 |
- fprintf (stderr, "E: Unable to reinitialize\n");
|
|
|
27ca55 |
+ fprintf (stderr, "E: Config reports up-to-date\n");
|
|
|
27ca55 |
ret = 2;
|
|
|
27ca55 |
goto bail;
|
|
|
27ca55 |
}
|
|
|
27ca55 |
+ if (!FcInitReinitialize ())
|
|
|
27ca55 |
+ {
|
|
|
27ca55 |
+ fprintf (stderr, "E: Unable to reinitialize\n");
|
|
|
27ca55 |
+ ret = 3;
|
|
|
27ca55 |
+ goto bail;
|
|
|
27ca55 |
+ }
|
|
|
27ca55 |
if (FcConfigGetCurrent () == config)
|
|
|
27ca55 |
{
|
|
|
27ca55 |
fprintf (stderr, "E: config wasn't reloaded\n");
|
|
|
27ca55 |
@@ -265,10 +271,16 @@ main (void)
|
|
|
27ca55 |
goto bail;
|
|
|
27ca55 |
}
|
|
|
27ca55 |
fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir);
|
|
|
27ca55 |
- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir);
|
|
|
27ca55 |
+ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir);
|
|
|
27ca55 |
system (cmd);
|
|
|
27ca55 |
fprintf (stderr, "D: Reinitializing\n");
|
|
|
27ca55 |
- if (!FcConfigUptoDate (config) || !FcInitReinitialize ())
|
|
|
27ca55 |
+ if (FcConfigUptoDate (config))
|
|
|
27ca55 |
+ {
|
|
|
27ca55 |
+ fprintf (stderr, "E: Config up-to-date after addition\n");
|
|
|
27ca55 |
+ ret = 3;
|
|
|
27ca55 |
+ goto bail;
|
|
|
27ca55 |
+ }
|
|
|
27ca55 |
+ if (!FcInitReinitialize ())
|
|
|
27ca55 |
{
|
|
|
27ca55 |
fprintf (stderr, "E: Unable to reinitialize\n");
|
|
|
27ca55 |
ret = 2;
|