aboutsummaryrefslogtreecommitdiff
path: root/src/util/Makefile.am
diff options
context:
space:
mode:
authorulfvonbelow <strilen@tilde.club>2023-01-28 15:30:54 -0600
committerChristian Grothoff <christian@grothoff.org>2023-02-06 16:11:05 +0100
commit3f6f1fb44b6b6aa8f70e71d7a9c73ba623f8c9f7 (patch)
tree94ed2a71446dd3a8798bb8a13f4f089c713d6d50 /src/util/Makefile.am
parenteabc1baaf980d8948f3fc0ac83a84446d5f1b226 (diff)
downloadgnunet-3f6f1fb44b6b6aa8f70e71d7a9c73ba623f8c9f7.tar.gz
gnunet-3f6f1fb44b6b6aa8f70e71d7a9c73ba623f8c9f7.zip
UTIL: add test demonstrating scheduler bug, don't run it by default.
These demonstrate a bug in the scheduler by which a task can prevent any other task from running for an arbitrarily long time despite regularly yielding to the scheduler. It is caused by a faulty check in GNUNET_SCHEDULER_do_work that assumes that the task that was the last in the queue when the pass began will still be in the same relative position when the pass ends, and uses this assumption to detect the end of the current pass. This assumption fails when the last task of the current pass is canceled after the pass has started. It also fails when we schedule a higher-priority task to run immediately, causing work_priority to immediately switch such that we now process a queue that doesn't contain the pass-ending task we're looking for. These tests are built, but not run by 'make check' yet, since they currently fail. You can manually verify that they do currently fail. Signed-off-by: Christian Grothoff <christian@grothoff.org>
Diffstat (limited to 'src/util/Makefile.am')
-rw-r--r--src/util/Makefile.am12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index ed01558eb..81b8a93b7 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -174,6 +174,8 @@ endif
174noinst_PROGRAMS = \ 174noinst_PROGRAMS = \
175 gnunet-config-diff \ 175 gnunet-config-diff \
176 test_common_logging_dummy \ 176 test_common_logging_dummy \
177 test_scheduler_hogging_cancel \
178 test_scheduler_hogging_priority \
177 gnunet-crypto-tvg 179 gnunet-crypto-tvg
178 180
179if ENABLE_TEST_RUN 181if ENABLE_TEST_RUN
@@ -587,6 +589,16 @@ test_scheduler_delay_SOURCES = \
587test_scheduler_delay_LDADD = \ 589test_scheduler_delay_LDADD = \
588 libgnunetutil.la 590 libgnunetutil.la
589 591
592test_scheduler_hogging_cancel_SOURCES = \
593 test_scheduler_hogging_cancel.c
594test_scheduler_hogging_cancel_LDADD = \
595 libgnunetutil.la
596
597test_scheduler_hogging_priority_SOURCES = \
598 test_scheduler_hogging_priority.c
599test_scheduler_hogging_priority_LDADD = \
600 libgnunetutil.la
601
590test_service_SOURCES = \ 602test_service_SOURCES = \
591 test_service.c 603 test_service.c
592test_service_LDADD = \ 604test_service_LDADD = \