diff options
author | Dan Nicholson <nicholson@endlessm.com> | 2016-05-13 12:53:01 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-06-27 20:20:21 +0000 |
commit | a94530111a31ff3784af293a6cd4da4c3c7bc34c (patch) | |
tree | 31d1017eeab9681ae3f8865eb9813299eabdc025 /tests/test-admin-instutil-set-kargs.sh | |
parent | 99a76c9b34a03cf6fc3727b0ecddad99633dc5b3 (diff) | |
download | ostree-a94530111a31ff3784af293a6cd4da4c3c7bc34c.tar.gz |
tests: Improve check for /proc/cmdline kargs
On some systems there may be no root= argument, so the tests for
appending /proc/cmdline arguments will fail. Instead, loop over each of
the arguments in the host's /proc/cmdline and test that they're in the
constructed config file. That will actually test if ostree added all of
the system's /proc/cmdline args correctly. The regex isn't perfect here,
but it's probably good enough for this test.
Closes: #372
Approved by: cgwalters
Diffstat (limited to 'tests/test-admin-instutil-set-kargs.sh')
-rwxr-xr-x | tests/test-admin-instutil-set-kargs.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test-admin-instutil-set-kargs.sh b/tests/test-admin-instutil-set-kargs.sh index 0af940ff..d2abec2e 100755 --- a/tests/test-admin-instutil-set-kargs.sh +++ b/tests/test-admin-instutil-set-kargs.sh @@ -54,8 +54,7 @@ assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'option echo "ok instutil set-kargs --append" ${CMD_PREFIX} ostree admin instutil set-kargs --import-proc-cmdline -# Here we're asserting that the *host* system has a root= kernel -# argument. I think it's unlikely that anyone doesn't have one, but -# if this is not true for you, please file a bug! -assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'options.*root=.' +for arg in $(cat /proc/cmdline); do + assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf "options.*$arg" +done echo "ok instutil set-kargs --import-proc-cmdline" |