mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
test-gdb: bring back to life
Well factored with ./test-baremetal, allowing for target selection.
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#include <assert.h>
|
||||
|
||||
int main(void) {
|
||||
int i, j, k;
|
||||
i = 1;
|
||||
/* test-gdb-op1 */
|
||||
j = 2;
|
||||
/* test-gdb-op2 */
|
||||
k = i + j;
|
||||
/* test-gdb-result */
|
||||
if (k != 3)
|
||||
assert(0);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
def test(self):
|
||||
self.sendline('tbreak main')
|
||||
self.sendline('continue')
|
||||
self.continue_to('op1')
|
||||
assert self.get_int('i') == 1
|
||||
self.continue_to('op2')
|
||||
assert self.get_int('j') == 2
|
||||
self.continue_to('result')
|
||||
assert self.get_int('k') == 3
|
||||
Reference in New Issue
Block a user