summaryrefslogtreecommitdiff
path: root/tests/test-admin-deploy-karg.sh
diff options
context:
space:
mode:
authorRobert Fairley <rfairley@redhat.com>2019-08-29 12:14:26 -0400
committerRobert Fairley <rfairley@redhat.com>2019-11-07 23:39:10 -0500
commitaadc4db012ed32455416864c6841e68a8b8ebf58 (patch)
tree7ccc5f09f3df47569df273c94b45a47cd72dbe28 /tests/test-admin-deploy-karg.sh
parent49513ccc1b520220bc89382d751c9a7b9879f2d0 (diff)
downloadostree-aadc4db012ed32455416864c6841e68a8b8ebf58.tar.gz
lib/kernel-args: Store kernel args as key/value entries
Define an `OstreeKernelArgsEntry` structure, which holds both the key and the value. The kargs order array stores entries for each key/value pair, instead of just the keys. The hash table is used to locate entries, by storing entries in a pointer array for each key. The same public interface is preserved, while maintaining ordering information of each key/value pair when appending/replacing/deleting kargs. Fixes: #1859
Diffstat (limited to 'tests/test-admin-deploy-karg.sh')
-rwxr-xr-xtests/test-admin-deploy-karg.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-admin-deploy-karg.sh b/tests/test-admin-deploy-karg.sh
index aade011c..ccf66b0e 100755
--- a/tests/test-admin-deploy-karg.sh
+++ b/tests/test-admin-deploy-karg.sh
@@ -66,4 +66,8 @@ assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'option
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*TESTARG=TESTVALUE'
assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND'
+# Check correct ordering of different-valued args of the same key.
+${CMD_PREFIX} ostree admin deploy --os=testos --karg-append=FOO=TESTORDERED --karg-append=APPENDARG=3RDAPPEND testos:testos/buildmaster/x86_64-runtime
+assert_file_has_content sysroot/boot/loader/entries/ostree-2-testos.conf 'options.*APPENDARG=VALAPPEND .*APPENDARG=2NDAPPEND .*FOO=TESTORDERED .*APPENDARG=3RDAPPEND'
+
echo "ok deploy --karg-append"