From 0b5f901e581079682f0fbebee22a9c34305cb85f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 22 Aug 2014 14:43:54 +0200 Subject: [PATCH] Log name of exiting child from Child::exit() Fixes #1243. --- repos/base-linux/run/lx_fs.run | 2 +- repos/base-linux/run/lx_hybrid_ctors.run | 2 +- repos/base-linux/run/lx_hybrid_exception.run | 5 +---- repos/base-linux/run/lx_rmap.inc | 6 +++++- repos/base/include/base/child.h | 2 +- repos/base/run/cap_integrity.run | 2 +- repos/base/run/new_delete.run | 2 +- repos/base/run/rm_fault.run | 6 +++--- repos/base/run/thread.run | 2 +- repos/base/src/test/rm_fault/main.cc | 2 +- repos/base/src/test/rm_fault/target.mk | 2 +- repos/base/src/test/rm_nested/target.mk | 2 +- repos/dde_linux/run/usb_storage.run | 2 +- repos/dde_rump/run/rump_cgd_ext2.run | 2 +- repos/dde_rump/run/rump_ext2.run | 2 +- repos/dde_rump/run/rump_fat.run | 2 +- repos/dde_rump/run/rump_iso.run | 2 +- repos/libports/run/expat.run | 22 +++++++++----------- repos/libports/run/libc_block.run | 2 +- repos/libports/run/libc_ffat_fs.run | 2 +- repos/libports/run/libc_filesystem_test.inc | 2 +- repos/libports/run/libc_fs_tar_fs.run | 2 +- repos/libports/run/libc_vfs.run | 2 +- repos/libports/run/python.run | 2 +- repos/os/run/ldso.run | 2 +- repos/os/run/ram_fs_chunk.run | 2 +- repos/os/run/report_rom.run | 2 +- repos/os/run/resource_request.run | 2 +- repos/os/run/signal.run | 2 +- repos/os/run/synced_interface.run | 10 ++++----- repos/os/run/thread_join.run | 2 +- repos/os/run/volatile_object.run | 2 +- 32 files changed, 51 insertions(+), 52 deletions(-) diff --git a/repos/base-linux/run/lx_fs.run b/repos/base-linux/run/lx_fs.run index 6d2b9b3e43..aee42c45c3 100644 --- a/repos/base-linux/run/lx_fs.run +++ b/repos/base-linux/run/lx_fs.run @@ -72,7 +72,7 @@ build_boot_image { # Execute test case # -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {child "test-libc_vfs" exited with exit value 0.*\n} 20 puts "\nTest succeeded\n" diff --git a/repos/base-linux/run/lx_hybrid_ctors.run b/repos/base-linux/run/lx_hybrid_ctors.run index ad9cac2e34..1e0ee9a50b 100644 --- a/repos/base-linux/run/lx_hybrid_ctors.run +++ b/repos/base-linux/run/lx_hybrid_ctors.run @@ -51,7 +51,7 @@ build_boot_image $boot_modules # Execute test case # -run_genode_until "child exited with exit value 0.*\n" 10 +run_genode_until {child "test-lx_hybrid_ctors" exited with exit value 0.*\n} 10 # # Compare output diff --git a/repos/base-linux/run/lx_hybrid_exception.run b/repos/base-linux/run/lx_hybrid_exception.run index 32befb51c4..9c625e8066 100644 --- a/repos/base-linux/run/lx_hybrid_exception.run +++ b/repos/base-linux/run/lx_hybrid_exception.run @@ -50,10 +50,7 @@ build_boot_image $boot_modules # Execute test case # -# qemu config -append qemu_args "-nographic -m 64 " - -run_genode_until "child exited with exit value 0.*\n" 10 +run_genode_until {child "test-lx_hybrid_exception" exited with exit value 0.*\n} 10 puts "Test succeeded" diff --git a/repos/base-linux/run/lx_rmap.inc b/repos/base-linux/run/lx_rmap.inc index 5db836c4cb..8fae3f1c05 100644 --- a/repos/base-linux/run/lx_rmap.inc +++ b/repos/base-linux/run/lx_rmap.inc @@ -67,7 +67,11 @@ build_boot_image $boot_modules # Execute test # -run_genode_until "child exited with exit value 0.*\n" 10 +if {$test_type eq "static"} { + run_genode_until {child "test-lx_rmap_static" exited with exit value 0.*\n} 10 +} else { + run_genode_until {child "test-lx_rmap_dynamic" exited with exit value 0.*\n} 10 +} puts "Test succeeded" # vi: set ft=tcl : diff --git a/repos/base/include/base/child.h b/repos/base/include/base/child.h index b6c46cdb7f..d0eba447f4 100644 --- a/repos/base/include/base/child.h +++ b/repos/base/include/base/child.h @@ -94,7 +94,7 @@ namespace Genode { */ virtual void exit(int exit_value) { - PDBG("child exited with exit value %d", exit_value); + PDBG("child \"%s\" exited with exit value %d", name(), exit_value); } /** diff --git a/repos/base/run/cap_integrity.run b/repos/base/run/cap_integrity.run index 718e8c3952..a5f7bf3e4e 100644 --- a/repos/base/run/cap_integrity.run +++ b/repos/base/run/cap_integrity.run @@ -30,7 +30,7 @@ append qemu_args "-nographic -m 64" # increase expect buffer size, since there might be many log messages match_max -d 100000 -run_genode_until {child exited with exit value 0.*} 60 +run_genode_until {child "test-cap_integrity" exited with exit value 0.*\n} 20 grep_output {\[init\] test message} compare_output_to { } diff --git a/repos/base/run/new_delete.run b/repos/base/run/new_delete.run index f70cd4bb98..47122276c6 100644 --- a/repos/base/run/new_delete.run +++ b/repos/base/run/new_delete.run @@ -21,7 +21,7 @@ build_boot_image "core init test-new_delete" append qemu_args "-nographic -m 64" -run_genode_until {child exited with exit value 0} 15 +run_genode_until {child "test-new_delete" exited with exit value 0.*\n} 15 grep_output {^\[init -> test-new_delete\]} diff --git a/repos/base/run/rm_fault.run b/repos/base/run/rm_fault.run index 15d4bf91d2..7e3e60f80c 100644 --- a/repos/base/run/rm_fault.run +++ b/repos/base/run/rm_fault.run @@ -20,16 +20,16 @@ install_config { - + } -build_boot_image "core init test-rmfault" +build_boot_image "core init test-rm_fault" append qemu_args "-nographic -m 64" -run_genode_until {child exited with exit value 0.*} 10 +run_genode_until {child "test-rm_fault" exited with exit value 0.*} 10 puts "Test succeeded" diff --git a/repos/base/run/thread.run b/repos/base/run/thread.run index a08610f0f1..0e58215872 100644 --- a/repos/base/run/thread.run +++ b/repos/base/run/thread.run @@ -22,6 +22,6 @@ build_boot_image "core init test-thread" append qemu_args "-nographic -m 64" -run_genode_until "child exited with exit value 0.*\n" 20 +run_genode_until {child "test-thread" exited with exit value 0.*\n} 20 puts "Test succeeded" diff --git a/repos/base/src/test/rm_fault/main.cc b/repos/base/src/test/rm_fault/main.cc index b8adca78d1..191d43b2bd 100644 --- a/repos/base/src/test/rm_fault/main.cc +++ b/repos/base/src/test/rm_fault/main.cc @@ -208,7 +208,7 @@ int main(int argc, char **argv) /* obtain own elf file from rom service */ try { - static Rom_connection rom("test-rmfault"); + static Rom_connection rom("test-rm_fault"); main_parent(rom.dataspace()); } catch (Genode::Rom_connection::Rom_connection_failed) { main_child(); diff --git a/repos/base/src/test/rm_fault/target.mk b/repos/base/src/test/rm_fault/target.mk index 9abb1b219d..fc332ed91c 100644 --- a/repos/base/src/test/rm_fault/target.mk +++ b/repos/base/src/test/rm_fault/target.mk @@ -1,3 +1,3 @@ -TARGET = test-rmfault +TARGET = test-rm_fault SRC_CC = main.cc LIBS = base diff --git a/repos/base/src/test/rm_nested/target.mk b/repos/base/src/test/rm_nested/target.mk index 4e385cc5c0..4d5f2a156a 100644 --- a/repos/base/src/test/rm_nested/target.mk +++ b/repos/base/src/test/rm_nested/target.mk @@ -1,4 +1,4 @@ -TARGET = test-rmnested +TARGET = test-rm_nested REQUIRES = experimental SRC_CC = main.cc LIBS = base diff --git a/repos/dde_linux/run/usb_storage.run b/repos/dde_linux/run/usb_storage.run index 0b838d5e09..41a3454443 100644 --- a/repos/dde_linux/run/usb_storage.run +++ b/repos/dde_linux/run/usb_storage.run @@ -142,7 +142,7 @@ append qemu_args { \ -device usb-storage,bus=ehci.0,drive=disk \ -boot order=d } -run_genode_until {.*child exited with exit value 0.*} 100 +run_genode_until {.*child "test-usb" exited with exit value 0.*} 100 puts "\nTest succeeded\n" diff --git a/repos/dde_rump/run/rump_cgd_ext2.run b/repos/dde_rump/run/rump_cgd_ext2.run index 071bad8b06..a2ddb024d7 100644 --- a/repos/dde_rump/run/rump_cgd_ext2.run +++ b/repos/dde_rump/run/rump_cgd_ext2.run @@ -128,7 +128,7 @@ build_boot_image $boot_modules append qemu_args " -m 256 -nographic" -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60 exec rm -f bin/$disk_image puts "\nTest succeeded\n" diff --git a/repos/dde_rump/run/rump_ext2.run b/repos/dde_rump/run/rump_ext2.run index 4baf9de6ef..74134aae80 100644 --- a/repos/dde_rump/run/rump_ext2.run +++ b/repos/dde_rump/run/rump_ext2.run @@ -90,7 +90,7 @@ build_boot_image $boot_modules append qemu_args " -m 256 -nographic" -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60 exec rm -f bin/ext2.raw puts "\nTest succeeded\n" diff --git a/repos/dde_rump/run/rump_fat.run b/repos/dde_rump/run/rump_fat.run index 31b56dbc86..5e53a1a0a4 100644 --- a/repos/dde_rump/run/rump_fat.run +++ b/repos/dde_rump/run/rump_fat.run @@ -90,7 +90,7 @@ build_boot_image $boot_modules append qemu_args " -m 256 -nographic" -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60 exec rm -f bin/fs.raw puts "\nTest succeeded\n" diff --git a/repos/dde_rump/run/rump_iso.run b/repos/dde_rump/run/rump_iso.run index fd401cc1f3..59029fef2c 100644 --- a/repos/dde_rump/run/rump_iso.run +++ b/repos/dde_rump/run/rump_iso.run @@ -96,7 +96,7 @@ build_boot_image $boot_modules append qemu_args "-nographic -m 64" -run_genode_until "child exited with exit value 0.*\n" 60 +run_genode_until {child "test-iso" exited with exit value 0.*\n} 60 # pay only attention to the output of init and its children grep_output {^\[init -> test-iso} diff --git a/repos/libports/run/expat.run b/repos/libports/run/expat.run index 646b2756c7..7908057d96 100644 --- a/repos/libports/run/expat.run +++ b/repos/libports/run/expat.run @@ -33,10 +33,10 @@ install_config { - - - - + + + + @@ -70,18 +70,16 @@ build_boot_image { append qemu_args " -nographic -m 64" -run_genode_until {.*child exited with exit value 0.*} 5 +run_genode_until {.*child "test-expat" exited with exit value 0.*} 5 grep_output {\[init -> test-expat\] } compare_output_to { - [init -> test-expat] start of element: config - [init -> test-expat] start of element: test_tag - [init -> test-expat] attribute: name='test_attribute', value='test_value' - [init -> test-expat] end of element: test_tag - [init -> test-expat] end of element: config +[init -> test-expat] start of element: config +[init -> test-expat] start of element: test_tag +[init -> test-expat] attribute: name='test_attribute', value='test_value' +[init -> test-expat] end of element: test_tag +[init -> test-expat] end of element: config } -puts "\nTest succeeded\n" - # vi: set ft=tcl : diff --git a/repos/libports/run/libc_block.run b/repos/libports/run/libc_block.run index fac0838258..3fad4fd390 100644 --- a/repos/libports/run/libc_block.run +++ b/repos/libports/run/libc_block.run @@ -163,7 +163,7 @@ append qemu_args " -m 128 -nographic " append_if $use_atapi_drv qemu_args " -hda $disk_image -boot order=d " append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,if=sd,cache=writeback " -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_block" exited with exit value 0.*} 60 exec rm -f $disk_image diff --git a/repos/libports/run/libc_ffat_fs.run b/repos/libports/run/libc_ffat_fs.run index 15a55eb038..d4b26fcd74 100644 --- a/repos/libports/run/libc_ffat_fs.run +++ b/repos/libports/run/libc_ffat_fs.run @@ -155,7 +155,7 @@ append qemu_args " -m 128 -nographic " append_if $use_atapi_drv qemu_args " -hda $disk_image -boot order=d " append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,if=sd,cache=writeback " -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60 exec rm -f $disk_image diff --git a/repos/libports/run/libc_filesystem_test.inc b/repos/libports/run/libc_filesystem_test.inc index 754a001667..6bcbb9bf08 100644 --- a/repos/libports/run/libc_filesystem_test.inc +++ b/repos/libports/run/libc_filesystem_test.inc @@ -215,7 +215,7 @@ append_if $use_atapi_drv qemu_args " -hda $disk_image -boot order=d " append_if $use_ahci qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,if=sd,cache=writeback " -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until ".*child \"test-libc_$filesystem\" exited with exit value 0.*" 60 exec rm -f $disk_image diff --git a/repos/libports/run/libc_fs_tar_fs.run b/repos/libports/run/libc_fs_tar_fs.run index 0057f56fd2..c526cba013 100644 --- a/repos/libports/run/libc_fs_tar_fs.run +++ b/repos/libports/run/libc_fs_tar_fs.run @@ -105,7 +105,7 @@ build_boot_image $boot_modules # append qemu_args " -m 128 -nographic " -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_fs_tar_fs" exited with exit value 0.*} 60 #exec rm -rf bin/libc_fs_tar_fs #exec rm -rf bin/libc_fs_tar_fs.tar diff --git a/repos/libports/run/libc_vfs.run b/repos/libports/run/libc_vfs.run index 9423090635..d564d9e54f 100644 --- a/repos/libports/run/libc_vfs.run +++ b/repos/libports/run/libc_vfs.run @@ -68,7 +68,7 @@ build_boot_image { # append qemu_args " -m 128 -nographic " -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60 puts "\nTest succeeded\n" diff --git a/repos/libports/run/python.run b/repos/libports/run/python.run index f42ce4c01c..38c504820c 100644 --- a/repos/libports/run/python.run +++ b/repos/libports/run/python.run @@ -85,7 +85,7 @@ build_boot_image $boot_modules append qemu_args " -m 128 -nographic " -run_genode_until {.*child exited with exit value 0.*} 60 +run_genode_until {.*child "test-python" exited with exit value 0.*} 60 grep_output {test-python\] } compare_output_to { diff --git a/repos/os/run/ldso.run b/repos/os/run/ldso.run index 574086a1f8..6e4bdc1bc5 100644 --- a/repos/os/run/ldso.run +++ b/repos/os/run/ldso.run @@ -31,7 +31,7 @@ build_boot_image "core init test-ldso test-ldso_lib_1.lib.so test-ldso_lib_2.lib append qemu_args "-nographic -m 64" -run_genode_until "child exited with exit value 123.*\n" 10 +run_genode_until {child ".*" exited with exit value 123.*\n} 10 # pay only attention to the output of init and its children grep_output {^\[init } diff --git a/repos/os/run/ram_fs_chunk.run b/repos/os/run/ram_fs_chunk.run index c76bc7a8db..000fab0210 100644 --- a/repos/os/run/ram_fs_chunk.run +++ b/repos/os/run/ram_fs_chunk.run @@ -27,7 +27,7 @@ build_boot_image "core init test-ram_fs_chunk" append qemu_args "-nographic -m 64" -run_genode_until "child exited with exit value 0.*\n" 10 +run_genode_until {child "test-ram_fs_chunk" exited with exit value 0.*\n} 10 grep_output {^\[init -> test-ram_fs_chunk\]} unify_output { sizeof=[0-9]+} {} diff --git a/repos/os/run/report_rom.run b/repos/os/run/report_rom.run index 412beb5919..4aeae05989 100644 --- a/repos/os/run/report_rom.run +++ b/repos/os/run/report_rom.run @@ -46,7 +46,7 @@ build_boot_image "core init timer report_rom test-report_rom" append qemu_args "-nographic -m 128" -run_genode_until {child exited with exit value 0.*\n} 30 +run_genode_until {child "test-report_rom" exited with exit value 0.*\n} 30 grep_output {^\[init -> test-report_rom} diff --git a/repos/os/run/resource_request.run b/repos/os/run/resource_request.run index 5efd3d2c79..e6f60c4ec0 100644 --- a/repos/os/run/resource_request.run +++ b/repos/os/run/resource_request.run @@ -35,6 +35,6 @@ build_boot_image "core init timer test-resource_request" append qemu_args "-nographic -m 128" -run_genode_until {child exited with exit value 0.*\n} 30 +run_genode_until {child "test-resource_request" exited with exit value 0.*\n} 30 puts "Test succeeded" diff --git a/repos/os/run/signal.run b/repos/os/run/signal.run index 9c2114b625..f36aa275fe 100644 --- a/repos/os/run/signal.run +++ b/repos/os/run/signal.run @@ -34,6 +34,6 @@ build_boot_image "core init timer test-signal" append qemu_args "-nographic -m 64" -run_genode_until {child exited with exit value 0.*} 200 +run_genode_until {child "test-signal" exited with exit value 0.*} 200 puts "Test succeeded" diff --git a/repos/os/run/synced_interface.run b/repos/os/run/synced_interface.run index 1da54b32e9..b90f3208f5 100644 --- a/repos/os/run/synced_interface.run +++ b/repos/os/run/synced_interface.run @@ -27,14 +27,14 @@ build_boot_image "core init test-synced_interface" append qemu_args "-nographic -m 64" -run_genode_until {child exited with exit value 0} 10 +run_genode_until {child "test-synced_interface" exited with exit value 0} 10 grep_output {-> test-synced_interface} compare_output_to { -[init -> test-synced_interface] lock -[init -> test-synced_interface] adding 13 + 14 -[init -> test-synced_interface] unlock -[init -> test-synced_interface] result is 27 +[init -> test-synced_interface] lock +[init -> test-synced_interface] adding 13 + 14 +[init -> test-synced_interface] unlock +[init -> test-synced_interface] result is 27 } diff --git a/repos/os/run/thread_join.run b/repos/os/run/thread_join.run index 9d6836b708..992eb4235e 100644 --- a/repos/os/run/thread_join.run +++ b/repos/os/run/thread_join.run @@ -34,6 +34,6 @@ build_boot_image "core init timer test-thread_join" append qemu_args "-nographic -m 64" -run_genode_until {child exited with exit value 0.*\n} 10 +run_genode_until {child "test-thread_join" exited with exit value 0.*\n} 10 puts "Test succeeded" diff --git a/repos/os/run/volatile_object.run b/repos/os/run/volatile_object.run index c5e06aa712..efa4ed83ac 100644 --- a/repos/os/run/volatile_object.run +++ b/repos/os/run/volatile_object.run @@ -27,7 +27,7 @@ build_boot_image "core init test-volatile_object" append qemu_args "-nographic -m 64" -run_genode_until {child exited with exit value 0.*\n} 10 +run_genode_until {child "test-volatile_object" exited with exit value 0.*\n} 10 grep_output {-> test-volatile_object}