From owner-svn-src-head@freebsd.org Sat May 27 23:19:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE0DDD85E89; Sat, 27 May 2017 23:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B0B81B78; Sat, 27 May 2017 23:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RNJWXK061397; Sat, 27 May 2017 23:19:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RNJWuZ061396; Sat, 27 May 2017 23:19:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705272319.v4RNJWuZ061396@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 27 May 2017 23:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319008 - head/lib/libkvm/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 23:19:33 -0000 Author: ngie Date: Sat May 27 23:19:32 2017 New Revision: 319008 URL: https://svnweb.freebsd.org/changeset/base/319008 Log: kvm_geterr_test: Compile out the portions that require kvm_open2(3) on systems that lack the libcall, based on __FreeBSD_version. kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11, but not ^/stable/10. This makes some of kvm_geterr_test available for testing on ^/stable/10. MFC after: now Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/tests/kvm_geterr_test.c Modified: head/lib/libkvm/tests/kvm_geterr_test.c ============================================================================== --- head/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:04:48 2017 (r319007) +++ head/lib/libkvm/tests/kvm_geterr_test.c Sat May 27 23:19:32 2017 (r319008) @@ -65,6 +65,8 @@ ATF_TC_HEAD(kvm_geterr_positive_test_err atf_tc_set_md_var(tc, "require.user", "root"); } +/* 1100090 was where kvm_open2(3) was introduced. */ +#if __FreeBSD_version >= 1100091 ATF_TC_BODY(kvm_geterr_positive_test_error, tc) { kvm_t *kd; @@ -125,13 +127,16 @@ ATF_TC_BODY(kvm_geterr_positive_test_no_ ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", strerror(errno)); } +#endif ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, kvm_geterr_negative_test_NULL); +#if __FreeBSD_version >= 1100091 ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_error); ATF_TP_ADD_TC(tp, kvm_geterr_positive_test_no_error); +#endif return (atf_no_error()); }