Re: [Xen-devel] [PATCH v4 08/16] livepatch: Move test-cases to their own sub-directory in test.

2016-09-16 Thread Konrad Rzeszutek Wilk
On Fri, Sep 16, 2016 at 12:38:20PM -0400, Konrad Rzeszutek Wilk wrote:
> So they can be shared with ARM64 (but not yet, so they
> are only built on x86).
> 
> No functional change.
> 
> We also need to tweak the MAINTAINERS and .gitignore file.
> 
> Also we need to update SUBDIRS to include the new 'test'
> directory so 'cscope' can show the example livepatches.
> 
> Acked-by: Jan Beulich  [for directory]
> Signed-off-by: Konrad Rzeszutek Wilk 
> 
> ---
> Cc: Stefano Stabellini 
> Cc: Julien Grall 
> Cc: Jan Beulich 
> Cc: Andrew Cooper 
> 
> v1: First submission
> v2: Move to test/livepatch per Jan's recommendation
> v3: Sort MAINTAINERS for livepatch.
> Add Jan's Acked-by.
> Added on the SUBDIRS the 'test' directory
> Change title of patch (common-> own sub-directory)
> ---
>  .gitignore  |  8 +--
>  MAINTAINERS |  1 +
>  xen/Makefile|  5 +-
>  xen/arch/arm/Makefile   |  3 -
>  xen/arch/x86/Makefile   |  5 --
>  xen/arch/x86/test/Makefile  | 85 
> -
>  xen/arch/x86/test/xen_bye_world.c   | 34 
>  xen/arch/x86/test/xen_bye_world_func.c  | 22 
>  xen/arch/x86/test/xen_hello_world.c | 67 ---
>  xen/arch/x86/test/xen_hello_world_func.c| 39 -
>  xen/arch/x86/test/xen_replace_world.c   | 33 ---
>  xen/arch/x86/test/xen_replace_world_func.c  | 22 
>  xen/test/Makefile   |  9 +++
>  xen/test/livepatch/Makefile | 85 
> +
>  xen/test/livepatch/xen_bye_world.c  | 34 
>  xen/test/livepatch/xen_bye_world_func.c | 22 
>  xen/test/livepatch/xen_hello_world.c| 67 +++
>  xen/test/livepatch/xen_hello_world_func.c   | 39 +
>  xen/test/livepatch/xen_replace_world.c  | 33 +++
>  xen/test/livepatch/xen_replace_world_func.c | 22 
>  20 files changed, 319 insertions(+), 316 deletions(-)
>  delete mode 100644 xen/arch/x86/test/Makefile
>  delete mode 100644 xen/arch/x86/test/xen_bye_world.c
>  delete mode 100644 xen/arch/x86/test/xen_bye_world_func.c
>  delete mode 100644 xen/arch/x86/test/xen_hello_world.c
>  delete mode 100644 xen/arch/x86/test/xen_hello_world_func.c
>  delete mode 100644 xen/arch/x86/test/xen_replace_world.c
>  delete mode 100644 xen/arch/x86/test/xen_replace_world_func.c
>  create mode 100644 xen/test/Makefile
>  create mode 100644 xen/test/livepatch/Makefile
>  create mode 100644 xen/test/livepatch/xen_bye_world.c
>  create mode 100644 xen/test/livepatch/xen_bye_world_func.c
>  create mode 100644 xen/test/livepatch/xen_hello_world.c
>  create mode 100644 xen/test/livepatch/xen_hello_world_func.c
>  create mode 100644 xen/test/livepatch/xen_replace_world.c
>  create mode 100644 xen/test/livepatch/xen_replace_world_func.c


ARGH!!!

There has to be some .gitconfig parameter for this.

In the meantime please ignore this patch and instead see this one:


From 50f28785cff34a060ae528dc21493ee41ad55cdd Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk 
Date: Fri, 12 Aug 2016 15:27:58 -0400
Subject: [PATCH v5] livepatch: Move test-cases to their own sub-directory in
 test.

So they can be shared with ARM64 (but not yet, so they
are only built on x86).

No functional change.

We also need to tweak the MAINTAINERS and .gitignore file.

Also we need to update SUBDIRS to include the new 'test'
directory so 'cscope' can show the example livepatches.

Acked-by: Jan Beulich  [for directory]
Signed-off-by: Konrad Rzeszutek Wilk 

---
Cc: Stefano Stabellini 
Cc: Julien Grall 
Cc: Jan Beulich 
Cc: Andrew Cooper 

