Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932212Ab3DYLFd (ORCPT ); Thu, 25 Apr 2013 07:05:33 -0400 Received: from mail-bk0-f48.google.com ([209.85.214.48]:38075 "EHLO mail-bk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932130Ab3DYLFb (ORCPT ); Thu, 25 Apr 2013 07:05:31 -0400 From: Alexandru Copot To: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org, akpm@linux-foundation.org, davem@davemloft.net, willemb@google.com, dborkman@redhat.com, ebiederm@xmission.com, gorcunov@openvz.org, palewis@adobe.com, edumazet@google.com, Alexandru Copot , Daniel Baluta Subject: [PATCH 0/3 RFC v2] selftests: Basic framework for tests Date: Thu, 25 Apr 2013 14:04:57 +0300 Message-Id: <1366887900-24769-1-git-send-email-alex.mihai.c@gmail.com> X-Mailer: git-send-email 1.8.2.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1832 Lines: 44 This series adds a generic test abstraction that can make writing testcases easier. A generic_test structure is used to define a test and its methods: prepare, run, cleanup. This is a generic implementation so it was placed in selftests/lib. The second patch updates the socket tests to use the new framework and the third patch creates new tests for [set/get]sockopt with some IPV6_* options. Signed-of-by Alexandru Copot Cc: Daniel Baluta Changes since v1: - moved the implementation to selftests/lib - use goto instead of directly returning Alexandru Copot (3): selftests: introduce testing abstractions selftests/net: update socket test to use new testing framework selftests/net: add socket options test with IPv6 testcases tools/testing/selftests/Makefile | 3 +- tools/testing/selftests/lib/Makefile | 14 ++ tools/testing/selftests/lib/selftests.c | 57 +++++++++ tools/testing/selftests/lib/selftests.h | 67 ++++++++++ tools/testing/selftests/net/Makefile | 17 ++- tools/testing/selftests/net/run_netsocktests | 10 ++ tools/testing/selftests/net/socket.c | 108 +++++++++++----- tools/testing/selftests/net/sockopt.c | 185 +++++++++++++++++++++++++++ 8 files changed, 425 insertions(+), 36 deletions(-) create mode 100644 tools/testing/selftests/lib/Makefile create mode 100644 tools/testing/selftests/lib/selftests.c create mode 100644 tools/testing/selftests/lib/selftests.h create mode 100644 tools/testing/selftests/net/sockopt.c -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/