support multiple mic execution at same time
authorDohyung Kim <dohyung2.kim@samsung.com>
Tue, 16 May 2017 06:39:02 +0000 (15:39 +0900)
committeryuhuan.yang <yuhuan.yang@samsung.com>
Fri, 26 Jan 2018 07:31:02 +0000 (15:31 +0800)
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 b583c123c51a667956ca80f0a12f64d11d2505ae..0040fa217c4024a0c348646d1b2131f508497894 100644 (file)
@@ -1022,7 +1022,6 @@ def get_loop_device(losetupcmd, lofile):
         try:
             fcntl.flock(fp, fcntl.LOCK_UN)
             fp.close()
-            os.unlink(DEVICE_LOCKFILE)
         except:
             pass
 
index e5f9bdf455da759268ee85f52cc90382236d5dc5..03c508ac48903f40629142669a0d891d536cb406 100755 (executable)
@@ -948,12 +948,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":