Skip to content

Commit

Permalink
BG suite: add multierror output with multiline print
Browse files Browse the repository at this point in the history
This also rewords many error messages to make them consistent:
- capitalize BootGuard, Key Manifest and Boot Policy Manifest
- spell out Key Manifest and Boot Policy Manifest
- uppercase acronyms such as DMA etc

Signed-off-by: Daniel Maslowski <[email protected]>
  • Loading branch information
orangecms committed Jan 30, 2024
1 parent ca601e1 commit 08906b9
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 80 deletions.
2 changes: 1 addition & 1 deletion cmd/bg-suite/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (e *execTestsCmd) Run(ctx *context) error {
ret := false
data, err := os.ReadFile(e.Firmware)
if err != nil {
return fmt.Errorf("can't read firmware file")
return fmt.Errorf("can't read firmware file %v", e.Firmware)
}
preset := test.PreSet{
Firmware: data,
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
github.com/xaionaro-go/bytesextra v0.0.0-20220103144954-846e454ddea9
github.com/xaionaro-go/unhash v0.0.0-20230427202706-0195a574c620
github.com/xaionaro-go/unsafetools v0.0.0-20210722164218-75ba48cf7b3c
go.uber.org/multierr v1.11.0
golang.org/x/crypto v0.17.0
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df
gopkg.in/yaml.v3 v3.0.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
Expand Down
Loading

0 comments on commit 08906b9

Please sign in to comment.