Prechádzať zdrojové kódy

tests: add mutex lock when necessary

Jonathan Boulle 9 rokov pred
rodič
commit
41c24d1684
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      iptables/iptables_test.go

+ 4 - 0
iptables/iptables_test.go

@@ -45,6 +45,10 @@ func mustTestableIptables() []*IPTables {
 			path:    ipt.path,
 			hasWait: false,
 		}
+		iptNoWait.fmu, err = newXtablesFileLock()
+		if err != nil {
+			panic(fmt.Sprintf("NewXtablesFileLock failed: %v", err))
+		}
 		ipts = append(ipts, iptNoWait)
 	}
 	// ensure we check one variant without built-in checking