int fd;
int fd_empty;
char *tmpd;
+ GError *skip_all;
} TestData;
static void
g_assert_cmpint (0, ==, mkdir ("repo", 0755));
ostree_repo_create (td->repo, OSTREE_REPO_MODE_BARE_USER, NULL, &error);
- g_assert_no_error (error);
+
+ /* G_IO_ERROR_NOT_SUPPORTED probably means no extended attribute support */
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
+ g_propagate_prefixed_error (&td->skip_all, g_steal_pointer (&error),
+ "Unable to set up repository: ");
+ else
+ g_assert_no_error (error);
}
}
OstreeRepoImportArchiveOptions opts = { 0, };
glnx_unref_object OstreeMutableTree *mtree = ostree_mutable_tree_new ();
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ return;
+ }
+
test_archive_setup (td->fd_empty, a);
(void)ostree_repo_import_archive_to_mtree (td->repo, &opts, a, mtree, NULL, NULL, &error);
OstreeRepoImportArchiveOptions opts = { 0, };
glnx_unref_object OstreeMutableTree *mtree = ostree_mutable_tree_new ();
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ return;
+ }
+
opts.autocreate_parents = 1;
test_archive_setup (td->fd_empty, a);
OstreeRepoImportArchiveOptions opts = { 0, };
glnx_unref_object OstreeMutableTree *mtree = ostree_mutable_tree_new ();
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ return;
+ }
+
test_archive_setup (td->fd, a);
(void)ostree_repo_import_archive_to_mtree (td->repo, &opts, a, mtree, NULL, NULL, &error);
if (skip_if_no_xattr (td))
goto out;
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ goto out;
+ }
+
test_archive_setup (td->fd, a);
opts.ignore_unsupported_content = TRUE;
if (skip_if_no_xattr (td))
goto out;
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ goto out;
+ }
+
test_archive_setup (td->fd, a);
opts.autocreate_parents = TRUE;
if (skip_if_no_xattr (td))
goto out;
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ goto out;
+ }
+
modifier = ostree_repo_commit_modifier_new (0, NULL, NULL, NULL);
ostree_repo_commit_modifier_set_xattr_callback (modifier, xattr_cb,
NULL, NULL);
if (skip_if_no_xattr (td))
goto out;
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ goto out;
+ }
+
modifier = ostree_repo_commit_modifier_new (0, NULL, NULL, NULL);
ostree_repo_commit_modifier_set_xattr_callback (modifier, path_cb,
NULL, &met_etc_file);
if (skip_if_no_xattr (td))
goto out;
+ if (td->skip_all != NULL)
+ {
+ g_test_skip (td->skip_all->message);
+ goto out;
+ }
+
{
glnx_unref_object GFile *root = g_file_new_for_path ("/");