support multiple mic execution at same time 97/129397/1
authorDohyung Kim <dohyung2.kim@samsung.com>
Tue, 16 May 2017 06:39:02 +0000 (15:39 +0900)
committerDohyung Kim <dohyung2.kim@samsung.com>
Tue, 16 May 2017 08:18:31 +0000 (17:18 +0900)
do not unregister qemu emulator before image creation
keep DEVICE_LOCKFILE to prevent a race condition

Signed-off-by: Dohyung Kim <dohyung2.kim@samsung.com>
Change-Id: I5714194ef6b48f80812b2f8b534d83fc27a663e4

mic/utils/fs_related.py
mic/utils/misc.py

index 54f68da..11ff5af 100644 (file)
@@ -990,7 +990,6 @@ def get_loop_device(losetupcmd, lofile):
         try:
             fcntl.flock(fp, fcntl.LOCK_UN)
             fp.close()
-            os.unlink(DEVICE_LOCKFILE)
         except:
             pass
 
index 738ac66..5a9fac3 100755 (executable)
@@ -934,12 +934,6 @@ def setup_qemu_emulator(rootdir, arch):
         msger.info('Try to disable selinux')
         runner.show(["/usr/sbin/setenforce", "0"])
 
-    # unregister it if it has been registered and is a dynamically-linked executable
-    if os.path.exists(node):
-        qemu_unregister_string = "-1\n"
-        with open(node, "w") as fd:
-            fd.write(qemu_unregister_string)
-
     # register qemu emulator for interpreting other arch executable file
     if not os.path.exists(node):
         if arch == "aarch64":