Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1433026ybh; Sun, 15 Mar 2020 02:52:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtE0IItEEHahHTaL7pO/meUD9QwZRC13x2TRZtt0z524Zl9niUR1Vc5TYLCR3coP3GwZfg2 X-Received: by 2002:a9d:4b01:: with SMTP id q1mr17518094otf.168.1584265978824; Sun, 15 Mar 2020 02:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584265978; cv=none; d=google.com; s=arc-20160816; b=hug3WWlq4BpX1GV4FMLNITjw9j2GnwHLP9QTYjVZfXxWoHpqDWFDXdecn4PiqklUGa PFtdRPTKl98e+jQYkOzbywPcu8jRmBaB7RuyaZo803j7YOF/fQRHjb0ao5Kf7eTlqTVJ IXMLReTRoIU9vIZjgX5l2H3rdl1kiXQAvO5Vo5kMNut5FLnxIjHdLQbzmlKB7x4zas5z JeAxzOEeUqSePhLd52S5LPaVapIEsM469JagRJ7jB4r0GZ+3/gfCnNxA5dGPcsruOT/q kJtorlnLOQnr3vjvi+nd32MPOIalz5uU1Ecag9V+wGty6AtTVW5DhJjJz8FWFYSd1QBm zS8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=zY92ZDxaAJywVizT5CgbEujEZXO1g8JJ7mJ5khK7etQ=; b=tIlcIcmgRVYSGUb/IPi1ik7mxt9cpQb6kg7kremwhrOw+DzNDTuz/66FePGZHW9Ofu 4Dy0g44V5KG2wHI8Cu/9bmhly8XlA+L7R6I1uUam8SoFxjnqEddYnIbdGhexRUcb0ku5 7fxeeL38S5fgqgIR6V3xpeHdVLJRAkDLW8dE2+Ef2TAvhIafkpI963qI3slnAD5/0pK0 JjlwfVGDCJwH5ZBybmBDyR5vTBe2X/dEMJwpM6TGCKiSNEaIYyTZtpTDPCFWr0vNZhqF +wdjMwKcL+SN4cmCK+tJDloaR1c7UqYHyxSO9tFcIA8SjzgBuoASDT2brhimsrv+jPOT imFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si7336432oic.183.2020.03.15.02.52.47; Sun, 15 Mar 2020 02:52:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728225AbgCOJwU (ORCPT + 99 others); Sun, 15 Mar 2020 05:52:20 -0400 Received: from mga17.intel.com ([192.55.52.151]:35235 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728108AbgCOJwS (ORCPT ); Sun, 15 Mar 2020 05:52:18 -0400 IronPort-SDR: dIffU8Q2LOE5vcyXK1LVWzC56NaARurmpf4b217Vp3nt8S0U0cjKuOMPfvv/mjZwnEchbEuHKV nm7hGB22a0MQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2020 02:52:18 -0700 IronPort-SDR: bG92V6x9NMRAyU/obRt+rtVwK/dscnZrlXiJ1BPqlcGSGDAPg6yUzQKXE0UvHpwWxBlsQAWWy1 Kj1411CZnb/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,556,1574150400"; d="scan'208";a="416800340" Received: from lxy-clx-4s.sh.intel.com ([10.239.43.160]) by orsmga005.jf.intel.com with ESMTP; 15 Mar 2020 02:52:16 -0700 From: Xiaoyao Li To: Shuah Khan , Paolo Bonzini , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Xiaoyao Li Subject: [PATCH 1/2] kvm: selftests: Fix no directory error when OUTPUT specified Date: Sun, 15 Mar 2020 17:34:24 +0800 Message-Id: <20200315093425.33600-2-xiaoyao.li@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200315093425.33600-1-xiaoyao.li@intel.com> References: <20200315093425.33600-1-xiaoyao.li@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When build kvm selftests to an specified directory with make OUTPUT=~/kvm-selftests it encouters following error: /usr/bin/ld: cannot open output file /home/lxy/kvm-selftests/x86_64/cr4_cpuid_sync_test: No such file or directory collect2: error: ld returned 1 exit status make: *** [../lib.mk:141: /home/lxy/kvm-selftests/x86_64/cr4_cpuid_sync_test] Error 1 Signed-off-by: Xiaoyao Li --- tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index d91c53b726e6..86797e0242d4 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -66,6 +66,7 @@ LDFLAGS += -pthread $(no-pie-option) $(pgste-option) # After inclusion, $(OUTPUT) is defined and # $(TEST_GEN_PROGS) starts with $(OUTPUT)/ include ../lib.mk +x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))) STATIC_LIBS := $(OUTPUT)/libkvm.a LIBKVM_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM)) -- 2.20.1