v1: First submission
v2: Move to test/livepatch per Jan's recommendation
v3: Sort MAINTAINERS for livepatch.
Add Jan's Acked-by.
Added on the SUBDIRS the 'test' directory
Change title of patch (common-> own sub-directory)
---
 .gitignore | 8 
 MAINTAINERS| 1 +
 xen/Makefile   | 5 +++--
 xen/arch/arm/Makefile  | 3 ---
 xen/arch/x86/Makefile  | 5 -
 xen/test/Makefile  | 9 +
 xen/{arch/x86/test => test/livepatch}/Makefile | 0
 xen/{arch/x86/test => test/livepatch}/xen_bye_world.c  | 0
 xen/{arch/x86/test => test/livepatch}/xen_bye_world_func.c | 0
 xen/{arch/x86/test => test/livepatch}/xen_hello_world.c| 0
 xen/{arch/x86/test => test/livepatch}/xen_hello_world_func.c   | 0
 xen/{arch/x86/test => test/livepatch}/xen_replace_world.c  | 0
 xen/{arch/x86/test => test/livepatch}/xen_replace_world_func.c | 0
 13 files changed, 17 insertions(

[Xen-devel] [PATCH v4 08/16] livepatch: Move test-cases to their own sub-directory in test.

2016-09-16 Thread Konrad Rzeszutek Wilk
So they can be shared with ARM64 (but not yet, so they
are only built on x86).

No functional change.

We also need to tweak the MAINTAINERS and .gitignore file.

Also we need to update SUBDIRS to include the new 'test'
directory so 'cscope' can show the example livepatches.

Acked-by: Jan Beulich  [for directory]
Signed-off-by: Konrad Rzeszutek Wilk 

---
Cc: Stefano Stabellini 
Cc: Julien Grall 
Cc: Jan Beulich 
Cc: Andrew Cooper 

v1: First submission
v2: Move to test/livepatch per Jan's recommendation
v3: Sort MAINTAINERS for livepatch.
Add Jan's Acked-by.
Added on the SUBDIRS the 'test' directory
Change title of patch (common-> own sub-directory)
---
 .gitignore  |  8 +--
 MAINTAINERS |  1 +
 xen/Makefile|  5 +-
 xen/arch/arm/Makefile   |  3 -
 xen/arch/x86/Makefile   |  5 --
 xen/arch/x86/test/Makefile  | 85 -
 xen/arch/x86/test/xen_bye_world.c   | 34 
 xen/arch/x86/test/xen_bye_world_func.c  | 22 
 xen/arch/x86/test/xen_hello_world.c | 67 ---
 xen/arch/x86/test/xen_hello_world_func.c| 39 -
 xen/arch/x86/test/xen_replace_world.c   | 33 ---
 xen/arch/x86/test/xen_replace_world_func.c  | 22 
 xen/test/Makefile   |  9 +++
 xen/test/livepatch/Makefile | 85 +
 xen/test/livepatch/xen_bye_world.c  | 34 
 xen/test/livepatch/xen_bye_world_func.c | 22 
 xen/test/livepatch/xen_hello_world.c| 67 +++
 xen/test/livepatch/xen_hello_world_func.c   | 39 +
 xen/test/livepatch/xen_replace_world.c  | 33 +++
 xen/test/livepatch/xen_replace_world_func.c | 22 
 20 files changed, 319 insertions(+), 316 deletions(-)
 delete mode 100644 xen/arch/x86/test/Makefile
 delete mode 100644 xen/arch/x86/test/xen_bye_world.c
 delete mode 100644 xen/arch/x86/test/xen_bye_world_func.c
 delete mode 100644 xen/arch/x86/test/xen_hello_world.c
 delete mode 100644 xen/arch/x86/test/xen_hello_world_func.c
 delete mode 100644 xen/arch/x86/test/xen_replace_world.c
 delete mode 100644 xen/arch/x86/test/xen_replace_world_func.c
 create mode 100644 xen/test/Makefile
 create mode 100644 xen/test/livepatch/Makefile
 create mode 100644 xen/test/livepatch/xen_bye_world.c
 create mode 100644 xen/test/livepatch/xen_bye_world_func.c
 create mode 100644 xen/test/livepatch/xen_hello_world.c
 create mode 100644 xen/test/livepatch/xen_hello_world_func.c
 create mode 100644 xen/test/livepatch/xen_replace_world.c
 create mode 100644 xen/test/livepatch/xen_replace_world_func.c

diff --git a/.gitignore b/.gitignore
index cc64fc9..eeabe0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -254,10 +254,6 @@ xen/arch/x86/efi.lds
 xen/arch/x86/efi/check.efi
 xen/arch/x86/efi/disabled
 xen/arch/x86/efi/mkreloc
-xen/arch/x86/test/config.h
-xen/arch/x86/test/xen_hello_world.livepatch
-xen/arch/x86/test/xen_bye_world.livepatch
-xen/arch/x86/test/xen_replace_world.livepatch
 xen/arch/*/efi/boot.c
 xen/arch/*/efi/compat.c
 xen/arch/*/efi/efi.h
@@ -274,6 +270,10 @@ xen/include/public/public
 xen/include/xen/*.new
 xen/include/xen/acm_policy.h
 xen/include/xen/compile.h
+xen/test/livepatch/config.h
+xen/test/livepatch/xen_bye_world.livepatch
+xen/test/livepatch/xen_hello_world.livepatch
+xen/test/livepatch/xen_replace_world.livepatch
 xen/tools/kconfig/.tmp_gtkcheck
 xen/tools/kconfig/.tmp_qtcheck
 xen/tools/symbols
diff --git a/MAINTAINERS b/MAINTAINERS
index ae0b6bc..edc8603 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -272,6 +272,7 @@ F:  xen/arch/*/livepatch*
 F:  xen/arch/*/*/livepatch*
 F:  xen/common/livepatch*
 F:  xen/include/xen/livepatch*
+F:  xen/test/livepatch/*
 
 MACHINE CHECK (MCA) & RAS
 M: Christoph Egger 
diff --git a/xen/Makefile b/xen/Makefile
index 012509b..e989a20 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -80,7 +80,7 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
 
 .PHONY: _tests
 _tests:
-   $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) tests
+   $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests
 
 .PHONY: _uninstall
 _uninstall: D=$(DESTDIR)
@@ -114,6 +114,7 @@ _clean: delete-unfresh-files
$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
+   $(MAKE) -f $(BASEDIR)/Rules.mk -C test clean
$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) 
SRCARCH=$(SRCARCH) clean
find . \( -name "*.o" -o -name ".*.d" \) -exec rm -f {} \;
rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi 
$(TARGET).efi.map $(TARGET)-syms $(TARGET)-syms.map *~ core
@@ -189,7 +190,7 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: 
arch/$(TARGET_ARCH)/asm-offset