Skip to contentSkip to conversation

test/vpci: enable by default

PATCH In review Roger Pau Monne 4 participants 5 messages Oct 20, 2022 – Oct 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/vpci: enable by default

CONFIG_HAS_PCI is not defined for the tools build, and as a result the vpci harness would never get build. Fix this by building it unconditionally, there's nothing arch specific in it.

---
While not strictly a bugfix, I think it's worth adding this change to the release in order to always build the vpci test hardness and prevent it from bitrotting.

---
 tools/tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/Makefile +1 -1
index 33e32730c4..d99146d56a 100644
@@ -10,7 +10,7 @@ SUBDIRS-$(CONFIG_X86) += x86_emulator
 endif
 SUBDIRS-y += xenstore
 SUBDIRS-y += depriv
-SUBDIRS-$(CONFIG_HAS_PCI) += vpci
+SUBDIRS-y += vpci
 
 .PHONY: all clean install distclean uninstall
 all clean distclean install uninstall: %: subdirs-%
Signature · 1 line
2.37.3
#1 lore raw

Hi Roger,

Quoted 8 lines

-----Original Message-----
From: Roger Pau Monne <[email protected]>
Subject: [PATCH for-4.17?] test/vpci: enable by default

CONFIG_HAS_PCI is not defined for the tools build, and as a result the vpci harness would never get build. Fix this by building it unconditionally, there's nothing arch specific in it.

Quoted 6 lines

---
While not strictly a bugfix, I think it's worth adding this change to the release in order to always build the vpci test hardness and prevent it from bitrotting.

Good point.

No problem from my side, but I think you need also Anthony's opinion as he is the toolstack maintainer. If he also likes this idea, feel free to add my:

Kind regards,
Henry

Quoted 19 lines
---
 tools/tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/Makefile +1 -2
index 33e32730c4..d99146d56a 100644
@@ -10,7 +10,7 @@ SUBDIRS-$(CONFIG_X86) += x86_emulator
 endif
 SUBDIRS-y += xenstore
 SUBDIRS-y += depriv
-SUBDIRS-$(CONFIG_HAS_PCI) += vpci
+SUBDIRS-y += vpci
 
 .PHONY: all clean install distclean uninstall
 all clean distclean install uninstall: %: subdirs-%
--

2.37.3

#2 lore raw
Quoted 17 lines · Henry Wang

Hi Roger,

Quoted 8 lines

-----Original Message-----
From: Roger Pau Monne <[email protected]>
Subject: [PATCH for-4.17?] test/vpci: enable by default

CONFIG_HAS_PCI is not defined for the tools build, and as a result the vpci harness would never get build. Fix this by building it unconditionally, there's nothing arch specific in it.

Quoted 6 lines

---
While not strictly a bugfix, I think it's worth adding this change to the release in order to always build the vpci test hardness and prevent it from bitrotting.

Quoted 4 lines

Good point.

No problem from my side, but I think you need also Anthony's opinion as he is the toolstack maintainer.

This sounds fine to me, the risk is that the build could fail. But we can easily revert the patch and reapply it at the next development cycle.

Thanks,

Signature · 1 line
Anthony PERARD
#3 lore raw
In reply to Roger Pau Monne
Quoted 19 lines · Roger Pau Monne

CONFIG_HAS_PCI is not defined for the tools build, and as a result the vpci harness would never get build. Fix this by building it unconditionally, there's nothing arch specific in it.

---
While not strictly a bugfix, I think it's worth adding this change to the release in order to always build the vpci test hardness and prevent it from bitrotting.

---
 tools/tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/Makefile +0 -0
index 33e32730c4..d99146d56a 100644

tools/tests/Makefile SUBDIRS-$(CONFIG_X86) += x86_emulator · line 13

Quoted 5 lines
tools/tests/Makefile +1 -1
@@ -10,7 +10,7 @@ SUBDIRS-$(CONFIG_X86) += x86_emulator
 endif
 SUBDIRS-y += xenstore
 SUBDIRS-y += depriv
-SUBDIRS-$(CONFIG_HAS_PCI) += vpci
+SUBDIRS-y += vpci

I'm afraid this is only half the fix.  The other half is:

tools/tests/vpci/Makefile +0 -0
index 5075bc2be28c..336904958f6a 100644
@@ -22,6 +22,8 @@ distclean: clean


 .PHONY: install
 install:
+       $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PROG) $(TARGET) $(DESTDIR)$(LIBEXEC_BIN)
 vpci.c: $(XEN_ROOT)/xen/drivers/vpci/vpci.c
        # Remove includes and add the test harness header

so it can actually get deployed somewhere useful.

~Andrew

#4 lore raw
Quoted 42 lines · Andrew Cooper
Quoted 19 lines · Roger Pau Monne

CONFIG_HAS_PCI is not defined for the tools build, and as a result the vpci harness would never get build. Fix this by building it unconditionally, there's nothing arch specific in it.

---
While not strictly a bugfix, I think it's worth adding this change to the release in order to always build the vpci test hardness and prevent it from bitrotting.

---
 tools/tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/Makefile +0 -0
index 33e32730c4..d99146d56a 100644

tools/tests/Makefile SUBDIRS-$(CONFIG_X86) += x86_emulator · line 13

Quoted 5 lines
tools/tests/Makefile +1 -1
@@ -10,7 +10,7 @@ SUBDIRS-$(CONFIG_X86) += x86_emulator
 endif
 SUBDIRS-y += xenstore
 SUBDIRS-y += depriv
-SUBDIRS-$(CONFIG_HAS_PCI) += vpci
+SUBDIRS-y += vpci

I'm afraid this is only half the fix.  The other half is:

tools/tests/vpci/Makefile +0 -0
index 5075bc2be28c..336904958f6a 100644
@@ -22,6 +22,8 @@ distclean: clean


 .PHONY: install
 install:
+       $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PROG) $(TARGET) $(DESTDIR)$(LIBEXEC_BIN)
 vpci.c: $(XEN_ROOT)/xen/drivers/vpci/vpci.c
        # Remove includes and add the test harness header

Quoted 1 line

so it can actually get deployed somewhere useful.

For now I just wanted to get it to be built by default. It wasn't clear to me we want this installed, as it's a standalone unit test that could be executed as part of the build phase (doesn't require interaction with any hypercalls).

It's also currently built using HOSTCC, so installing on the target would be wrong for cross-builds.

Thanks, Roger.