From owner-svn-src-head@freebsd.org Thu Jun 8 06:13:54 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 DA821BF759A; Thu, 8 Jun 2017 06:13:54 +0000 (UTC) (envelope-from glebius@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 2463175EC6; Thu, 8 Jun 2017 06:13:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v586DrfQ020070; Thu, 8 Jun 2017 06:13:53 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v586Dr50020069; Thu, 8 Jun 2017 06:13:53 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201706080613.v586Dr50020069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 8 Jun 2017 06:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319684 - head/tools/regression/sockets/accf_data_attach 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: Thu, 08 Jun 2017 06:13:55 -0000 Author: glebius Date: Thu Jun 8 06:13:53 2017 New Revision: 319684 URL: https://svnweb.freebsd.org/changeset/base/319684 Log: Make the test to leave one connection on the incomplete queue before exiting. This examines some race conditions in kernel. Modified: head/tools/regression/sockets/accf_data_attach/accf_data_attach.c Modified: head/tools/regression/sockets/accf_data_attach/accf_data_attach.c ============================================================================== --- head/tools/regression/sockets/accf_data_attach/accf_data_attach.c Thu Jun 8 05:12:11 2017 (r319683) +++ head/tools/regression/sockets/accf_data_attach/accf_data_attach.c Thu Jun 8 06:13:53 2017 (r319684) @@ -233,6 +233,20 @@ main(void) errx(-1, "not ok 11 - accept #2 %s", strerror(errno)); printf("ok 11 - accept\n"); +#if 1 + /* + * XXXGL: this doesn't belong to the test itself, but is known + * to examine rarely examined paths in the kernel. Intentionally + * leave a socket on the incomplete queue, before the program + * exits. + */ + so = socket(PF_INET, SOCK_STREAM, 0); + if (so == -1) + errx(-1, "not ok 12 - socket: %s", strerror(errno)); + if (connect(so, (struct sockaddr *)&sin, sizeof(sin)) < 0) + errx(-1, "not ok 12 - connect %s", strerror(errno)); +#endif + /* * Step 11: Remove accept filter. After removing the accept filter * getsockopt() should fail with EINVAL.