Skip to content

fix: Preserve kernel argument ordering #487

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Kernel parsing test
Signed-off-by: Dominik De Zordo <[email protected]>
  • Loading branch information
DZDomi committed Mar 16, 2023
commit fdbd6ef771bef13121a2898b97b088a777440dd5
37 changes: 29 additions & 8 deletions kernelargs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,35 @@ func TestKernelArgsSerder(t *testing.T) {
booVal,
)

expectedParsedArgs := kernelArgs(map[string]*string{
"foo": &fooVal,
"doo": &dooVal,
"blah": nil,
"huh": &emptyVal,
"bleh": nil,
"duh": &emptyVal,
"boo": &booVal,
expectedParsedArgs := kernelArgs(map[string]kernelArg{
"foo": {
position: 0,
value: &fooVal,
},
"blah": {
position: 1,
value: nil,
},
"doo": {
position: 2,
value: &dooVal,
},
"huh": {
position: 3,
value: &emptyVal,
},
"bleh": {
position: 4,
value: nil,
},
"duh": {
position: 5,
value: &emptyVal,
},
"boo": {
position: 6,
value: &booVal,
},
})

actualParsedArgs := parseKernelArgs(argsString)
Expand Down