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 Sep 28, 2024
1 parent 5f38440 commit 46b281f
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 76 deletions.
2 changes: 1 addition & 1 deletion cmd/core/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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ require (
github.com/sirupsen/logrus v1.9.3
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3
github.com/stretchr/testify v1.8.4
github.com/tidwall/pretty v1.2.1
github.com/ulikunitz/xz v0.5.11
github.com/xaionaro-facebook/go-dmidecode v0.0.0-20220413144237-c42d5bef2498
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/exp v0.0.0-20230626212559-97b1e661b5df
golang.org/x/term v0.15.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
Expand Down Expand Up @@ -893,6 +891,8 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
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 46b281f

Please sign in to comment.