Skip to content

Commit 474bfed

Browse files
committed
Reduce snapshot compression test races
1 parent 042d0c3 commit 474bfed

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

lib/forkvm/copy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ func CopyGuestDirectory(srcDir, dstDir string) error {
4242
if d.IsDir() && shouldSkipDirectory(relPath) {
4343
return filepath.SkipDir
4444
}
45+
if shouldSkipRegularFile(relPath) {
46+
return nil
47+
}
4548

4649
dstPath := filepath.Join(dstDir, relPath)
4750
info, err := d.Info()
@@ -58,9 +61,6 @@ func CopyGuestDirectory(srcDir, dstDir string) error {
5861
return nil
5962

6063
case mode.IsRegular():
61-
if shouldSkipRegularFile(relPath) {
62-
return nil
63-
}
6464
if err := copyRegularFileSparse(path, dstPath, mode.Perm()); err != nil {
6565
return fmt.Errorf("copy file %s: %w", path, err)
6666
}

lib/instances/compression_integration_linux_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ type compressionIntegrationHarness struct {
3333
}
3434

3535
func TestCloudHypervisorStandbyRestoreCompressionScenarios(t *testing.T) {
36-
t.Parallel()
37-
3836
runStandbyRestoreCompressionScenarios(t, compressionIntegrationHarness{
3937
name: "cloud-hypervisor",
4038
hypervisor: hypervisor.TypeCloudHypervisor,
@@ -50,8 +48,6 @@ func TestCloudHypervisorStandbyRestoreCompressionScenarios(t *testing.T) {
5048
}
5149

5250
func TestFirecrackerStandbyRestoreCompressionScenarios(t *testing.T) {
53-
t.Parallel()
54-
5551
runStandbyRestoreCompressionScenarios(t, compressionIntegrationHarness{
5652
name: "firecracker",
5753
hypervisor: hypervisor.TypeFirecracker,
@@ -63,8 +59,6 @@ func TestFirecrackerStandbyRestoreCompressionScenarios(t *testing.T) {
6359
}
6460

6561
func TestQEMUStandbyRestoreCompressionScenarios(t *testing.T) {
66-
t.Parallel()
67-
6862
runStandbyRestoreCompressionScenarios(t, compressionIntegrationHarness{
6963
name: "qemu",
7064
hypervisor: hypervisor.TypeQEMU,

0 commit comments

Comments
 (0)