On 12/20/21 2:27 AM, Thomas Huth wrote:
      const gchar *tmpdir = g_get_tmp_dir();
      gchar *tmpfile = g_strdup_printf("%s/failover_test_migrate-%u-%u",
-                                     tmpdir, getpid(), g_test_rand_int());
+                                     tmpdir, getpid(), g_random_int());

Random numbers plus pid are irrelevant, because you still don't have guaranteed uniqueness -- think stale files in /tmp.

Use g_file_open_tmp.


r~

Reply via email to