summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-09-03 10:10:11 +0200
committerStef Walter <stefw@redhat.com>2014-09-03 11:13:43 +0200
commit6ee9bb7e551bd86c4dd829e7660b39efdf186549 (patch)
treecaf0cbd053b25b94d4e7aadad7b10544141fe628
parentb9e365d0f5ddb43d9ebd3e7b33bd28a9b3ea741b (diff)
configure: Dump required GLib version to 2.38
We want to use 2.38.x and 2.36.x APIs in the GcrSshAskpass code and the 2.38.x has been available in most distributions for a while.
-rw-r--r--configure.ac6
-rw-r--r--egg/egg-testing.c4
-rw-r--r--egg/test-asn1.c5
-rw-r--r--gck/test-gck-attributes.c3
-rw-r--r--gck/test-gck-crypto.c3
-rw-r--r--gck/test-gck-enumerator.c3
-rw-r--r--gck/test-gck-module.c3
-rw-r--r--gck/test-gck-modules.c3
-rw-r--r--gck/test-gck-object.c3
-rw-r--r--gck/test-gck-session.c3
-rw-r--r--gck/test-gck-slot.c3
-rw-r--r--gck/test-gck-uri.c3
-rw-r--r--gcr/frob-parser.c3
-rw-r--r--gcr/test-certificate-chain.c3
-rw-r--r--gcr/test-certificate.c3
-rw-r--r--gcr/test-filter-collection.c3
-rw-r--r--gcr/test-fingerprint.c3
-rw-r--r--gcr/test-gnupg-collection.c3
-rw-r--r--gcr/test-gnupg-key.c13
-rw-r--r--gcr/test-gnupg-process.c3
-rw-r--r--gcr/test-memory-icon.c3
-rw-r--r--gcr/test-openpgp.c3
-rw-r--r--gcr/test-openssh.c3
-rw-r--r--gcr/test-parser.c3
-rw-r--r--gcr/test-pkcs11-certificate.c3
-rw-r--r--gcr/test-record.c3
-rw-r--r--gcr/test-secret-exchange.c3
-rw-r--r--gcr/test-simple-certificate.c3
-rw-r--r--gcr/test-subject-public-key.c3
-rw-r--r--gcr/test-system-prompt.c3
-rw-r--r--gcr/test-trust.c3
-rw-r--r--gcr/test-util.c3
-rw-r--r--ui/gcr-prompter-tool.c3
-rw-r--r--ui/gcr-viewer-tool.c4
34 files changed, 12 insertions, 107 deletions
diff --git a/configure.ac b/configure.ac
index 7c359eb..7aecf1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,9 +11,9 @@ AC_INIT([gcr], [gcr_major.gcr_minor.gcr_micro],
dnl ****************************************************************************
dnl Dependency versions
-GLIB_REQ=2.32.0
-GLIB_MIN=GLIB_VERSION_2_32
-GLIB_MAX=GLIB_VERSION_2_34
+GLIB_REQ=2.38.0
+GLIB_MIN=GLIB_VERSION_2_38
+GLIB_MAX=GLIB_VERSION_2_38
dnl ****************************************************************************
dnl Library package and libtool versioning
diff --git a/egg/egg-testing.c b/egg/egg-testing.c
index df6e4ee..6ca46a8 100644
--- a/egg/egg-testing.c
+++ b/egg/egg-testing.c
@@ -237,10 +237,6 @@ egg_tests_run_with_loop (void)
GMainLoop *loop;
gpointer ret;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
-
loop = g_main_loop_new (NULL, FALSE);
wait_condition = g_cond_new ();
wait_start = g_cond_new ();
diff --git a/egg/test-asn1.c b/egg/test-asn1.c
index 883c92b..e0921b8 100644
--- a/egg/test-asn1.c
+++ b/egg/test-asn1.c
@@ -391,11 +391,12 @@ test_integer_raw_not_twos_complement (void)
bytes = g_bytes_new_static ("\x81\x02\x03", 3);
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) {
+ if (g_test_subprocess ()) {
egg_asn1x_set_integer_as_raw (asn, bytes); /* UNREACHABLE: */
- exit(0); /* UNREACHABLE: for code coverage */
+ return;
}
+ g_test_trap_subprocess ("/asn1/integer/raw-not-twos-complement", 0, G_TEST_SUBPROCESS_INHERIT_STDOUT);
g_test_trap_assert_failed ();
g_test_trap_assert_stderr ("*not two's complement*");
diff --git a/gck/test-gck-attributes.c b/gck/test-gck-attributes.c
index 0cfd95e..c216ad1 100644
--- a/gck/test-gck-attributes.c
+++ b/gck/test-gck-attributes.c
@@ -1298,9 +1298,6 @@ test_find_attributes (void)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gck/value/to_boolean", test_value_to_boolean);
diff --git a/gck/test-gck-crypto.c b/gck/test-gck-crypto.c
index f2bd7f9..0cb3e2b 100644
--- a/gck/test-gck-crypto.c
+++ b/gck/test-gck-crypto.c
@@ -650,9 +650,6 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-gck-crypto");
diff --git a/gck/test-gck-enumerator.c b/gck/test-gck-enumerator.c
index 9d01c4c..90e7253 100644
--- a/gck/test-gck-enumerator.c
+++ b/gck/test-gck-enumerator.c
@@ -606,9 +606,6 @@ test_chained (Test *test,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-gck-enumerator");
diff --git a/gck/test-gck-module.c b/gck/test-gck-module.c
index 068423f..1b33355 100644
--- a/gck/test-gck-module.c
+++ b/gck/test-gck-module.c
@@ -164,9 +164,6 @@ test_module_info (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gck/module/initialize_async", test_initialize_async);
diff --git a/gck/test-gck-modules.c b/gck/test-gck-modules.c
index 4307408..015c571 100644
--- a/gck/test-gck-modules.c
+++ b/gck/test-gck-modules.c
@@ -190,9 +190,6 @@ test_enumerate_uri (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add ("/gck/modules/enumerate_objects", Test, NULL, setup, test_enumerate_objects, teardown);
diff --git a/gck/test-gck-object.c b/gck/test-gck-object.c
index 9622bb2..3f782eb 100644
--- a/gck/test-gck-object.c
+++ b/gck/test-gck-object.c
@@ -397,9 +397,6 @@ test_find_objects (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add ("/gck/object/object_props", Test, NULL, setup, test_object_props, teardown);
diff --git a/gck/test-gck-session.c b/gck/test-gck-session.c
index 19c3361..cedb436 100644
--- a/gck/test-gck-session.c
+++ b/gck/test-gck-session.c
@@ -501,9 +501,6 @@ test_auto_login (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-gck-session");
diff --git a/gck/test-gck-slot.c b/gck/test-gck-slot.c
index 4661d49..b8bcecf 100644
--- a/gck/test-gck-slot.c
+++ b/gck/test-gck-slot.c
@@ -241,9 +241,6 @@ test_token_info_match_different (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add ("/gck/slot/slot_info", Test, NULL, setup, test_slot_info, teardown);
diff --git a/gck/test-gck-uri.c b/gck/test-gck-uri.c
index 39ef9f1..ae49d09 100644
--- a/gck/test-gck-uri.c
+++ b/gck/test-gck-uri.c
@@ -524,9 +524,6 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
/* Suppress these messages in tests */
diff --git a/gcr/frob-parser.c b/gcr/frob-parser.c
index 6b311ab..1abf2e9 100644
--- a/gcr/frob-parser.c
+++ b/gcr/frob-parser.c
@@ -78,9 +78,6 @@ main(int argc, char *argv[])
GBytes *bytes;
gchar *path;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_set_prgname ("frob-parser");
if (argc != 2) {
diff --git a/gcr/test-certificate-chain.c b/gcr/test-certificate-chain.c
index ac2f734..99d8135 100644
--- a/gcr/test-certificate-chain.c
+++ b/gcr/test-certificate-chain.c
@@ -688,9 +688,6 @@ test_with_anchor_error_async (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-certificate-chain");
diff --git a/gcr/test-certificate.c b/gcr/test-certificate.c
index 8d77e88..b593ea3 100644
--- a/gcr/test-certificate.c
+++ b/gcr/test-certificate.c
@@ -268,9 +268,6 @@ test_basic_constraints (Test *test,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-certificate");
diff --git a/gcr/test-filter-collection.c b/gcr/test-filter-collection.c
index 3710ea8..952dbd3 100644
--- a/gcr/test-filter-collection.c
+++ b/gcr/test-filter-collection.c
@@ -260,9 +260,6 @@ test_add_remove (Test *test,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-filter-collection");
diff --git a/gcr/test-fingerprint.c b/gcr/test-fingerprint.c
index 6c5e07b..417d338 100644
--- a/gcr/test-fingerprint.c
+++ b/gcr/test-fingerprint.c
@@ -197,9 +197,6 @@ test_dsa (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add ("/gcr/fingerprint/rsa", Test, NULL, setup, test_rsa, teardown);
diff --git a/gcr/test-gnupg-collection.c b/gcr/test-gnupg-collection.c
index c936539..7aed48c 100644
--- a/gcr/test-gnupg-collection.c
+++ b/gcr/test-gnupg-collection.c
@@ -230,9 +230,6 @@ test_reload (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-gnupg-collection");
diff --git a/gcr/test-gnupg-key.c b/gcr/test-gnupg-key.c
index 1d86907..4590311 100644
--- a/gcr/test-gnupg-key.c
+++ b/gcr/test-gnupg-key.c
@@ -185,12 +185,13 @@ test_with_secret (Test *test, gconstpointer unused)
static void
test_no_change_keyid (Test *test, gconstpointer unused)
{
- if (g_test_trap_fork (50000, G_TEST_TRAP_SILENCE_STDERR)) {
+ if (g_test_subprocess ()) {
/* Changing the keyid. This should fail with a warning */
_gcr_gnupg_key_set_public_records (test->key, test->pubset);
- exit (0);
+ return;
}
+ g_test_trap_subprocess ("/gcr/gnupg-key/no_change_keyid", 0, G_TEST_SUBPROCESS_INHERIT_STDOUT);
g_test_trap_assert_failed ();
g_test_trap_assert_stderr ("*fingerprint is no longer the same:*");
}
@@ -198,12 +199,13 @@ test_no_change_keyid (Test *test, gconstpointer unused)
static void
test_secret_mismatched_keyid (Test *test, gconstpointer unused)
{
- if (g_test_trap_fork (50000, G_TEST_TRAP_SILENCE_STDERR)) {
+ if (g_test_subprocess ()) {
/* Different keyid for secret part. This should fail with a warning */
_gcr_gnupg_key_set_secret_records (test->key, test->secset);
- exit (0);
+ return;
}
+ g_test_trap_subprocess ("/gcr/gnupg-key/secret_mismatched_keyid", 0, G_TEST_SUBPROCESS_INHERIT_STDOUT);
g_test_trap_assert_failed ();
g_test_trap_assert_stderr ("*pub and sec parts are not the same:*");
}
@@ -211,9 +213,6 @@ test_secret_mismatched_keyid (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add ("/gcr/gnupg-key/label", Test, NULL, setup, test_label, teardown);
diff --git a/gcr/test-gnupg-process.c b/gcr/test-gnupg-process.c
index 7051700..d6cedd0 100644
--- a/gcr/test-gnupg-process.c
+++ b/gcr/test-gnupg-process.c
@@ -569,9 +569,6 @@ test_run_and_cancel_later (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-gnupg-process");
diff --git a/gcr/test-memory-icon.c b/gcr/test-memory-icon.c
index 39f1a0a..283dcd9 100644
--- a/gcr/test-memory-icon.c
+++ b/gcr/test-memory-icon.c
@@ -204,9 +204,6 @@ test_load_async (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add ("/gcr/memory-icon/equal_same", Test, NULL, setup, test_equal_same, teardown);
diff --git a/gcr/test-openpgp.c b/gcr/test-openpgp.c
index 21226e6..afba139 100644
--- a/gcr/test-openpgp.c
+++ b/gcr/test-openpgp.c
@@ -336,9 +336,6 @@ main (int argc, char **argv)
guint i;
gchar *test_path;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-openpgp");
diff --git a/gcr/test-openssh.c b/gcr/test-openssh.c
index a48e282..3161736 100644
--- a/gcr/test-openssh.c
+++ b/gcr/test-openssh.c
@@ -216,9 +216,6 @@ test_parse_v2_options (Test *test,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-openssh");
diff --git a/gcr/test-parser.c b/gcr/test-parser.c
index 20c0135..13cbc2b 100644
--- a/gcr/test-parser.c
+++ b/gcr/test-parser.c
@@ -336,9 +336,6 @@ main (int argc, char **argv)
gchar *test;
int ret;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-parser");
diff --git a/gcr/test-pkcs11-certificate.c b/gcr/test-pkcs11-certificate.c
index c3ac8a4..e1858ce 100644
--- a/gcr/test-pkcs11-certificate.c
+++ b/gcr/test-pkcs11-certificate.c
@@ -268,9 +268,6 @@ test_lookup_certificate_issuer_fail_async (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-pkcs11-certificate");
diff --git a/gcr/test-record.c b/gcr/test-record.c
index c560544..6f39c32 100644
--- a/gcr/test-record.c
+++ b/gcr/test-record.c
@@ -268,9 +268,6 @@ test_boxed (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gcr/record/parse_colons", test_parse_colons);
diff --git a/gcr/test-secret-exchange.c b/gcr/test-secret-exchange.c
index 1b60742..27d7775 100644
--- a/gcr/test-secret-exchange.c
+++ b/gcr/test-secret-exchange.c
@@ -155,9 +155,6 @@ test_perform_multiple (Test *test,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-secret-exchange");
diff --git a/gcr/test-simple-certificate.c b/gcr/test-simple-certificate.c
index 38287b1..9353c5e 100644
--- a/gcr/test-simple-certificate.c
+++ b/gcr/test-simple-certificate.c
@@ -90,9 +90,6 @@ test_new_static (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-simple-certificate");
diff --git a/gcr/test-subject-public-key.c b/gcr/test-subject-public-key.c
index c4e7c4d..f92995a 100644
--- a/gcr/test-subject-public-key.c
+++ b/gcr/test-subject-public-key.c
@@ -689,9 +689,6 @@ main (int argc, char **argv)
gint ret;
guint i;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
test_names = g_ptr_array_new_with_free_func (g_free);
diff --git a/gcr/test-system-prompt.c b/gcr/test-system-prompt.c
index b2d384c..733693c 100644
--- a/gcr/test-system-prompt.c
+++ b/gcr/test-system-prompt.c
@@ -741,9 +741,6 @@ test_watch_cancels (Test *test,
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-system-prompt");
diff --git a/gcr/test-trust.c b/gcr/test-trust.c
index eef8bdf..fb3dca9 100644
--- a/gcr/test-trust.c
+++ b/gcr/test-trust.c
@@ -308,9 +308,6 @@ test_is_certificate_anchored_async (Test *test, gconstpointer unused)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_set_prgname ("test-trust");
diff --git a/gcr/test-util.c b/gcr/test-util.c
index 76bc948..6e7610f 100644
--- a/gcr/test-util.c
+++ b/gcr/test-util.c
@@ -100,9 +100,6 @@ test_parse_lines_dos (void)
int
main (int argc, char **argv)
{
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gcr/util/test_parse_lines", test_parse_lines);
diff --git a/ui/gcr-prompter-tool.c b/ui/gcr-prompter-tool.c
index 4e2d043..f0cb0e8 100644
--- a/ui/gcr-prompter-tool.c
+++ b/ui/gcr-prompter-tool.c
@@ -208,9 +208,6 @@ main (int argc, char *argv[])
guint system_owner_id;
guint private_owner_id;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
gtk_init (&argc, &argv);
#ifdef HAVE_LOCALE_H
diff --git a/ui/gcr-viewer-tool.c b/ui/gcr-viewer-tool.c
index 37661a0..0117d70 100644
--- a/ui/gcr-viewer-tool.c
+++ b/ui/gcr-viewer-tool.c
@@ -86,10 +86,6 @@ main (int argc, char *argv[])
GError *error = NULL;
GtkWindow *window;
-#if !GLIB_CHECK_VERSION(2,35,0)
- g_type_init ();
-#endif
-
#ifdef HAVE_LOCALE_H
/* internationalisation */
setlocale (LC_ALL, "");