Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1212545ybe; Wed, 11 Sep 2019 11:07:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9r/Vb12G9TdRjupTiY0gQoJfGF93hxFCJTC27aLhKyS7ke0chhoy0p3kfFH0wmyEIbYyO X-Received: by 2002:a17:906:b6d0:: with SMTP id ec16mr5224790ejb.206.1568225272655; Wed, 11 Sep 2019 11:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568225272; cv=none; d=google.com; s=arc-20160816; b=dUayV/Zmn1MP8BHIfhgAtF18yhafF3ztfXldnuf2HzxakggeVSNz4TQqM9IIPWv0Nd 74ywx5510lj/khL6AbK0EbYdybo2E7UL7FPhqP1Ua1xcl1w5QqZOrkynj0SuTasrzmBK LOWMHF0/9EU5a7u7afg6zXaZ4hsqNoFrO6a508pqwL1KYxYAYF9zGN5cOFXlgqwa6nRj dF+fGo1IgJHL2QsEnJNytIOJfaoHD4neFWnpOVS+qMeE/lz04oXVZ+OYAy0HWYI5iZWP P6WgVd1SVmpzTDLyStNdQ1MJ0NcmvLqQ8c9eTQ3jtQURffW68NSbMZoE8h5mkVTulWSF o2tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VDefcpHyIaY4WjuohhcRNqXj8drdUdUwhiKl9tZz6bU=; b=LUMHDPcGUkzSnzAErj045Ma3APhjEPfLHmsLTdQxGTUfNCMxnv7efwA/4lFJ/Az0QM NBsFLY+9lNUuoggw18ft/fsKbchSuU0ErsVYLNaLFczVidciLdcPEbskao+XdYqoGlj8 6JSSSytpqs7vWgXHrb29UJr0XPG+nzX79hWw86EzykwblYiTS278DylCABrHDxzllJSg umqg3aJZAl3+hSgA8wHHV1n8Hn30fDBu+tLPtTiobqa4PCNLVVs4d6P3xUzQjt2EcAo1 xH6L0r7jAyboHMSfHWBdVLhZVVWmQ+es02k1GNqZVDv/cfdM6uEn+n2km4XQEelR2vwG nurw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si10895690eju.221.2019.09.11.11.07.28; Wed, 11 Sep 2019 11:07:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730032AbfIKSCt (ORCPT + 99 others); Wed, 11 Sep 2019 14:02:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59354 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729727AbfIKSCt (ORCPT ); Wed, 11 Sep 2019 14:02:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 179E6C049E23; Wed, 11 Sep 2019 18:02:49 +0000 (UTC) Received: from asgard.redhat.com (ovpn-112-27.ams2.redhat.com [10.36.112.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 432B66012A; Wed, 11 Sep 2019 18:02:45 +0000 (UTC) Date: Wed, 11 Sep 2019 19:02:19 +0100 From: Eugene Syromiatnikov To: linux-kernel@vger.kernel.org, Christian Brauner , Shuah Khan , linux-kselftest@vger.kernel.org Cc: Adrian Reber Subject: [PATCH v3 3/6] selftests/clone3: use uint64_t for flags parameter Message-ID: <54e36f7ac30572eb52e3e2c5892230bc3ec94f93.1568224280.git.esyr@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 11 Sep 2019 18:02:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Flags parameter in both userspace and kernel clone args is 64-bit wide, there's little reason to have it signed and 32-bit in tests. * tools/testing/selftests/clone3/clone3.c: Include and . (call_clone3): Change flags parameter type from int to uint64_t. (test_clone3): Change flags parameter type from int to uint64_t; change the format string that prints it accordingly. Signed-off-by: Eugene Syromiatnikov --- tools/testing/selftests/clone3/clone3.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c index 4837865..264d03a 100644 --- a/tools/testing/selftests/clone3/clone3.c +++ b/tools/testing/selftests/clone3/clone3.c @@ -4,8 +4,10 @@ #define _GNU_SOURCE #include +#include #include #include +#include #include #include #include @@ -39,7 +41,7 @@ static pid_t raw_clone(struct clone_args *args, size_t size) return syscall(__NR_clone3, args, size); } -static int call_clone3(int flags, size_t size, enum test_mode test_mode) +static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode) { struct clone_args args = {0}; pid_t ppid = -1; @@ -117,12 +119,13 @@ static int call_clone3(int flags, size_t size, enum test_mode test_mode) return 0; } -static int test_clone3(int flags, size_t size, int expected, +static int test_clone3(uint64_t flags, size_t size, int expected, enum test_mode test_mode) { int ret; - ksft_print_msg("[%d] Trying clone3() with flags 0x%x (size %d)\n", + ksft_print_msg("[%d] Trying clone3() with flags %#" PRIx64 " (size %d)" + "\n", getpid(), flags, size); ret = call_clone3(flags, size, test_mode); ksft_print_msg("[%d] clone3() with flags says :%d expected %d\n", -- 2.1.4