From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v2 2/2] x86emul/test: avoid race in link farm rune
Date: Fri, 17 Feb 2017 10:27:11 +0000 [thread overview]
Message-ID: <20170217102711.14525-3-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170217102711.14525-1-wei.liu2@citrix.com>
Several `ln -sf` can race with each other. Provide dedicated targets
for soft-linking directories.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
tools/tests/x86_emulator/Makefile | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 9bf36947c0..6fa0b6c803 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -40,16 +40,17 @@ distclean: clean
.PHONY: install
install:
-x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h:
- [ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate .
+x86_emulate:
+ [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@ .
-asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h:
- [ -L asm ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 asm
+x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h: x86_emulate
+
+asm:
+ [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
HOSTCFLAGS += $(CFLAGS_xeninclude) -I.
-x86.h := asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h
-x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h $(x86.h)
+x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h asm
x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c $(x86_emulate.h)
$(HOSTCC) $(HOSTCFLAGS) -D__XEN_TOOLS__ -c -g -o $@ $<
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-02-17 10:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 10:27 [PATCH v2 0/2] Fuzz/x86emul and x86emul/test fixes Wei Liu
2017-02-17 10:27 ` [PATCH v2 1/2] fuzz/x86emul: avoid race in link farm rune Wei Liu
2017-02-17 10:46 ` Jan Beulich
2017-02-17 11:14 ` Wei Liu
2017-02-17 10:27 ` Wei Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170217102711.14525-3-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).