diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-23 00:54:39 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-23 01:07:27 +0100 |
commit | 6d8356d2084e0cc41ccc70db80e364bce10f0280 (patch) | |
tree | bb03f7eeb5a3382087a890e04dcb31c6b893c477 /test/unit | |
parent | 1dee4b4ffcbc4324316718edbe464bbeb98a17db (diff) | |
download | lvm2-6d8356d2084e0cc41ccc70db80e364bce10f0280.tar.gz |
tests: fix unit test
Use more universal /usr/bin/env bash
(as older systems do only have /bin/sh)
Uncommment disabled event_activation testing.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/activation-generator_t.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/activation-generator_t.c b/test/unit/activation-generator_t.c index 6aa115c1c..8157c0c1e 100644 --- a/test/unit/activation-generator_t.c +++ b/test/unit/activation-generator_t.c @@ -137,9 +137,9 @@ static void _test_parse_line(void *fixture) if (!r) test_fail("_parse_line('%s') failed", t->input); - //if (cfg.event_activation != t->event_activation) - // test_fail("_parse_line('%s') -> event_activation='%s'", - // t->input, _bool(cfg.event_activation)); + if (cfg.event_activation != t->event_activation) + test_fail("_parse_line('%s') -> event_activation='%s'", + t->input, _bool(cfg.event_activation)); if (cfg.sysinit_needed != t->sysinit_needed) test_fail("_parse_line('%s') -> sysinit_needed='%s'", @@ -180,7 +180,7 @@ static const char *_fake_lvmconfig(const char *output) if (!fp) return NULL; - fprintf(fp, "#!/usr/bin/sh\n"); + fprintf(fp, "#!/usr/bin/env bash\n"); fprintf(fp, "cat <<EOF\n"); fprintf(fp, "%s", output); fprintf(fp, "EOF\n"); @@ -221,9 +221,9 @@ static void _test_get_config(void *fixture) if (!r) test_fail("_get_config() <- '%s' failed", t->output); - //if (t->event_activation != cfg.event_activation) - // test_fail("_get_config() <- '%s', event_activation = %s", - // t->output, _bool(cfg.event_activation)); + if (t->event_activation != cfg.event_activation) + test_fail("_get_config() <- '%s', event_activation = %s", + t->output, _bool(cfg.event_activation)); if (t->sysinit_needed != cfg.sysinit_needed) test_fail("_get_config() <- '%s', sysinit = %s", |