diff --git a/base/run/util_mmio.run b/base/run/util_mmio.run index e1a5953590..c4d569cc46 100644 --- a/base/run/util_mmio.run +++ b/base/run/util_mmio.run @@ -1,5 +1,13 @@ +# +# Build +# + build "core init test/util_mmio" +# +# Boot image +# + create_boot_directory install_config { @@ -16,7 +24,8 @@ install_config { - + + @@ -24,12 +33,20 @@ install_config { build_boot_image "core init test-util_mmio" +# +# Execution +# + append qemu_args "-nographic -m 64" -run_genode_until {.*Test ended.*} 10 +run_genode_until "Test done.*\n" 10 -grep_output {\[init -\> test-util_mmio\]} +# +# Conclusion +# + +grep_output {\[init -\> test\]} compare_output_to { - [init -> test-util_mmio] Test ended successfully + [init -> test] Test done } diff --git a/base/src/test/util_mmio/main.cc b/base/src/test/util_mmio/main.cc index ebb42d013d..4c5a17e083 100644 --- a/base/src/test/util_mmio/main.cc +++ b/base/src/test/util_mmio/main.cc @@ -54,12 +54,6 @@ struct Cpu_state : Register<16> inline static void write(access_t & v) { cpu_state = v; } }; -struct A : public Mmio { - - A(addr_t const base) : Mmio(base) { } - -}; - /** * Exemplary MMIO region type */ @@ -170,10 +164,11 @@ int compare_mem(uint8_t * base1, uint8_t * base2, size_t size) */ int test_failed(unsigned test_id) { - PERR("Test ended, test %i failed", test_id); + printf("Test %i failed\n", test_id); printf(" mmio_mem: 0x "); dump_mem(mmio_mem, sizeof(mmio_mem)); printf("\n cpu_state: 0x%4X\n", cpu_state); + printf("Test done\n"); return -1; } @@ -405,7 +400,7 @@ int main() if (compare_mem(mmio_mem, mmio_cmpr_15, sizeof(mmio_mem))) { return test_failed(15); } - printf("Test ended successfully\n"); + printf("Test done\n"); return 0; }