From owner-svn-src-all@FreeBSD.ORG Thu Mar 5 18:30:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2171065679; Thu, 5 Mar 2009 18:30:50 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9820D8FC08; Thu, 5 Mar 2009 18:30:50 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n25IUoBa096056; Thu, 5 Mar 2009 18:30:50 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n25IUoHN096055; Thu, 5 Mar 2009 18:30:50 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200903051830.n25IUoHN096055@svn.freebsd.org> From: Tim Kientzle Date: Thu, 5 Mar 2009 18:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189417 - head/lib/libarchive/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 18:30:51 -0000 Author: kientzle Date: Thu Mar 5 18:30:50 2009 New Revision: 189417 URL: http://svn.freebsd.org/changeset/base/189417 Log: Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, break into the debugger on test setup failures (otherwise, the console window just goes away and you can't see what went wrong). On all platforms, clean up a stray buffer before exiting. Modified: head/lib/libarchive/test/main.c Modified: head/lib/libarchive/test/main.c ============================================================================== --- head/lib/libarchive/test/main.c Thu Mar 5 18:27:16 2009 (r189416) +++ head/lib/libarchive/test/main.c Thu Mar 5 18:30:50 2009 (r189417) @@ -35,6 +35,8 @@ #include #ifdef _WIN32 #include +#include +#include #endif /* @@ -910,10 +912,13 @@ get_refdir(void) strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); } +#if defined(_WIN32) && defined(_DEBUG) /* You should have to add "$(TargetDir)" to * Properties > Configuration Properties > Debugging > Working Directory, * if you are running libarchive_test.exe on Visual Studio. */ + DebugBreak(); +#endif printf("Unable to locate known reference file %s\n", KNOWNREF); printf(" Checked following directories:\n%s\n", tried); exit(1); @@ -1092,6 +1097,7 @@ int main(int argc, char **argv) i = atoi(*argv); if (**argv < '0' || **argv > '9' || i < 0 || i >= limit) { printf("*** INVALID Test %s\n", *argv); + free(refdir_alloc); usage(progname); } else { if (test_run(i, tmpdir))