mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +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']
|
||||
cmd = (
|
||||
[self.get_toolchain_tool('gdb', allowed_toolchains=allowed_toolchains), LF] +
|
||||
before +
|
||||
['-q', LF]
|
||||
before
|
||||
)
|
||||
if linux_full_system:
|
||||
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
|
||||
|
||||
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):
|
||||
def timed_main(self):
|
||||
run = self.import_path('run').Main()
|
||||
@@ -43,13 +33,11 @@ class Main(common.LkmcCliFunction):
|
||||
emulator=emulator,
|
||||
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()
|
||||
gdb_thread.start()
|
||||
run_gdb(
|
||||
arch=arch, baremetal=test_script_noext, print_time=False, emulator=emulator, test=True
|
||||
)
|
||||
run_thread.join()
|
||||
gdb_thread.join()
|
||||
|
||||
if __name__ == '__main__':
|
||||
Main().cli()
|
||||
|
||||
Reference in New Issue
Block a user