From patchwork Tue Apr 15 08:20:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 28395 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E7862036A for ; Tue, 15 Apr 2014 08:21:15 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf9414395obb.2 for ; Tue, 15 Apr 2014 01:21:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=CF8EqCLw430kL2grn2ONLk97sAxgxfsx0TZZLNUj0bE=; b=i92xDtXOk+3NlzCDeXlE4Rbb2Tqg5XYSGv46Dw8bQ45oBrSYXnhFzJkyLTSIr22V7l aM1TJ8QI5fce/2doNeMRgci2Ah151bceNzMC89XWrIrpZ+ylcyLO6++AraR9gDSZu4MG RV00c88ud1dr55IC/1W7J7NDyN+D3paXC+znYRNQWOvEp0+vPhcmW9p8DwE/6NPNFE23 60XtJR+0Lgh0uaMEDl0vixA8gh1ngqGfwQsVcfsYNEy7fWRr4sveG/LiThDr7WKjVfzm P89ni9T9xPdNMYemgOijeosgx93EAxb0JWwvetIpEaa+D4Ea000/5/f6wniWIRkC8S38 GUzg== X-Gm-Message-State: ALoCoQmAz6MVonC7PygANtKBdKoiMNlpidGfnKrmIyQ/zUu6qMY08gwTwptXP/VBju93YPNR+njW X-Received: by 10.182.153.68 with SMTP id ve4mr167036obb.39.1397550075148; Tue, 15 Apr 2014 01:21:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.99 with SMTP id m90ls30739qgd.12.gmail; Tue, 15 Apr 2014 01:21:15 -0700 (PDT) X-Received: by 10.220.98.143 with SMTP id q15mr198157vcn.38.1397550075075; Tue, 15 Apr 2014 01:21:15 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id vd8si3270475vdc.70.2014.04.15.01.21.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 01:21:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lh14so8608186vcb.6 for ; Tue, 15 Apr 2014 01:21:15 -0700 (PDT) X-Received: by 10.58.230.103 with SMTP id sx7mr209708vec.28.1397550074983; Tue, 15 Apr 2014 01:21:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp212148vcb; Tue, 15 Apr 2014 01:21:14 -0700 (PDT) X-Received: by 10.140.49.109 with SMTP id p100mr451994qga.47.1397550074538; Tue, 15 Apr 2014 01:21:14 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id p17si7883291qgp.195.2014.04.15.01.21.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Apr 2014 01:21:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WZyc4-0005xS-GI; Tue, 15 Apr 2014 08:21:04 +0000 Received: from mail-la0-f44.google.com ([209.85.215.44]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WZybq-0005wj-AD for lng-odp@lists.linaro.org; Tue, 15 Apr 2014 08:20:50 +0000 Received: by mail-la0-f44.google.com with SMTP id c6so6586872lan.17 for ; Tue, 15 Apr 2014 01:20:52 -0700 (PDT) X-Received: by 10.152.42.144 with SMTP id o16mr263776lal.9.1397550052349; Tue, 15 Apr 2014 01:20:52 -0700 (PDT) Received: from localhost ([79.102.145.30]) by mx.google.com with ESMTPSA id q4sm16595035lbl.14.2014.04.15.01.20.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 15 Apr 2014 01:20:51 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Tue, 15 Apr 2014 10:20:46 +0200 Message-Id: <1397550046-24928-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 1.8.3.2 Subject: [lng-odp] [PATCH] test/api_test/odp_atomic: enable testcase 7 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 wasn't able to run testcase 7, said: "Invalid test case [7]" Signed-off-by: Anders Roxell --- Hi, This is a quick and dirty fix... I think we need to rework the test framework for all the tests so they are similar to each other, that will make it easier to add tests. Or should we add a unit test framework so we can run the tests on different HW and check so we have API compatibility between them? This was something Taras touched upon earlier this week right? Cheers, test/api_test/odp_atomic_test.c | 4 +++- test/api_test/odp_atomic_test.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/api_test/odp_atomic_test.c b/test/api_test/odp_atomic_test.c index ea443a0..3f95d3d 100644 --- a/test/api_test/odp_atomic_test.c +++ b/test/api_test/odp_atomic_test.c @@ -17,6 +17,7 @@ static odp_atomic_u64_t a64u; static odp_atomic_int_t numthrds; static const char * const test_name[] = { + "dummy", "test atomic basic ops add/sub/inc/dec", "test atomic inc/dec of signed word", "test atomic add/sub of signed word", @@ -334,10 +335,11 @@ int main(int argc, char *argv[]) thrdarg.testcase = test_type; thrdarg.numthrds = pthrdnum; - if ((test_type > 0) && (test_type < 7)) { + if ((test_type > 0) && (test_type < TEST_MAX)) { printf("%s\n", test_name[test_type]); } else { ODP_ERR("Invalid test case [%d]\n", test_type); + usage(); goto err_exit; } odp_test_thread_create(run_thread, &thrdarg); diff --git a/test/api_test/odp_atomic_test.h b/test/api_test/odp_atomic_test.h index 04dde72..a35817b 100644 --- a/test/api_test/odp_atomic_test.h +++ b/test/api_test/odp_atomic_test.h @@ -29,7 +29,7 @@ #define TEST_ADD_SUB_U32 5 #define TEST_INC_DEC_64 6 #define TEST_ADD_SUB_64 7 -#define TEST_MAX 7 /* This must match the last test case num */ +#define TEST_MAX 8 /* This must match the last test case num */ void test_atomic_inc_dec_32(void);