[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/vpci: install test


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 10 Mar 2023 12:06:29 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vnQ6wnNKTC5NlFeCX1Lrcuqeu1MVLdf72NoJSaFGOl0=; b=DJkq7CoqWJZUNw3hQGtHvHA1w666fk4TwORfPC5GNA5BJmtg6W/eMRBCWxyBPp2BlD+LU1DheBqa+7ngFhneA0HwazplidF1jHg/b4Fc0D+8WKDlg10hLUGanB/srE1N/jU3EL8ri49qh5z5BEehaXUw2DCAWcdb4M7B56ngilw9dmSDoh8tEh+oKHV1ZqjpyiKeBVVvQC5LaA5/qCuVW0zPE/ZMQvKAsfrKXoRHj7W9NlZa2Td6si2ttLp6jju0XGhKTN+NVHJts7Qgi+KKQCZqH28lJknUTDjvGx694+uUg/Yz+tl7NFmb1Tmuux042eHuPPIl/lwefLtVVc7Ptg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gmtxPkEegL8Lk+WHxVnbAOmLJK46xuP4I/crLTb0p89aXeacIf8Eb2jYCy5Bu61IvScNs0rBkk9YvJo6p88TFmqmXL5tLsNSLPY7+gW/szQ5KY1aAkYw6BC1uEAMY5+ErcvrjKc5iLMWDoVwBFTybkwc1CENwZmlgninmKMPfZx97uz5mCXJ2Jl91HECad32EIFUxkd8iQgNlU9SUn1CwyqmuyQlu9d/kblCI+GKi+mnfMxGGf2iX6QT/djnlUblUhyyFkVlnRByH5A8FHTMQCSSiOrC1qe49m+ZEpP0cz0rlKNIOCvtq2ox1qfpok9G6mjrc6+ycXl34e3RkGKpPw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 10 Mar 2023 11:06:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.03.2023 17:58, Roger Pau Monne wrote:
> Introduce an install target, like it's used by other tests.  This
> allows running the test on the installed systems, which is easier than
> running it during the build phase when dealing with automated testing.
> Strictly speaking the vpci test doesn't require to be run on a Xen
> host currently, but that allows easier integration with logic that
> runs the rest of the tests.

I accept that as a possible way of looking at things, but personally I
remain unconvinced of this model. To me what is installed should be of
value to users. If there was a properly separated directory where all
(and only) tests were put, I might agree with installing. (Nevertheless
this isn't an objection, merely a remark.)

> While there also adjust the makefile to use $(RM), and rename the
> resulting binary to use a dash instead of an underscore (again to
> match the rest of the tests).
> 
> Since the resulting test binary is now part of the distribution CC
> must be used instead of HOSTCC.

This breaks the run: goal, doesn't it? If the new mode is wanted, I
think the two kinds of binaries (and rules) need separating (maybe a
way can be found to avoid duplicating the rules, which would seem
desirable).

> --- a/tools/tests/vpci/Makefile
> +++ b/tools/tests/vpci/Makefile
> @@ -1,7 +1,7 @@
>  XEN_ROOT=$(CURDIR)/../../..
>  include $(XEN_ROOT)/tools/Rules.mk
>  
> -TARGET := test_vpci
> +TARGET := test-vpci
>  
>  .PHONY: all
>  all: $(TARGET)
> @@ -11,17 +11,23 @@ run: $(TARGET)
>       ./$(TARGET)
>  
>  $(TARGET): vpci.c vpci.h list.h main.c emul.h
> -     $(HOSTCC) -g -o $@ vpci.c main.c
> +     $(CC) -o $@ vpci.c main.c

You're losing -g and you're also not covering for it by adding $(CFLAGS)
(there should have been use of $(HOSTCFLAGS) already before, I suppose).

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.