mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-05 14:38:12 -04:00
tests: Add system-norevokefs alternative to check fallback paths
Closes: #2657 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
c6faa78403
commit
04aece20a3
@@ -47,6 +47,7 @@ G_LOCK_DEFINE (cache_dirs_in_use);
|
||||
static GHashTable *cache_dirs_in_use = NULL;
|
||||
|
||||
static gboolean on_session_bus = FALSE;
|
||||
static gboolean disable_revokefs = FALSE;
|
||||
static gboolean no_idle_exit = FALSE;
|
||||
|
||||
#define IDLE_TIMEOUT_SECS 10 * 60
|
||||
@@ -1647,6 +1648,12 @@ handle_get_revokefs_fd (FlatpakSystemHelper *object,
|
||||
|
||||
g_debug ("GetRevokefsFd %u %s", arg_flags, arg_installation);
|
||||
|
||||
if (disable_revokefs)
|
||||
{
|
||||
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "RevokeFS disabled");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
system = dir_get_system (arg_installation, get_sender_pid (invocation), &error);
|
||||
if (system == NULL)
|
||||
{
|
||||
@@ -2198,6 +2205,9 @@ main (int argc,
|
||||
|
||||
g_setenv ("GIO_USE_VFS", "local", TRUE);
|
||||
|
||||
if (g_getenv ("FLATPAK_DISABLE_REVOKEFS"))
|
||||
disable_revokefs = TRUE;
|
||||
|
||||
g_set_prgname (argv[0]);
|
||||
|
||||
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, message_handler, NULL);
|
||||
|
||||
@@ -4,14 +4,18 @@ TEST_MATRIX= \
|
||||
tests/test-run@user,deltas.wrap \
|
||||
tests/test-run@system,nodeltas.wrap \
|
||||
tests/test-run@system,deltas.wrap \
|
||||
tests/test-run@system-norevokefs,nodeltas.wrap \
|
||||
tests/test-run@system-norevokefs,deltas.wrap \
|
||||
tests/test-info@user.wrap \
|
||||
tests/test-info@system.wrap \
|
||||
tests/test-repo@user.wrap \
|
||||
tests/test-repo@system.wrap \
|
||||
tests/test-repo@system-norevokefs.wrap \
|
||||
tests/test-repo@collections.wrap \
|
||||
tests/test-repo@collections-server-only.wrap \
|
||||
tests/test-bundle@user.wrap \
|
||||
tests/test-bundle@system.wrap \
|
||||
tests/test-bundle@system-norevokefs.wrap \
|
||||
tests/test-oci-registry@user.wrap \
|
||||
tests/test-oci-registry@system.wrap \
|
||||
$(NULL)
|
||||
|
||||
@@ -124,11 +124,11 @@ TEST_MATRIX_SOURCE = \
|
||||
tests/test-config.sh \
|
||||
tests/test-build-update-repo.sh \
|
||||
tests/test-http-utils.sh \
|
||||
tests/test-run.sh{{user+system},{nodeltas+deltas}} \
|
||||
tests/test-run.sh{{user+system+system-norevokefs},{nodeltas+deltas}} \
|
||||
tests/test-info.sh{user+system} \
|
||||
tests/test-repo.sh{user+system+collections+collections-server-only} \
|
||||
tests/test-repo.sh{user+system+system-norevokefs+collections+collections-server-only} \
|
||||
tests/test-extensions.sh \
|
||||
tests/test-bundle.sh{user+system} \
|
||||
tests/test-bundle.sh{user+system+system-norevokefs} \
|
||||
tests/test-oci.sh \
|
||||
tests/test-oci-registry.sh{user+system} \
|
||||
tests/test-unsigned-summaries.sh \
|
||||
|
||||
@@ -5,6 +5,10 @@ for feature in $(echo $1 | sed "s/^.*@\(.*\).wrap/\1/" | tr "," "\n"); do
|
||||
system)
|
||||
export USE_SYSTEMDIR=yes
|
||||
;;
|
||||
system-norevokefs)
|
||||
export USE_SYSTEMDIR=yes
|
||||
export FLATPAK_DISABLE_REVOKEFS=yes
|
||||
;;
|
||||
user)
|
||||
export USE_SYSTEMDIR=no
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user