-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSModifier: Add kernel cmdline in EMU API and update extraCommandLine to a list #11080
base: 3.0-dev
Are you sure you want to change the base?
Conversation
@@ -12,10 +12,10 @@ import ( | |||
func TestIsoIsValid(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I delete this or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use an empty string for the ExtraCommandLine
item.
@@ -12,10 +12,10 @@ import ( | |||
func TestIsoIsValid(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use an empty string for the ExtraCommandLine
item.
@@ -6,18 +6,6 @@ import ( | |||
"strings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is any of the other code in this file still being used? Can the whole file be deleted?
@@ -215,14 +215,3 @@ func TestOSIsValidOverlayDuplicateWorkDir(t *testing.T) { | |||
err := os.IsValid() | |||
assert.ErrorContains(t, err, "duplicate workDir (/work_root) found in overlay at index 1") | |||
} | |||
|
|||
func TestOSIsValidInvalidKernelCommandLine(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this test be kept by using a empty string item?
@@ -420,7 +423,8 @@ func (b *LiveOSIsoBuilder) updateGrubCfg(isoGrubCfgFileName string, pxeGrubCfgFi | |||
} | |||
|
|||
liveosKernelArgs := fmt.Sprintf(kernelArgsLiveOSTemplate, liveOSDir, liveOSImage) | |||
additionalKernelCommandline := liveosKernelArgs + " " + string(savedConfigs.Iso.KernelCommandLine.ExtraCommandLine) | |||
savedArgs := strings.Join(savedConfigs.Iso.KernelCommandLine.ExtraCommandLine, " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use GrubArgsToString
here.
@@ -165,7 +166,7 @@ func TestCustomizeImageLiveCd1(t *testing.T) { | |||
savedConfigs = &SavedConfigs{} | |||
err = imagecustomizerapi.UnmarshalYamlFile(savedConfigsFilePath, savedConfigs) | |||
assert.NoErrorf(t, err, "read (%s) file", savedConfigsFilePath) | |||
assert.Equal(t, "rd.info rd.debug", string(savedConfigs.Iso.KernelCommandLine.ExtraCommandLine)) | |||
assert.Equal(t, "rd.info rd.debug", strings.Join(savedConfigs.Iso.KernelCommandLine.ExtraCommandLine, " ")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.Equal
can compare lists.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
Summary
What does the PR accomplish, why was it needed?
Add kernel cmdline in EMU API
related PR that updates trident: https://dev.azure.com/mariner-org/ECF/_git/trident/pullrequest/20937
Change Log
Does this affect the toolchain?
NO
Test Methodology