From patchwork Mon Apr 16 11:17:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 898567 X-Patchwork-Delegate: chrubis@suse.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="YQYtstvP"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40PlwK4lFqz9s1l for ; Mon, 16 Apr 2018 21:07:42 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id EA88C3E6D86 for ; Mon, 16 Apr 2018 13:07:35 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id 5D9B53E6D27 for ; Mon, 16 Apr 2018 13:07:33 +0200 (CEST) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id E5B9E200D01 for ; Mon, 16 Apr 2018 13:07:32 +0200 (CEST) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3GB6g5U102307 for ; Mon, 16 Apr 2018 11:07:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=VTH/EN2NeARVqx775dkyGxuwcwqur98t0Dq/8U3WE1A=; b=YQYtstvPilVeEiSqmiG6TTkL9AHDos7+2RWWwRBdFvLfEzsSvNtmvYaC3lB+JtX5qqng B/u0Z+RTrKbOD/RTcvSrkglD7nTVJU1mzUPhMeB2Jaj7WMv0smHxfKV5SOfL+nNS9hlc z8zMrPaMGFu0wlP1778Agk9VsxjYV2wHrYERp7LjndOvo0HN76ZwCG/j18fvD4ev2eSK XWyAr5NyBuA7aHX6S645G8raAzUNj298VZMxyLC7+4DYlFq2JzH6pmyTYPgaGt42ErDt 7zDT1iwXsjuT7mGbGxlzFaDzyZFjK/1jsm71iOsGvULqT1zXbqeHldEsm4G8QkaCjhVe NQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2hbam5vh9n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 16 Apr 2018 11:07:30 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3GB7TMd010507 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 16 Apr 2018 11:07:29 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3GB7TTT008172 for ; Mon, 16 Apr 2018 11:07:29 GMT Received: from ak.ru.oracle.com (/10.162.80.29) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Apr 2018 04:07:29 -0700 From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 16 Apr 2018 14:17:10 +0300 Message-Id: <1523877430-15821-1-git-send-email-alexey.kodanev@oracle.com> X-Mailer: git-send-email 1.7.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8864 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=549 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804160105 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH] lib/tst_test.sh: add TST_MIN_KVER variable check X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Add the same behavior as in LTP C library with 'min_kver'. Signed-off-by: Alexey Kodanev --- testcases/lib/tst_test.sh | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index b7aa4a7..4ac09ef 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -251,7 +251,7 @@ tst_run() if [ -n "$TST_TEST_PATH" ]; then for tst_i in $(grep TST_ "$TST_TEST_PATH" | sed 's/.*TST_//; s/[="} \t\/:`].*//'); do case "$tst_i" in - SETUP|CLEANUP|TESTFUNC|ID|CNT);; + SETUP|CLEANUP|TESTFUNC|ID|CNT|MIN_KVER);; OPTS|USAGE|PARSE_ARGS|POS_ARGS);; NEEDS_ROOT|NEEDS_TMPDIR|NEEDS_DEVICE|DEVICE);; NEEDS_CMDS|NEEDS_MODULE|MODPATH|DATAROOT);; @@ -290,6 +290,11 @@ tst_run() tst_check_cmds $TST_NEEDS_CMDS + if [ -n "$TST_MIN_KVER" ]; then + tst_kvcmp -lt "$TST_MIN_KVER" && \ + tst_brk TCONF "test requires kernel $TST_MIN_KVER+" + fi + if [ "$TST_NEEDS_TMPDIR" = 1 ]; then if [ -z "$TMPDIR" ]; then export TMPDIR="/tmp"