From acfca301d8115059264755c1e2029cc246cfdaa4 Mon Sep 17 00:00:00 2001 From: Kathryn Baldauf Date: Tue, 7 Sep 2021 15:07:42 -0700 Subject: [PATCH] Update test modules with hcsshim changes Signed-off-by: Kathryn Baldauf --- .../Microsoft/hcsshim/ext4/dmverity/dmverity.go | 3 ++- .../Microsoft/hcsshim/internal/uvm/vpmem_mapped.go | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test/vendor/github.com/Microsoft/hcsshim/ext4/dmverity/dmverity.go b/test/vendor/github.com/Microsoft/hcsshim/ext4/dmverity/dmverity.go index 2fe201bebc..8948421172 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/ext4/dmverity/dmverity.go +++ b/test/vendor/github.com/Microsoft/hcsshim/ext4/dmverity/dmverity.go @@ -16,8 +16,9 @@ import ( const ( blockSize = compactext4.BlockSize + // RecommendedVHDSizeGB is the recommended size in GB for VHDs, which is not a hard limit. + RecommendedVHDSizeGB = 128 * 1024 * 1024 * 1024 ) - var salt = bytes.Repeat([]byte{0}, 32) var ( diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/uvm/vpmem_mapped.go b/test/vendor/github.com/Microsoft/hcsshim/internal/uvm/vpmem_mapped.go index 15e68d6a13..7749531662 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/uvm/vpmem_mapped.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/uvm/vpmem_mapped.go @@ -79,13 +79,11 @@ func newMappedVPMemModifyRequest(ctx context.Context, rType string, deviceNumber if verity, err := readVeritySuperBlock(ctx, md.hostPath); err != nil { log.G(ctx).WithError(err).WithField("hostPath", md.hostPath).Debug("unable to read dm-verity information from VHD") } else { - if verity != nil { - log.G(ctx).WithFields(logrus.Fields{ - "hostPath": md.hostPath, - "rootDigest": verity.RootDigest, - }).Debug("adding multi-mapped VPMem with dm-verity") - guestSettings.VerityInfo = verity - } + log.G(ctx).WithFields(logrus.Fields{ + "hostPath": md.hostPath, + "rootDigest": verity.RootDigest, + }).Debug("adding multi-mapped VPMem with dm-verity") + guestSettings.VerityInfo = verity } request := &hcsschema.ModifySettingRequest{