]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: create /var/lock if it does not exist
authorVincent Bernat <vincent@bernat.ch>
Tue, 4 May 2021 14:57:11 +0000 (16:57 +0200)
committerVincent Bernat <vincent@bernat.ch>
Tue, 4 May 2021 14:57:11 +0000 (16:57 +0200)
tests/integration/fixtures/programs.py

index e389c011e249064a4125152e5a01b4957d087a9c..eb085c215d77fe1a83e17d0e2efd318b906cab6f 100644 (file)
@@ -207,6 +207,12 @@ protocols: files
 services: files
 """)
 
+        # Ensure lock directory also exists
+        try:
+            os.makedirs("/var/lock", mode=0o1777)
+        except FileExistsError:
+            pass
+
         # Remove any config
         path = os.path.join(self.config.lldpd.confdir, "lldpd.conf")
         if os.path.isfile(path):