From b3e34c9314ef3d56cd5179493b0828d090234ee5 Mon Sep 17 00:00:00 2001 From: "Enrico Fraccaroli (Galfurian)" Date: Fri, 15 Mar 2024 12:30:40 -0400 Subject: [PATCH 1/3] Check for null timer functions. --- mentos/src/hardware/timer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mentos/src/hardware/timer.c b/mentos/src/hardware/timer.c index 8b4009ec3..0ebf80b2 100644 --- a/mentos/src/hardware/timer.c +++ b/mentos/src/hardware/timer.c @@ -422,10 +422,14 @@ void run_timer_softirq(void) list_for_each_safe (it, tmp, &base->tv1.vec[current_time_index]) { struct timer_list *timer = list_entry(it, struct timer_list, entry); - // Executes timer function spinlock_unlock(&base->lock); - pr_debug("Executing dynamic timer function...\n"); - timer->function(timer->data); + // Executes timer function + if (timer->function) { + pr_debug("Executing dynamic timer function...\n"); + timer->function(timer->data); + } else { + pr_alert("Dynamic timer function is NULL...\n"); + } spinlock_lock(&base->lock); // Removes timer from list From 1619cce8e80f594cfd95dbc2762fe5002142a8e7 Mon Sep 17 00:00:00 2001 From: "Enrico Fraccaroli (Galfurian)" Date: Fri, 15 Mar 2024 12:33:38 -0400 Subject: [PATCH 2/3] Disable test in . --- programs/runtests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/runtests.c b/programs/runtests.c index aaa92baa..bfd5fbc3 100644 --- a/programs/runtests.c +++ b/programs/runtests.c @@ -27,7 +27,7 @@ static char *all_tests[] = { "t_abort", "t_alarm", - "t_big_write", + /* "t_big_write", */ "t_creat", "t_dup", "t_exec execl", From 11719d3da5bf3ee05d06135f7f22ae39b5a3317a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 15 Mar 2024 20:45:58 +0100 Subject: [PATCH 3/3] CI: add 10 minute timeout Currently our tests run for less than two minutes. Adding a timeout of 10 minutes seems save and prevents wasting resources. --- .github/workflows/ubuntu.yml | 1 + programs/cat.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2cdc96d6..961655ad 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -86,6 +86,7 @@ jobs: cmake --build build --parallel 2 test: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Clone repository uses: actions/checkout@v4 diff --git a/programs/cat.c b/programs/cat.c index c45692bd..fe01236c 100644 --- a/programs/cat.c +++ b/programs/cat.c @@ -55,6 +55,5 @@ int main(int argc, char **argv) ret = EXIT_FAILURE; } } - putchar('\n'); return ret; }