From a94ac8f06826571666ea0a88feb3a4bf35b4ddfe Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 23 Dec 2020 22:02:06 -0800 Subject: 7393 Snapshot. Keyboard interrupt being triggered. This was hard to debug until https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel reminded me that I'd forgotten to enable IRQ1 on port 0x21. For a while I was confused by never hitting a breakpoint at the start of the keyboard handler. Then I found https://sourceforge.net/p/bochs/discussion/39592/thread/5e397455 and started skipping one instruction in my breakpoint. I still don't understand the discrepancy between some people installing the handler at entry 9, and others installing at entry 0x21 = 33. --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 34070bbc..f39cd10b 100644 --- a/README.md +++ b/README.md @@ -220,3 +220,6 @@ claims of completeness: - Wikipedia on BIOS interfaces: [Int 10h](https://en.wikipedia.org/wiki/INT_10H), [Int 13h](https://en.wikipedia.org/wiki/INT_13H). - [Some tips on programming bootloaders](https://stackoverflow.com/questions/43786251/int-13h-42h-doesnt-load-anything-in-bochs/43787939#43787939) by Michael Petch. +- [xv6, the port of Unix Version 6 to x86 processors](https://github.com/mit-pdos/xv6-public) +- Some tips on handling keyboard interrupts by [Alex Dzyoba](https://alex.dzyoba.com/blog/os-interrupts) + and [Michael Petch](https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel). -- cgit 1.4.1-2-gfad0 1a8ac660a84e2d72a4a1a44a'>tree commit diff stats
path: root/tests/unittests/test_preferences.c
blob: f3fe8e3ef7e7575981bfb192fb2bd4f6f42ffa3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#include "config/preferences.h"

void
statuses_console_defaults_to_all(void** state)
{
    char* setting = prefs_get_string(PREF_STATUSES_CONSOLE);

    assert_non_null(setting);
    assert_string_equal("all", setting);
    g_free(setting);
}

void
statuses_chat_defaults_to_all(void** state)
{
    char* setting = prefs_get_string(PREF_STATUSES_CHAT);

    assert_non_null(setting);
    assert_string_equal("all", setting);
    g_free(setting);
}

void
statuses_muc_defaults_to_all(void** state)
{
    char* setting = prefs_get_string(PREF_STATUSES_MUC);

    assert_non_null(setting);
    assert_string_equal("all", setting);
    g_free(setting);
}