All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug
@ 2018-08-20 18:42 Christopher Clark
  2018-08-21  1:15 ` Doug Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Christopher Clark @ 2018-08-20 18:42 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, ian.jackson, jbeulich, andrew.cooper3

Fixing top-level "make uninstall":

tools/tests/x86_emulator is missing an uninstall target, which causes
failure. Trivial to add one since it installs nothing, so do that.

Linux hotplug uninstall returns success but doesn't actually remove what
it installed. The Makefile variables are obfuscating incorrect logic, so
strip them out and match existing code for xen-watchdog which does work.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
---

These defects were found while reviewing Doug Goldstein's patch to remove
tboot, which touches 'uninstall' in the top level Makefile.

 tools/hotplug/Linux/Makefile      | 35 ++++++++++++-----------------------
 tools/tests/x86_emulator/Makefile |  3 +++
 2 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index d4c3cdc..3b51fe4 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -1,16 +1,6 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-# Init scripts.
-XENDOMAINS_INITD = init.d/xendomains
-XENDOMAINS_LIBEXEC = xendomains
-XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
-
-XENCOMMONS_INITD = init.d/xencommons
-XENCOMMONS_SYSCONFIG = init.d/sysconfig.xencommons
-
-XENDRIVERDOMAIN_INITD = init.d/xendriverdomain
-
 # Xen script dir and scripts to go there.
 XEN_SCRIPTS = vif-bridge
 XEN_SCRIPTS += vif-route
@@ -56,24 +46,23 @@ install-initd:
 	[ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
 	[ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR)
 	[ -d $(DESTDIR)$(LIBEXEC_BIN) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-	$(INSTALL_PROG) $(XENDOMAINS_LIBEXEC) $(DESTDIR)$(LIBEXEC_BIN)
-	$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(INITD_DIR)
-	$(INSTALL_DATA) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(SYSCONFIG_DIR)/xendomains
-	$(INSTALL_PROG) $(XENCOMMONS_INITD) $(DESTDIR)$(INITD_DIR)
-	$(INSTALL_DATA) $(XENCOMMONS_SYSCONFIG) $(DESTDIR)$(SYSCONFIG_DIR)/xencommons
-	$(INSTALL_PROG) $(XENDRIVERDOMAIN_INITD) $(DESTDIR)$(INITD_DIR)
+	$(INSTALL_DATA) init.d/sysconfig.xendomains $(DESTDIR)$(SYSCONFIG_DIR)/xendomains
+	$(INSTALL_DATA) init.d/sysconfig.xencommons $(DESTDIR)$(SYSCONFIG_DIR)/xencommons
+	$(INSTALL_PROG) xendomains $(DESTDIR)$(LIBEXEC_BIN)
+	$(INSTALL_PROG) init.d/xendomains $(DESTDIR)$(INITD_DIR)
+	$(INSTALL_PROG) init.d/xencommons $(DESTDIR)$(INITD_DIR)
+	$(INSTALL_PROG) init.d/xendriverdomain $(DESTDIR)$(INITD_DIR)
 	$(INSTALL_PROG) init.d/xen-watchdog $(DESTDIR)$(INITD_DIR)
 
 .PHONY: uninstall-initd
 uninstall-initd:
 	rm -f $(DESTDIR)$(INITD_DIR)/xen-watchdog
-	rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENDRIVERDOMAIN_INITD))
-	rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENDRIVERDOMAIN_INITD))
-	rm -f $(addprefix $(DESTDIR)$(SYSCONFIG_DIR)/xencommons/, $(XENCOMMONS_SYSCONFIG))
-	rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENCOMMONS_INITD))
-	rm -f $(addprefix $(DESTDIR)$(SYSCONFIG_DIR)/xendomains/, $(XENDOMAINS_SYSCONFIG))
-	rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XENDOMAINS_INITD))
-	rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(XENDOMAINS_LIBEXEC))
+	rm -f $(DESTDIR)$(INITD_DIR)/xendriverdomain
+	rm -f $(DESTDIR)$(INITD_DIR)/xencommons
+	rm -f $(DESTDIR)$(INITD_DIR)/xendomains
+	rm -f $(DESTDIR)$(LIBEXEC_BIN)/xendomains
+	rm -f $(DESTDIR)$(SYSCONFIG_DIR)/xencommons
+	rm -f $(DESTDIR)$(SYSCONFIG_DIR)/xendomains
 
 .PHONY: install-scripts
 install-scripts:
diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index dec81c3..3654e61 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -126,6 +126,9 @@ distclean: clean
 .PHONY: install
 install:
 
+.PHONY: uninstall
+uninstall:
+
 x86_emulate:
 	[ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@
 
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug
  2018-08-20 18:42 [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug Christopher Clark
@ 2018-08-21  1:15 ` Doug Goldstein
  2018-08-21  7:17 ` Wei Liu
  2018-08-21  7:36 ` Jan Beulich
  2 siblings, 0 replies; 5+ messages in thread
