mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 20:14:27 +01:00
test-gdb: ok, it actually works now and exits a failure, OMG I hate threads
This commit is contained in:
3
run-gdb
3
run-gdb
@@ -152,8 +152,7 @@ See: https://github.com/cirosantilli/linux-kernel-module-cheat#gdb-builtin-cpu-s
|
|||||||
allowed_toolchains = ['buildroot', 'crosstool-ng', 'host']
|
allowed_toolchains = ['buildroot', 'crosstool-ng', 'host']
|
||||||
cmd = (
|
cmd = (
|
||||||
[self.get_toolchain_tool('gdb', allowed_toolchains=allowed_toolchains), LF] +
|
[self.get_toolchain_tool('gdb', allowed_toolchains=allowed_toolchains), LF] +
|
||||||
before +
|
before
|
||||||
['-q', LF]
|
|
||||||
)
|
)
|
||||||
if linux_full_system:
|
if linux_full_system:
|
||||||
cmd.extend(['-ex', 'add-auto-load-safe-path {}'.format(self.env['linux_build_dir']), LF])
|
cmd.extend(['-ex', 'add-auto-load-safe-path {}'.format(self.env['linux_build_dir']), LF])
|
||||||
|
|||||||
18
test-gdb
18
test-gdb
@@ -6,16 +6,6 @@ import os
|
|||||||
|
|
||||||
import common
|
import common
|
||||||
|
|
||||||
def output_reader(proc, file):
|
|
||||||
while True:
|
|
||||||
byte = proc.stdout.read(1)
|
|
||||||
if byte:
|
|
||||||
sys.stdout.buffer.write(byte)
|
|
||||||
sys.stdout.flush()
|
|
||||||
file.buffer.write(byte)
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
class Main(common.LkmcCliFunction):
|
class Main(common.LkmcCliFunction):
|
||||||
def timed_main(self):
|
def timed_main(self):
|
||||||
run = self.import_path('run').Main()
|
run = self.import_path('run').Main()
|
||||||
@@ -43,13 +33,11 @@ class Main(common.LkmcCliFunction):
|
|||||||
emulator=emulator,
|
emulator=emulator,
|
||||||
wait_gdb=True
|
wait_gdb=True
|
||||||
))
|
))
|
||||||
gdb_thread = threading.Thread(target=lambda: run_gdb(
|
|
||||||
arch=arch, baremetal=test_script_noext, print_time=False, emulator=emulator, test=True
|
|
||||||
))
|
|
||||||
run_thread.start()
|
run_thread.start()
|
||||||
gdb_thread.start()
|
run_gdb(
|
||||||
|
arch=arch, baremetal=test_script_noext, print_time=False, emulator=emulator, test=True
|
||||||
|
)
|
||||||
run_thread.join()
|
run_thread.join()
|
||||||
gdb_thread.join()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Main().cli()
|
Main().cli()
|
||||||
|
|||||||
Reference in New Issue
Block a user