diff options
author | Geoff Levand <geoff@infradead.org> | 2013-05-18 09:57:07 +0800 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-05-18 09:57:07 +0800 |
commit | 7d20772cc7b4d258ee878b4cb30b313f14502dc7 (patch) | |
tree | ce54ffe159a30ebd887fd015d91434e222664969 /test/parser/parser-test.h | |
parent | 9974f2d82b9450eaccd7661b3bfabb686ab8e161 (diff) | |
download | talos-petitboot-7d20772cc7b4d258ee878b4cb30b313f14502dc7.tar.gz talos-petitboot-7d20772cc7b4d258ee878b4cb30b313f14502dc7.zip |
test/parser: Add check_not_present_resource
Add a new routine check_not_present_resource() to check
that a resource is not present. This is typically used
to check that an initrd entry has not been found.
Also add any needed checks for no initrd to the existing
tests.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r-- | test/parser/parser-test.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h index 5ecfefc..ab37443 100644 --- a/test/parser/parser-test.h +++ b/test/parser/parser-test.h @@ -92,4 +92,12 @@ void __check_unresolved_resource(struct resource *res, #define check_unresolved_resource(res) \ __check_unresolved_resource(res, __FILE__, __LINE__) +/** + * Check that a resource (@res) is not present + */ +void __check_not_present_resource(struct resource *res, + const char *file, int line); +#define check_not_present_resource(res) \ + __check_not_present_resource(res, __FILE__, __LINE__) + #endif /* PARSER_TEST_H */ |