From 652198e93fb05d301e6a8873b0364692f7f47ce4 Mon Sep 17 00:00:00 2001 From: lurchi Date: Mon, 4 Sep 2017 09:17:45 +0200 Subject: [PATCH] Don't consider restart when the test action already finished In the old scheduler implementation tasks with different priorities were run in the same event loop iteration, in the new implementation this cannot be guaranteed anymore, as it's driver-dependent. For the FS tests this means that when adding both an 'abort' task and a 'restart' task (the latter with higher priority) the 'restart' task didn't take effect with the old implementation but does with the new implementation (and leads to an assertion failure). Not scheduling the 'restart' task when the action (download/publish) has already finished successfully solves this issue. --- src/fs/test_fs_download_persistence.c | 1 - src/fs/test_fs_publish_persistence.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index 76a1ea911..8f27e82af 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c @@ -179,7 +179,6 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) GNUNET_FS_DOWNLOAD_OPTION_NONE, "download", NULL); break; case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: - consider_restart (event->status); printf ("Download complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000000LL / (1 + diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index be9006d42..103ca01b8 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c @@ -134,7 +134,6 @@ progress_cb (void *cls, switch (event->status) { case GNUNET_FS_STATUS_PUBLISH_COMPLETED: - consider_restart (event->status); ret = event->value.publish.cctx; printf ("Publish complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000000LL / -- 2.25.1