diff options
author | lurchi <lurchi@strangeplace.net> | 2017-09-04 09:17:45 +0200 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-09-04 09:17:45 +0200 |
commit | 652198e93fb05d301e6a8873b0364692f7f47ce4 (patch) | |
tree | 49a40563ac15c7498ecd4b3cf4d0dfa397ce6ba3 /src/fs | |
parent | 909c769cc09296f8abccf2a5ee6a6a687b4efc3a (diff) | |
download | gnunet-652198e93fb05d301e6a8873b0364692f7f47ce4.tar.gz gnunet-652198e93fb05d301e6a8873b0364692f7f47ce4.zip |
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.
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/test_fs_download_persistence.c | 1 | ||||
-rw-r--r-- | src/fs/test_fs_publish_persistence.c | 1 |
2 files changed, 0 insertions, 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) | |||
179 | GNUNET_FS_DOWNLOAD_OPTION_NONE, "download", NULL); | 179 | GNUNET_FS_DOWNLOAD_OPTION_NONE, "download", NULL); |
180 | break; | 180 | break; |
181 | case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: | 181 | case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: |
182 | consider_restart (event->status); | ||
183 | printf ("Download complete, %llu kbps.\n", | 182 | printf ("Download complete, %llu kbps.\n", |
184 | (unsigned long long) (FILESIZE * 1000000LL / | 183 | (unsigned long long) (FILESIZE * 1000000LL / |
185 | (1 + | 184 | (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, | |||
134 | switch (event->status) | 134 | switch (event->status) |
135 | { | 135 | { |
136 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: | 136 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: |
137 | consider_restart (event->status); | ||
138 | ret = event->value.publish.cctx; | 137 | ret = event->value.publish.cctx; |
139 | printf ("Publish complete, %llu kbps.\n", | 138 | printf ("Publish complete, %llu kbps.\n", |
140 | (unsigned long long) (FILESIZE * 1000000LL / | 139 | (unsigned long long) (FILESIZE * 1000000LL / |