From: Doug Goldstein @ 2018-08-21  1:15 UTC (permalink / raw)
  To: Christopher Clark
  Cc: xen-devel, wei.liu2, ian.jackson, jbeulich, andrew.cooper3

On Mon, Aug 20, 2018 at 11:42:30AM -0700, Christopher Clark wrote:
> Fixing top-level "make uninstall":
> 
> tools/tests/x86_emulator is missing an uninstall target, which causes
> failure. Trivial to add one since it installs nothing, so do that.
> 
> Linux hotplug uninstall returns success but doesn't actually remove what
> it installed. The Makefile variables are obfuscating incorrect logic, so
> strip them out and match existing code for xen-watchdog which does work.
> 
> Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>

Reviewed-by: Doug Goldstein <cardoe@cardoe.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug
  2018-08-20 18:42 [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug Christopher Clark
  2018-08-21  1:15 ` Doug Goldstein
@ 2018-08-21  7:17 ` Wei Liu
  2018-08-21  7:36 ` Jan Beulich
  2 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2018-08-21  7:17 UTC (permalink / raw)
  To: Christopher Clark
  Cc: xen-devel, ian.jackson, wei.liu2, jbeulich, andrew.cooper3

On Mon, Aug 20, 2018 at 11:42:30AM -0700, Christopher Clark wrote:
> Fixing top-level "make uninstall":
> 
> tools/tests/x86_emulator is missing an uninstall target, which causes
> failure. Trivial to add one since it installs nothing, so do that.
> 
> Linux hotplug uninstall returns success but doesn't actually remove what
> it installed. The Makefile variables are obfuscating incorrect logic, so
> strip them out and match existing code for xen-watchdog which does work.
> 
> Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

Thanks for the patch. The uninstall target is not very well tested and
prone to bit rot.  Not sure what the best strategy for testing it
though.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug
  2018-08-20 18:42 [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug Christopher Clark
  2018-08-21  1:15 ` Doug Goldstein
  2018-08-21  7:17 ` Wei Liu
@ 2018-08-21  7:36 ` Jan Beulich
  2018-08-21  8:04   ` Wei Liu
  2 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2018-08-21  7:36 UTC (permalink / raw)
  To: Christopher Clark; +Cc: Andrew Cooper, Wei Liu, Ian Jackson, xen-devel

>>> On 20.08.18 at 20:42, <christopher.w.clark@gmail.com> wrote:
> --- a/tools/tests/x86_emulator/Makefile
> +++ b/tools/tests/x86_emulator/Makefile
> @@ -126,6 +126,9 @@ distclean: clean
>  .PHONY: install
>  install:
>  
> +.PHONY: uninstall
> +uninstall:

To be honest, since we're not expecting these two goals to ever
become non-empty, I'd prefer to combine them as well as their
.PHONY-s. Easy enough to do while committing; with that
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug
  2018-08-21  7:36 ` Jan Beulich
@ 2018-08-21  8:04   ` Wei Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2018-08-21  8:04 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Ian Jackson, Andrew Cooper, Wei Liu, Christopher Clark, xen-devel

On Tue, Aug 21, 2018 at 01:36:54AM -0600, Jan Beulich wrote:
> >>> On 20.08.18 at 20:42, <christopher.w.clark@gmail.com> wrote:
> > --- a/tools/tests/x86_emulator/Makefile
> > +++ b/tools/tests/x86_emulator/Makefile
> > @@ -126,6 +126,9 @@ distclean: clean
> >  .PHONY: install
> >  install:
> >  
> > +.PHONY: uninstall
> > +uninstall:
> 
> To be honest, since we're not expecting these two goals to ever
> become non-empty, I'd prefer to combine them as well as their
> .PHONY-s. Easy enough to do while committing; with that
> Acked-by: Jan Beulich <jbeulich@suse.com>

I made the adjustment and applied this patch.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-21  8:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 18:42 [PATCH] tools: fix uninstall: tests/x86_emulator, Linux hotplug Christopher Clark
2018-08-21  1:15 ` Doug Goldstein
2018-08-21  7:17 ` Wei Liu
2018-08-21  7:36 ` Jan Beulich
2018-08-21  8:04   ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.