tests: refactor fw_cfg_test
commit7a44091d48c1054a859f44a70ef280c7cef4698f
authorLi Qiang <liq3ea@163.com>
Sat, 18 May 2019 19:35:10 +0000 (18 21:35 +0200)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 23 May 2019 12:10:31 +0000 (23 14:10 +0200)
tree3dab78f42b056b7cc65ec6185fa2935a43df8f12
parent10b789b70cb78e7215f4efd2c568bec7b0b826a0
tests: refactor fw_cfg_test

Currently, fw_cfg_test uses one QTestState for every test case.
This will add all command lines for every test case and
this is unnecessary. This patch split the test cases and for
every test case it uses his own QTestState. This patch does following
things:

1. Get rid of the global 'fw_cfg', this need add a uninit function

2. Convert every test case in a separate QTestState

After this patch, we can add fw_cfg test case freely and will not
have effect on other test cases.

Signed-off-by: Li Qiang <liq3ea@163.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190424140643.62457-2-liq3ea@163.com>
[PMD: Removed 'ret' local variable in main()]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
tests/fw_cfg-test.c