From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA534C43603 for ; Wed, 18 Dec 2019 18:08:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B129521582 for ; Wed, 18 Dec 2019 18:08:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UaOg8v0Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727434AbfLRSH0 (ORCPT ); Wed, 18 Dec 2019 13:07:26 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:44274 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727368AbfLRSHZ (ORCPT ); Wed, 18 Dec 2019 13:07:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576692444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=nmdGUwTvoHp9zBzsfUh31MNBzW9ZhcHvi1/dZfx3TSc=; b=UaOg8v0QtzadQldEogCOhNqNeoUxnrLvQxx631DrXamp5YXFFsNw5fjx73DiEZd3r2BUdG p2wS29Q20kx6psKB8ykqxNliGkqcL5xEsjkh3Y+YlL36kWSmTWfsjrBbJv9v+ur/F1aBAg bk9kgoDsS/jotUbvPjLxpzhGJNfPpAU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-50-bjYQnByeNymkKKOVYrH73A-1; Wed, 18 Dec 2019 13:07:17 -0500 X-MC-Unique: bjYQnByeNymkKKOVYrH73A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1626E1088381; Wed, 18 Dec 2019 18:07:16 +0000 (UTC) Received: from steredhat.redhat.com (ovpn-117-218.ams2.redhat.com [10.36.117.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1592E5D9E2; Wed, 18 Dec 2019 18:07:08 +0000 (UTC) From: Stefano Garzarella To: davem@davemloft.net Cc: Jorgen Hansen , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Hajnoczi , Dexuan Cui , netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, Stefano Garzarella Subject: [PATCH net-next v3 00/11] VSOCK: add vsock_test test suite Date: Wed, 18 Dec 2019 19:06:57 +0100 Message-Id: <20191218180708.120337-1-sgarzare@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The vsock_diag.ko module already has a test suite but the core AF_VSOCK functionality has no tests. This patch series adds several test cases tha= t exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept= , half-closed connections, simultaneous connections). The v1 of this series was originally sent by Stefan. v3: - Patch 6: * check the byte received in the recv_byte() * use send(2)/recv(2) instead of write(2)/read(2) to test also flags (e.g. MSG_PEEK) - Patch 8: * removed unnecessary control_expectln("CLOSED") [Stefan]. - removed patches 9,10,11 added in the v2 - new Patch 9 add parameters to list and skip tests (e.g. useful for vmci that doesn't support half-closed socket in the host) - new Patch 10 prints a list of options in the help - new Patch 11 tests MSG_PEEK flags of recv(2) v2: https://patchwork.ozlabs.org/cover/1140538/ v1: https://patchwork.ozlabs.org/cover/847998/ Stefan Hajnoczi (7): VSOCK: fix header include in vsock_diag_test VSOCK: add SPDX identifiers to vsock tests VSOCK: extract utility functions from vsock_diag_test.c VSOCK: extract connect/accept functions from vsock_diag_test.c VSOCK: add full barrier between test cases VSOCK: add send_byte()/recv_byte() test utilities VSOCK: add AF_VSOCK test cases Stefano Garzarella (4): vsock_test: wait for the remote to close the connection testing/vsock: add parameters to list and skip tests testing/vsock: print list of options and description vsock_test: add SOCK_STREAM MSG_PEEK test tools/testing/vsock/.gitignore | 1 + tools/testing/vsock/Makefile | 9 +- tools/testing/vsock/README | 3 +- tools/testing/vsock/control.c | 15 +- tools/testing/vsock/control.h | 2 + tools/testing/vsock/timeout.h | 1 + tools/testing/vsock/util.c | 376 +++++++++++++++++++++++++ tools/testing/vsock/util.h | 49 ++++ tools/testing/vsock/vsock_diag_test.c | 202 ++++---------- tools/testing/vsock/vsock_test.c | 379 ++++++++++++++++++++++++++ 10 files changed, 883 insertions(+), 154 deletions(-) create mode 100644 tools/testing/vsock/util.c create mode 100644 tools/testing/vsock/util.h create mode 100644 tools/testing/vsock/vsock_test.c --=20 2.24.1