mirror of
https://github.com/dynup/kpatch
synced 2024-12-23 21:52:07 +00:00
test: add basic tests for special sections
One of the tests is now failing: ERROR: smp-locks-section: kpatch replace failed I suspect the issue is the vmlinux mismatch problem. Fix for that coming soon.
This commit is contained in:
parent
707afe238c
commit
ecfed91904
12
test/integration/bug-table-section.patch
Normal file
12
test/integration/bug-table-section.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Index: src/fs/proc/proc_sysctl.c
|
||||
===================================================================
|
||||
--- src.orig/fs/proc/proc_sysctl.c
|
||||
+++ src/fs/proc/proc_sysctl.c
|
||||
@@ -266,6 +266,7 @@ void sysctl_head_put(struct ctl_table_he
|
||||
|
||||
static struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *head)
|
||||
{
|
||||
+ printk("kpatch-test: testing __bug_table section changes\n");
|
||||
BUG_ON(!head);
|
||||
spin_lock(&sysctl_lock);
|
||||
if (!use_table(head))
|
12
test/integration/parainstructions-section.patch
Normal file
12
test/integration/parainstructions-section.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Index: src/fs/proc/generic.c
|
||||
===================================================================
|
||||
--- src.orig/fs/proc/generic.c
|
||||
+++ src/fs/proc/generic.c
|
||||
@@ -132,6 +132,7 @@ int proc_alloc_inum(unsigned int *inum)
|
||||
unsigned int i;
|
||||
int error;
|
||||
|
||||
+ printk("kpatch-test: testing change to .parainstructions section\n");
|
||||
retry:
|
||||
if (!ida_pre_get(&proc_inum_ida, GFP_KERNEL))
|
||||
return -ENOMEM;
|
12
test/integration/smp-locks-section.patch
Normal file
12
test/integration/smp-locks-section.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Index: src/drivers/tty/tty_buffer.c
|
||||
===================================================================
|
||||
--- src.orig/drivers/tty/tty_buffer.c
|
||||
+++ src/drivers/tty/tty_buffer.c
|
||||
@@ -245,6 +245,7 @@ static int __tty_buffer_request_room(str
|
||||
struct tty_buffer *b, *n;
|
||||
int left, change;
|
||||
|
||||
+ printk("kpatch-test: testing .smp_locks section changes\n");
|
||||
b = buf->tail;
|
||||
if (b->flags & TTYB_NORMAL)
|
||||
left = 2 * b->size - b->used;
|
Loading…
Reference in New Issue
Block a user