From patchwork Wed Feb 9 22:25:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97A57C433F5 for ; Wed, 9 Feb 2022 22:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235407AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235403AbiBIW0M (ORCPT ); Wed, 9 Feb 2022 17:26:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC567E00ED40 for ; Wed, 9 Feb 2022 14:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=jw0CnlHgRPOcSDTLVKhoZLeeIUUCmIjnPrFoJD8FL9E=; b=O1melj/+7y+P3ev5inVFkYk4cx XW4cbP/f0c1VIIE55hA2JiI8wnVeXVRIgREl05x7kQqM/4Opvtt2ftztwKEeETErKYoyxxescvKYL JE+W6o9IE77QHCafrw4G8S2vksC3uWH1Xx9NycgbkjQ9hRHrMK6vwpLylbmTWjr8oXxhDw2MUO6x7 /lG9zcMDJr9+IMaALhczhtzjWRSKXrqrCW5gIdkjf1iuwfHkSb+TST0BH9tvK+e4bUZqY8E4djbNI kZoCnZkNF7qu3PvswHCGdrJSicB7CI+WgJz6hMUheF5sBHk1fKjXpG2jzSLjTDgxbHXYrpp8DAaOh ANBs82cQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5b-HM; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 01/25] dbench: simplify open_loadfile() as check_loadfile_ok() Date: Wed, 9 Feb 2022 14:25:46 -0800 Message-Id: <20220209222610.438470-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org open_loadfile() just checks to see if the file.gz exists and is present. Note that if the file is not in the gzip format, gzopen and gzread will not produce an error but just read it without doing any uncompressing. So just rename it to check_loadfile_ok(). While at it fix the incorrect use of gzFile as a pointer. Using it as a pointer works just because the file descriptor can cast to the pointer, but this generates compilation warnings. Fix that as well. And lastly, just use gzclose(f) for correctness; Signed-off-by: Luis Chamberlain --- dbench.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/dbench.c b/dbench.c index 178a175..c8f2fee 100644 --- a/dbench.c +++ b/dbench.c @@ -25,6 +25,7 @@ #include "dbench.h" #include "popt.h" #include +#include #include struct options options = { @@ -60,18 +61,25 @@ static double throughput; struct nb_operations *nb_ops; int global_random; -static gzFile *open_loadfile(void) +/* + * Note that if the file is not in the gzip format, gzopen and gzread will not + * produce an error but just read it without doing any uncompressing. + */ +static bool check_loadfile_ok(void) { - gzFile *f; + gzFile f; - if ((f = gzopen(options.loadfile, "rt")) != NULL) - return f; + f = gzopen(options.loadfile, "rt"); + if (f) { + gzclose(f); + return true; + } fprintf(stderr, "dbench: error opening '%s': %s\n", options.loadfile, strerror(errno)); - return NULL; + return false; } @@ -253,14 +261,11 @@ static void create_procs(int nprocs, void (*fn)(struct child_struct *, const cha int i, status; int synccount; struct timeval tv; - gzFile *load; struct sembuf sbuf; double t; - load = open_loadfile(); - if (load == NULL) { + if (!check_loadfile_ok()) exit(1); - } if (nprocs < 1) { fprintf(stderr, From patchwork Wed Feb 9 22:25:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740992 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 339E6C433EF for ; Wed, 9 Feb 2022 22:26:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235398AbiBIW0N (ORCPT ); Wed, 9 Feb 2022 17:26:13 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235393AbiBIW0M (ORCPT ); Wed, 9 Feb 2022 17:26:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4254E00E26B for ; Wed, 9 Feb 2022 14:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=I8glpmN//v5XGqBsPEnUKmyaOZmkoQtAQABel6ffXxY=; b=brxbO4yPBOgdS7d1BK58vAyvNl qD0nuVIujZerlsN1TMu2XUHzNtytB2yb7AzBW0sVXHt0dY2Lq6T4D8alSa9qjnAabjoTjirHJmZIT YUtH0hLIvJ3Q4rql6g3l5yByR/mc0OIuXL9TEg71HTElrkEf0QLY8g9J/Sg+tp9fsNlTaiOsg4yMo v04lAdWwIjMxBZSgwpACeKLVW05HXvWq/mFGsDwTxAi4TSus3KNNsrRiUvdXU27yz/k5tPttt/jD3 LUHiDv9wO5AT7TnAsAai673rXzh7yOynWgyB3ivyVa3yPekXa0cFajuDDTpfHy8CgoSwfT6T7s+9L 70flgfWA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5d-IS; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 02/25] child: fix usage of gzFile and gzopen() Date: Wed, 9 Feb 2022 14:25:47 -0800 Message-Id: <20220209222610.438470-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org The code uses gzFile as a pointer, but it is not the intended design. This works as a pointer works just as well as the stupid file descriptor. Fix this usage to shut up gcc compilation warnings and make proper use of the API. Signed-off-by: Luis Chamberlain --- child.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/child.c b/child.c index 7abb238..04bc474 100644 --- a/child.c +++ b/child.c @@ -329,7 +329,7 @@ void child_run(struct child_struct *child0, const char *loadfile) char **sparams, **params; char *p; const char *status; - gzFile *gzf; + gzFile gzf; pid_t parent = getppid(); double targett; struct child_struct *child; @@ -348,7 +348,7 @@ void child_run(struct child_struct *child0, const char *loadfile) } gzf = gzopen(loadfile, "r"); - if (gzf == NULL) { + if (!gzf) { perror(loadfile); exit(1); } From patchwork Wed Feb 9 22:25:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A89A1C433F5 for ; Wed, 9 Feb 2022 22:26:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235408AbiBIW0M (ORCPT ); Wed, 9 Feb 2022 17:26:12 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235398AbiBIW0M (ORCPT ); Wed, 9 Feb 2022 17:26:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2BB6DF28A66 for ; Wed, 9 Feb 2022 14:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=qgeQ8OV6cpFyXS4amF4UaDDJE7fJnHAdSUmm34ZpM+s=; b=3EOHDS19VZ1tf+Sigs2J1JIF9Z ov0i8VG9rbmHcP2yT/n9XAKoeCcuLzmwsEWD3/DhFOhBONlgu+Aak3fyw3zC1ID0GoVVIWm1Ul0yz uOF+xN/ss6FYMnHHX6mXmpI1ZHPiaSdBazC0E88NUG6FB2XjaXhCFoc/QirO9XJHB8As6RWECaazr rWhcSKX+MmWqdTT/pUrprq49VYlkJoCsBrr5GC7DeX8Uo3cJmyWjziXjJOFEMbC8PKXAmWj+ZRYAa ADHxC3JITnE/Q0JSd0mciQ70LAavlYj35lWuWTn75cChE1I7c+uiOwUGRiIlq/VQ26jbLm6h/zUNe mFGl653w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5f-JO; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 03/25] dbench: remove unused double t value Date: Wed, 9 Feb 2022 14:25:48 -0800 Message-Id: <20220209222610.438470-4-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org The value is not used. Nuke it. Signed-off-by: Luis Chamberlain --- dbench.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dbench.c b/dbench.c index c8f2fee..ca29373 100644 --- a/dbench.c +++ b/dbench.c @@ -496,7 +496,7 @@ static void process_opts(int argc, const char **argv) int main(int argc, const char *argv[]) { double total_bytes = 0; - double t, latency=0; + double latency=0; int i; setlinebuf(stdout); @@ -568,8 +568,6 @@ static void process_opts(int argc, const char **argv) latency = MAX(latency, children[i].worst_latency); } - t = timeval_elapsed2(&tv_start, &tv_end); - if (options.machine_readable) { printf(";%g;%d;%d;%.03f;\n", throughput, From patchwork Wed Feb 9 22:25:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD773C433FE for ; Wed, 9 Feb 2022 22:26:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235393AbiBIW0N (ORCPT ); Wed, 9 Feb 2022 17:26:13 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235400AbiBIW0M (ORCPT ); Wed, 9 Feb 2022 17:26:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0533E00F7E0 for ; Wed, 9 Feb 2022 14:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=3McOI736+PjDQeC6GocdHHCpWSWi3e6E10oZax+3gLw=; b=epxaetaZED8qT3PEE5McXXN/tx BQOyelDFmAg9kZioewOQspu7p26H97vbRCZEasgmCLzvQVGCiO5SYskTRuHzrrvf8auL+PrqLBGBp aLzT1BS52peT1p3eBaUPflb8FYWvDG7jDKVichelaPm4MnCtMely0B4pdy00AlEWJPPiI6DQ1uxpI pU5qBD5dfhelwZReETNBjhUvUxtM+oyBe0VnWT3A73VxPDljr01IP6TkCkDS5iruV4Op/P1UFmhqi fYdOe61d3VLUSL091T124/ERItbZbfyozwJfiMla5o4MKE80dwxwBI8c1cqILlnmiYH9K4AsgO54u wscA1AuA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5h-KI; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 04/25] child: fix data type comparison on child_run Date: Wed, 9 Feb 2022 14:25:49 -0800 Message-Id: <20220209222610.438470-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Use an unsigned int when comparing values returned by strlen(). This fixes this compile warning: child.c:447:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 447 | if (len > strlen(line +13)) { | Signed-off-by: Luis Chamberlain --- child.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/child.c b/child.c index 04bc474..d340860 100644 --- a/child.c +++ b/child.c @@ -441,7 +441,7 @@ loop_again: int count = RWBUFSIZE; while (count > 0) { - int len; + unsigned int len; len = count; if (len > strlen(line +13)) { From patchwork Wed Feb 9 22:25:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740994 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A59E8C43217 for ; Wed, 9 Feb 2022 22:26:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235443AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235407AbiBIW0M (ORCPT ); Wed, 9 Feb 2022 17:26:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00590E00F7E9 for ; Wed, 9 Feb 2022 14:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=hOINuISp/2GzAwx8dNA3uBj2ENwG6uE189tQS/ddZfg=; b=Ewts+KIpCEQIefm1R3P0rl+WNN yg1jSbLR7V5KFMyIONRCfFqGItiUs1wD7x4NObKOt1qglS0CA2LHZr7BpIwj5N8B2M/vjQJntRojk nYhgxU8iIJ5Zhde6hdxVwmXEoRPh1+FlnYAlIzeAWtdoohjDAPSo9myLYcZa8WmGq+F7MeXF/fP2f gYyPfbiv1myBYrSjneNS/sxQp7zr6adUzd8pn6DRS6jSErjbgec+eFBK+U0uflCpBwO+Uxncuychq w+j8hjxXppQIoGVOU9sE1dZtY70rrG+jw+NZwMePB43rldcZFEwH/SqJlYrAfHav3EdzbsDXg6URv WtzxE8CA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5j-LK; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 05/25] Makefile.in: disable unused warning for rpc generated code Date: Wed, 9 Feb 2022 14:25:50 -0800 Message-Id: <20220209222610.438470-6-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org rpcgen cretes C code with unused variables, so just disable gcc unused variable warning for rpc generated code. Signed-off-by: Luis Chamberlain --- Makefile.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index a12affb..da2fc96 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,6 +16,7 @@ DESTDIR=/ CC=@CC@ CFLAGS=@CFLAGS@ -I. -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(datadir)\" CFLAGS+=`pkg-config --cflags libtirpc` +CFLAGS_RPCGEN=-Wno-unused-variable LIBS+=`pkg-config --libs libtirpc` EXEEXT=@EXEEXT@ @@ -58,7 +59,7 @@ nfs.h: nfs.x mount_xdr.o: mount_xdr.c mount.h @echo Compiling $@ - gcc -g $(CFLAGS) -c mount_xdr.c -o $@ + gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_xdr.c -o $@ mount_xdr.c: mount.x @echo Generating $@ @@ -66,7 +67,7 @@ mount_xdr.c: mount.x mount_client.o: mount_client.c mount.h @echo Compiling $@ - gcc -g $(CFLAGS) -c mount_client.c -o $@ + gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_client.c -o $@ mount_client.c: mount.x @echo Generating $@ @@ -74,7 +75,7 @@ mount_client.c: mount.x nfs_xdr.o: nfs_xdr.c nfs.h @echo Compiling $@ - gcc $(CFLAGS) -g -c nfs_xdr.c -o $@ + gcc $(CFLAGS) $(CFLAGS_RPCGEN) -g -c nfs_xdr.c -o $@ nfs_xdr.c: nfs.x @echo Generating $@ @@ -82,7 +83,7 @@ nfs_xdr.c: nfs.x nfs_client.o: nfs_client.c nfs.h @echo Compiling $@ - gcc -g $(CFLAGS) -c nfs_client.c -o $@ + gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c nfs_client.c -o $@ nfs_client.c: nfs.x @echo Generating $@ From patchwork Wed Feb 9 22:25:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741016 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A857FC433EF for ; Wed, 9 Feb 2022 22:27:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235513AbiBIW0z (ORCPT ); Wed, 9 Feb 2022 17:26:55 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235508AbiBIW0Q (ORCPT ); Wed, 9 Feb 2022 17:26:16 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 098EAE011168 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=IPq384fvmvWNh0x6UNP/5npCxkU7Qylq5a+2wXkXefQ=; b=ZWJmmqpEt5Feoc1gWp8cMFg1WP z5cyLQHxxokBGxSDYdjdUq96HgYX82MrzhJM2H9JDPqYTtux0WLCub1lwOS/7phDztS/yr0eRycjJ w1pm+v49gr768JGwpxoZQj6PzKzEjnWreFGYn0L2pCsr1H5KZPhDTWNG7ektNbEOarzpi2Q0Tjrw0 bd7NWeWd+H/+VqlX3SZw33s9FOmVc3kHPwwF4tzr1buPLRNX/Zr/SSGoe+yQHs9/hWe0j3Lfr523B itV2XcuBm+YnDBmNNdpJTOPRQccLde9JqyTiCkQwOSJGPMtbEp6ZspmAS4yYpF4ohzmM4AneoHbvv OUBD43pw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5v-Ma; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 06/25] configure.ac: run autoupdate Date: Wed, 9 Feb 2022 14:25:51 -0800 Message-Id: <20220209222610.438470-7-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org There are a few deprecate things, run autoupdate to correct these things. Signed-off-by: Luis Chamberlain --- configure.ac | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 14e0d32..e8b373e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT() -AC_PREREQ(2.52) +AC_INIT +AC_PREREQ([2.71]) AC_MSG_NOTICE([Configuring dbench]) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) dnl Checks for programs. AC_PROG_CC @@ -24,7 +24,20 @@ else fi AC_HEADER_DIRENT -AC_HEADER_TIME +m4_warn([obsolete], +[Update your code to rely only on HAVE_SYS_TIME_H, +then remove this warning and the obsolete code below it. +All current systems provide time.h; it need not be checked for. +Not all systems provide sys/time.h, but those that do, all allow +you to include it and time.h simultaneously.])dnl +AC_CHECK_HEADERS_ONCE([sys/time.h]) +# Obsolete code to be removed. +if test $ac_cv_header_sys_time_h = yes; then + AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both + and . This macro is obsolete.]) +fi +# End of obsolete code. + AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h sys/vfs.h sys/statvfs.h stdint.h) @@ -58,18 +71,16 @@ if test x"$ac_cv_func_fgetxattr" = x"yes" -o \ fi AC_CACHE_CHECK([for va_copy],dbench_cv_HAVE_VA_COPY,[ -AC_TRY_LINK([#include -va_list ap1,ap2;], [va_copy(ap1,ap2);], -dbench_cv_HAVE_VA_COPY=yes,dbench_cv_HAVE_VA_COPY=no)]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],[dbench_cv_HAVE_VA_COPY=yes],[dbench_cv_HAVE_VA_COPY=no])]) if test x"$dbench_cv_HAVE_VA_COPY" = x"yes"; then AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) fi if test x"$dbench_cv_HAVE_VA_COPY" != x"yes"; then AC_CACHE_CHECK([for __va_copy],dbench_cv_HAVE___VA_COPY,[ -AC_TRY_LINK([#include -va_list ap1,ap2;], [__va_copy(ap1,ap2);], -dbench_cv_HAVE___VA_COPY=yes,dbench_cv_HAVE___VA_COPY=no)]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],[dbench_cv_HAVE___VA_COPY=yes],[dbench_cv_HAVE___VA_COPY=no])]) if test x"$dbench_cv_HAVE___VA_COPY" = x"yes"; then AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) fi @@ -83,7 +94,7 @@ ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS -lpopt" -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* * Just see if we can compile/link with popt */ @@ -98,8 +109,7 @@ int main(int argc, const char *argv[]) return 0; } -], ac_cv_have_popt=yes, ac_cv_have_popt=no, - [echo $ac_n "compile with POPT. Assuming OK... $ac_c" +]])],[ac_cv_have_popt=yes],[ac_cv_have_popt=no],[echo $ac_n "compile with POPT. Assuming OK... $ac_c" ac_cv_have_popt=yes]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" @@ -119,7 +129,7 @@ ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS -lsmbclient" -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -137,8 +147,7 @@ int main(int argc, char *argv[]) return 0; } -], ac_cv_have_libsmbclient=yes, ac_cv_have_libsmbclient=no, - [echo $ac_n "compile with LIBSMBCLIENT. Assuming OK... $ac_c" +]])],[ac_cv_have_libsmbclient=yes],[ac_cv_have_libsmbclient=no],[echo $ac_n "compile with LIBSMBCLIENT. Assuming OK... $ac_c" ac_cv_have_libsmbclient=yes]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" @@ -162,7 +171,7 @@ ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS -liscsi" -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -180,8 +189,7 @@ int main(int argc, char *argv[]) return 0; } -], ac_cv_have_libiscsi=yes, ac_cv_have_libiscsi=no, - [echo $ac_n "compile with LIBISCSI. Assuming OK... $ac_c" +]])],[ac_cv_have_libiscsi=yes],[ac_cv_have_libiscsi=no],[echo $ac_n "compile with LIBISCSI. Assuming OK... $ac_c" ac_cv_have_libiscsi=yes]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" @@ -203,7 +211,7 @@ ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* We can only check that this program compiles. We cant check whether the actual ioctl works since opening the device and doing i/o can only be done by root. @@ -229,8 +237,7 @@ int main(int argc, char *argv[]) return 0; } -], ac_cv_linux_scsi_sg=yes, ac_cv_linux_scsi_sg=no, - [echo $ac_n "cross compiling; assumed OK... $ac_c" +]])],[ac_cv_linux_scsi_sg=yes],[ac_cv_linux_scsi_sg=no],[echo $ac_n "cross compiling; assumed OK... $ac_c" ac_cv_linux_scsi_sg=yes]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" From patchwork Wed Feb 9 22:25:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 365D6C433F5 for ; Wed, 9 Feb 2022 22:27:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235498AbiBIW0w (ORCPT ); Wed, 9 Feb 2022 17:26:52 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235513AbiBIW0Q (ORCPT ); Wed, 9 Feb 2022 17:26:16 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 158B4E011150 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=cjyCBPfvPoudeBaY7sbUSz+Hv9Wr8fCNP+jYWjSJYQI=; b=KnVYvd3qfcRIbuEXHM8GAX+dxq CzLwn/32pWJMFLbqgUYX5+eNQWYPEPxReX9+pOLtOh8eolMVT/fon1W325jbWSPPKQz6u1xFeHW6a OhYrQq980lOflcgbP2qTVpJtVzwjOYDWG2mTub9SQSnrL6p5nQ3VNh3eIB58RhLqwB/t5Cus44gAp ByPDAa3O6L5Ca5d3Rgxo5fKwmONGH0mG4WJGuUoSiuqlgDBNpn/DO1TttBZkCrx70gXC4LjWNZ+Ih V2YgrJv/h+8MOUFHudPb191zyx1MPdBm/7Fa68A5KUax5cRaQFLkys4H49UhwgctYQ4ncgUp88yAs FIk7Xiww==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q5z-O8; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 07/25] dbench: update use of time.h or sys/time.h Date: Wed, 9 Feb 2022 14:25:52 -0800 Message-Id: <20220209222610.438470-8-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org autoconf complains about the deprecated use of including just sys/time.h. Fix this. Signed-off-by: Luis Chamberlain --- configure.ac | 16 +--------------- dbench.h | 13 ++++++++++++- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index e8b373e..b8c26fe 100644 --- a/configure.ac +++ b/configure.ac @@ -23,27 +23,13 @@ else CFLAGS="$CFLAGS -O" fi -AC_HEADER_DIRENT -m4_warn([obsolete], -[Update your code to rely only on HAVE_SYS_TIME_H, -then remove this warning and the obsolete code below it. -All current systems provide time.h; it need not be checked for. -Not all systems provide sys/time.h, but those that do, all allow -you to include it and time.h simultaneously.])dnl -AC_CHECK_HEADERS_ONCE([sys/time.h]) -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both - and . This macro is obsolete.]) -fi -# End of obsolete code. - AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(ctype.h strings.h stdlib.h string.h sys/vfs.h sys/statvfs.h stdint.h) AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h sys/extattr.h sys/uio.h) AC_CHECK_HEADERS(sys/mount.h) +AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_FUNCS(fdatasync) # Check if we have libattr diff --git a/dbench.h b/dbench.h index 465cf3b..1fecd1a 100644 --- a/dbench.h +++ b/dbench.h @@ -27,7 +27,18 @@ #include #include #include -#include + +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #include #include #include From patchwork Wed Feb 9 22:25:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740998 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0C2BC433F5 for ; Wed, 9 Feb 2022 22:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235421AbiBIW0Q (ORCPT ); Wed, 9 Feb 2022 17:26:16 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235422AbiBIW0N (ORCPT ); Wed, 9 Feb 2022 17:26:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A469E011175 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=zMqx0fKuRkjkOWzyP4uW0KRJpZSn1f0pA3xVUSk4KDg=; b=0sEOImsrwaQxlGAm2dywAQT71S C3VRtfkvuqb7Gk54Tg1uOpxCks9Wc25KRw2RW45GPPmbJvQn8ArOSqPcKnpuoAto/CdynEIqJQ7Uo R3kI+w7Y/mTFUaPvKT+6Ppwx6MRcJHP1GAnCLjlckHWzAJx3R6hawbSFEbCFO1isn9ioDJAJFkLae LA04SCC61SKBKbvMN8ULthaDusTz84DJoWu23JfTsSNCdtEjbeIpRFjs0t68HjV2eP8W8klQxeIDu Wlz/PkobfReZqqzWyLl8y+ICEu33Ambqx3r1+tWiZ07YacUY6mS8njtQAQPPVK3mezi46Jt5rliNN yn9qze8w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q65-P9; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 08/25] config.h.in: run autoconf Date: Wed, 9 Feb 2022 14:25:53 -0800 Message-Id: <20220209222610.438470-9-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Luis Chamberlain --- config.h.in | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/config.h.in b/config.h.in index 82d417b..b037df5 100644 --- a/config.h.in +++ b/config.h.in @@ -33,10 +33,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_DIRENT_H - /* Whether we have EA support */ #undef HAVE_EA_SUPPORT @@ -121,9 +117,6 @@ /* Define to 1 if you have the `lsetxattr' function. */ #undef HAVE_LSETXATTR -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - /* Define to 1 if you have the `removexattr' function. */ #undef HAVE_REMOVEXATTR @@ -151,20 +144,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ATTRIBUTES_H -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_DIR_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EXTATTR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MOUNT_H -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_NDIR_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATVFS_H @@ -227,9 +212,5 @@ backward compatibility; new code need not use it. */ #undef STDC_HEADERS -/* Define to 1 if you can safely include both and . This - macro is obsolete. */ -#undef TIME_WITH_SYS_TIME - /* Define _GNU_SOURCE so that we get all necessary prototypes */ #undef _GNU_SOURCE From patchwork Wed Feb 9 22:25:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740997 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD85AC4332F for ; Wed, 9 Feb 2022 22:26:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235403AbiBIW0P (ORCPT ); Wed, 9 Feb 2022 17:26:15 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235421AbiBIW0N (ORCPT ); Wed, 9 Feb 2022 17:26:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26DF8E015252 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=bLKfzp5m9dJE4zTm24eebH5oSOMkSHFVXdxE564CNK0=; b=aP5ADrOG4/MR1PiW7TTZkv9a5d Ab6UyYGNayDRlrAR5w6DnLA7/YURQBHeB0Ns6KEDkd9EFUqDnfzKqK6DNxMfPD20NjlQqEnp5Tx9V wX/glmpOsIyd35zgwGja3RuWTzel9rtYhpxU8nK0hG7fEVKrhdI/M5vGT+ecU+LQfpUmtbv9gNlXz z0qVReOwAswYUaPbE0HUxosjDFwK+nlsVRdhNV2hh1YLe487EEq8po3Los427CLZFyzBl2hP5n93k /JibKiLcSoibhc+OhZvKbFfhT8VwHyF13I3KKTJb0QGFmfHnyuFYUB167hlmLAWQ+8eoMmjhhNEIQ bVclAyYw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q67-QN; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 09/25] snprintf: specify safe fallthrough on switches Date: Wed, 9 Feb 2022 14:25:54 -0800 Message-Id: <20220209222610.438470-10-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org gcc -Wall will complain when we fallthrough on a switch but don't mean it. Fortunately we can follow the Linux kernel strategy to use -Wimplicit-fallthrough=2 and allow comments to supress this to clarify this was intended. Signed-off-by: Luis Chamberlain --- Makefile.in | 4 +++- snprintf.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index da2fc96..ef414a5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,6 +16,8 @@ DESTDIR=/ CC=@CC@ CFLAGS=@CFLAGS@ -I. -DVERSION=\"$(VERSION)\" -DDATADIR=\"$(datadir)\" CFLAGS+=`pkg-config --cflags libtirpc` +# Allows comments to be used for fallthrough +CFLAGS+=-Wimplicit-fallthrough=2 CFLAGS_RPCGEN=-Wno-unused-variable LIBS+=`pkg-config --libs libtirpc` EXEEXT=@EXEEXT@ @@ -28,7 +30,7 @@ SRV_OBJS = util.o tbench_srv.o socklib.o all: dbench doc dbench: $(DB_OBJS) - $(CC) -o $@ $(DB_OBJS) $(LIBS) + $(CC) $(CFLAGS) -o $@ $(DB_OBJS) $(LIBS) tbench_srv: $(SRV_OBJS) $(CC) -o $@ $(SRV_OBJS) $(LIBS) diff --git a/snprintf.c b/snprintf.c index adfd3c4..9cfc20e 100644 --- a/snprintf.c +++ b/snprintf.c @@ -317,6 +317,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args break; case 'X': flags |= DP_F_UP; + /* fallthrough */ case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) @@ -339,6 +340,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args break; case 'E': flags |= DP_F_UP; + /* fallthrough */ case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); @@ -348,6 +350,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args break; case 'G': flags |= DP_F_UP; + /* fallthrough */ case 'g': if (cflags == DP_C_LDOUBLE) fvalue = va_arg (args, LDOUBLE); From patchwork Wed Feb 9 22:25:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4113C433F5 for ; Wed, 9 Feb 2022 22:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235435AbiBIW0S (ORCPT ); Wed, 9 Feb 2022 17:26:18 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235426AbiBIW0N (ORCPT ); Wed, 9 Feb 2022 17:26:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AF17E015264 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=UuC51os8Fs33I57pBPtfouUQuWuJRu1lDBeX7RYG/Xw=; b=NpdQTK0V9iPUgPyfgyZaW6TUB2 c5nqXADVxqX+2ivhA9hstMGai9T+P3KQM3w4AdzYQKrf+EYGiYCAUg9cEaCnIc3E10S5w14YG8jYG dVIMNXS7ZBt4iKz/ukCr+nkJXn0QSKTIl+pj+cz9K5pTH7EQu9b6WxbbV+zNfoTZ8DGOv5B5VulVZ DRZZ6Tiidvm0OqlJpe1UE51/ezY5JXFdx//AimM6Udte8h7+vfUQI/ldt1cKAod01hNs8xXdrVyrY IeD2E7cZCqIhVE9+g1qUmpoaBqVqSqJzQfvaeWuN8yxgvEI0Zm3DcqTvhE/EdKXPW0IJXSyBut9bf bYgo06Zg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q6D-RS; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 10/25] nfsio.c: include dbench.h before nfs.h Date: Wed, 9 Feb 2022 14:25:55 -0800 Message-Id: <20220209222610.438470-11-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This is so _GNU_SOURCE is defined so asprintf() is declared when including . Signed-off-by: Luis Chamberlain --- nfsio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfsio.c b/nfsio.c index 7583110..1b49bd3 100644 --- a/nfsio.c +++ b/nfsio.c @@ -17,8 +17,8 @@ #define _FILE_OFFSET_BITS 64 -#include "nfs.h" #include "dbench.h" +#include "nfs.h" #include #include "mount.h" From patchwork Wed Feb 9 22:25:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12740999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C551C433EF for ; Wed, 9 Feb 2022 22:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235422AbiBIW0R (ORCPT ); Wed, 9 Feb 2022 17:26:17 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235435AbiBIW0N (ORCPT ); Wed, 9 Feb 2022 17:26:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F355E01526E for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=05KVKhCTONq+QzuABBghIGqngXTCXNNeYyKogBeXvOE=; b=tH5TBEakRVPmNePR/FQo0P10my 5LbwunEIqPDquReSHKY4e3n5Kvu4TYqAaISGBh7X68sV1f3OeUfsB/WVQhs4lUDQrFn40sRj+fnEi XsGGGI0SEeu2si1IbBfitTWGnuvjiE15FUEhJgV1mjOzIIZmQdaJOEYk2GewCx5kZXJkpt2QvxVaA PnkPLDgqc4Nz6Jo/VyqwTpwQyfUoooMisq5WUifUg/UspxCsAJTYwa1U7aZNuX3SxCJrRXWU/+KEv 8K0+kywxNOpTkXfygPlsrdLsl7lKt3eZ8EWtYQ+ciXVFruDbvHA0l2uQxjeygBpfLkxtMcM28ILyp EqFzKm5w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q6J-ST; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 11/25] nfsio: remove unused status variable Date: Wed, 9 Feb 2022 14:25:56 -0800 Message-Id: <20220209222610.438470-12-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Luis Chamberlain --- nfsio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/nfsio.c b/nfsio.c index 1b49bd3..7332066 100644 --- a/nfsio.c +++ b/nfsio.c @@ -51,7 +51,6 @@ static void nfs3_cleanup(struct child_struct *child) static void nfs3_setup(struct child_struct *child) { - const char *status = "0x00000000"; nfsstat3 res; child->rate.last_time = timeval_current(); From patchwork Wed Feb 9 22:25:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDC0DC43217 for ; Wed, 9 Feb 2022 22:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235426AbiBIW0U (ORCPT ); Wed, 9 Feb 2022 17:26:20 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235437AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DFC3E015276 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=5c4WMMaE1CjFxfPzbcBwAAjzftUEERYnZfov2f61cSw=; b=vBDRvcC//PcsQ70X/3PVCQd/3t Egg1GQ7Z2NX6pdPQU96UXuYUKcTWP2skd8gpWnVu7ReRuBs3TaeUmsYjkUhsJQKwccEaPxs94Kkqc Fn/4Q8XUKsrh2oiiqKPse1ApGIxtdTmJxQ4nQ2GFcm97mvIFd3O5g1LNpnCTGzEZWaVQbYPjX50KB GY5ITjOQSA3a2YgWrTKO8mNVYh/pJv1g0kXSANb+SBnqnKCXy1jcQsBL01oom6IgeUDAn4PoZOo/O 9uKgmXlhIZ+p4HxO344sjRnfQe+owNEP1Wf9ga1SrL+beZslHwfmZiMvv7MNK6VNwo9S9QJDrt0Fm fVSlgQRg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q6L-Tn; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 12/25] child: be expicit about string truncation goal Date: Wed, 9 Feb 2022 14:25:57 -0800 Message-Id: <20220209222610.438470-13-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Fix this compilation warning: child.c:260:9: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation] 260 | strncpy(str, pstart, sizeof(str)); We do this by being explicit about our goal to truncate or use the smaller string passed. Signed-off-by: Luis Chamberlain --- child.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/child.c b/child.c index d340860..2545e4c 100644 --- a/child.c +++ b/child.c @@ -251,13 +251,17 @@ static int parse_randomstring(char *line) char *pstart, *pend, rndc[2]; unsigned int idx; char str[256]; + size_t min_len; again: pstart = index(line, '['); if (pstart == NULL) { goto finished; } - strncpy(str, pstart, sizeof(str)); + + /* Truncate or use the smaller size passed */ + min_len = strlen(line) < sizeof(str) ? strlen(line) : sizeof(str); + strncpy(str, pstart, min_len); pend = index(str, ']'); if (pstart == NULL) { From patchwork Wed Feb 9 22:25:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D202C433EF for ; Wed, 9 Feb 2022 22:26:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235543AbiBIW0V (ORCPT ); Wed, 9 Feb 2022 17:26:21 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235400AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45D7BE015271 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=muIG+O5/S4KB2qMjBKLY7jIgEKWuhsRT/ImKeHA4F8s=; b=rUm6LIdwT7yIk/X5KHw9XbQeKr /5i1/uRrmwopsK2UC1zW40UbNHmSwZDBGcvl2sm902S8OqumexgJo/ntL1DZLLbb47TY+eLi1WJF/ wR2gs+fHjWYOroLWEilCIky0fdDUjTTT/TN4eAyTxAcXeicx2rqjBc7bqBsn6aYsi/fa8TkhLG0s9 vFmrDuQyRDUz3/bFBPOhdFY6zoH4Ir/EUsJCDFHPIH4QIToZ0X5kogZaCsG+CJLlYO1MpMyu8O4Q7 Hz+N0kef0JNNvE11qFBxEBWXjeyhXaie0BPN7flOtLUZQRo7eMW6p0fpWE8tAZUmSt0eJRjXl2DB2 AK4iMP+w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q6P-Ur; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 13/25] child: do not overlap on memcpy() Date: Wed, 9 Feb 2022 14:25:58 -0800 Message-Id: <20220209222610.438470-14-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Fix this compilation warning: gcc -g -O2 -Wall -W -I. -DVERSION=\"4.00\" -DDATADIR=\"/usr/local/share\" `pkg-config --cflags libtirpc` -Wimplicit-fallthrough=2 -c -o child.o child.c In function ‘parse_randomstring’, inlined from ‘child_run’ at child.c:465:8: child.c:291:17: warning: ‘memcpy’ accessing 255 bytes at offsets 0 and 1 overlaps 254 bytes at offset 1 [-Wrestrict] 291 | memcpy(str, str+1, sizeof(str)-1); We fix this by using a copy of the string to a original string so to avoid having memcpy() overlap. Signed-off-by: Luis Chamberlain --- child.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/child.c b/child.c index 2545e4c..715452e 100644 --- a/child.c +++ b/child.c @@ -250,6 +250,7 @@ static int parse_randomstring(char *line) int num; char *pstart, *pend, rndc[2]; unsigned int idx; + char str_orig[256]; char str[256]; size_t min_len; @@ -262,6 +263,7 @@ again: /* Truncate or use the smaller size passed */ min_len = strlen(line) < sizeof(str) ? strlen(line) : sizeof(str); strncpy(str, pstart, min_len); + strncpy(str_orig, pstart, min_len); pend = index(str, ']'); if (pstart == NULL) { @@ -288,7 +290,7 @@ finished: } /* remote initial " */ while (str[0] == '"') { - memcpy(str, str+1, sizeof(str)-1); + memcpy(str, str_orig+1, sizeof(str_orig)-1); } /* remote trailing " */ while (1) { From patchwork Wed Feb 9 22:25:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AA1DC433EF for ; Wed, 9 Feb 2022 22:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235400AbiBIW0W (ORCPT ); Wed, 9 Feb 2022 17:26:22 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235447AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 596A1E015253 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=4oE+QHox4pUwVU7xwXwkYDcvIdCGgs+HWwG08MQbq4o=; b=rDQkhtHfX5Om3hKvUZMN0DosTN wkRzKgR5CCMjLbMZ4FH6FpWDT70eWfTW9G8nvARqjnKWWRwC96O8A5NLdbYQMVzjUUHCOPYFKKITX o8khOz+327hrS1MEHdIOilgeW5YCma6QxI+FkMd/zuKX/V3glhgrZdzDfPW9cY/mXjn2M3oH2TFAO Ah6bb/xXhP2C7v5OdKkQDWd5AFhO4yZKcLz7kgaFm1IyB2Jailnv/Kf2P/w5vP9isjxDEwc8nWYye 5+6oAuqKE4gb/7AfK35DnwThgVAANPV8bwV/FaPfz54FufowbpMn4Chk2+9SOCDYCussLd46qx13E tghfUYiw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPi-001q6T-Vs; Wed, 09 Feb 2022 22:26:14 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 14/25] dbench.h: use bits/types.h instead of defining uint32 Date: Wed, 9 Feb 2022 14:25:59 -0800 Message-Id: <20220209222610.438470-15-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This fixes this compilation warning: Compiling nfsio.o gcc -g -g -O2 -Wall -W -I. -DVERSION=\"4.00\" -DDATADIR=\"/usr/local/share\" `pkg-config --cflags libtirpc` -Wimplicit-fallthrough=2 -c nfsio.c -o nfsio.o In file included from nfsio.c:20: dbench.h:105:16: error: two or more data types in declaration specifiers 105 | #define uint32 unsigned int | ^~~~~~~~ nfs.h:54:16: note: in expansion of macro ‘uint32’ 54 | typedef u_long uint32; | ^~~~~~ dbench.h:105:25: error: two or more data types in declaration specifiers 105 | #define uint32 unsigned int | ^~~ nfs.h:54:16: note: in expansion of macro ‘uint32’ 54 | typedef u_long uint32; | ^~~~~~ In file included from nfsio.c:21: nfs.h:54:1: warning: useless type name in empty declaration 54 | typedef u_long uint32; | ^~~~~~~ Signed-off-by: Luis Chamberlain --- dbench.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbench.h b/dbench.h index 1fecd1a..7e628b2 100644 --- a/dbench.h +++ b/dbench.h @@ -102,7 +102,8 @@ #define BOOL int #define True 1 #define False 0 -#define uint32 unsigned + +#include struct op { unsigned count; From patchwork Wed Feb 9 22:26:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83C73C433F5 for ; Wed, 9 Feb 2022 22:26:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235447AbiBIW0X (ORCPT ); Wed, 9 Feb 2022 17:26:23 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235445AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60657E015642 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=/1tTMU7dVY7QHyrZw+ejALGWqEkhmZJUkQf3d7UF0DE=; b=H+aecQLhArdsJkgCKPwN695+S7 PNTXmPqpOBs0MyQkYnCNudXQm4S4Z8vjE8/PdCG+2kksvIlWP3eWrYgt9vjJ1+U6heVpi6P2cZPiX SY4e0FnUXmQY38G7oKK1sXlPsbsYvCNuPekem7cD6FzSreXGemK8+SrERHlRBYBysUOW4/6g1Vv1K 0r/SuTVhzmM+6Y45vh4aTiu+lq/6zaGwUEc3TxLIfly8yg+OMck2Gan/nzAFLlw7/IXDLdMlkcM9R FT00aHKRk6UAOfb89LTX1I6glu2HqtliQgrzN3IGigl4PZs+efHrHGdY1Bn9ByEL3iUWD1MnFGbrs xdSiKu/A==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6X-0h; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 15/25] sockio.c: use uint32_t Date: Wed, 9 Feb 2022 14:26:00 -0800 Message-Id: <20220209222610.438470-16-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Avoid the ambiguous uint32. Signed-off-by: Luis Chamberlain --- sockio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sockio.c b/sockio.c index 6eb9e0f..f64cfc7 100644 --- a/sockio.c +++ b/sockio.c @@ -29,7 +29,7 @@ struct sockio { static void do_packets(struct child_struct *child, int send_size, int recv_size) { struct sockio *sockio = (struct sockio *)child->private; - uint32 *ubuf = (uint32 *)sockio->buf; + uint32_t *ubuf = (uint32_t *)sockio->buf; ubuf[0] = htonl(send_size-4); ubuf[1] = htonl(recv_size-4); From patchwork Wed Feb 9 22:26:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16C30C433F5 for ; Wed, 9 Feb 2022 22:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235451AbiBIW0d (ORCPT ); Wed, 9 Feb 2022 17:26:33 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235453AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C849E015643 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=zeuehfzhWRQTCu85g1p2aBzfFaO/AdEA/9MP3+5rnzc=; b=FDry+esVoOOcWDMPrO2VFPQogs ZtMtdCdjCLc/U/K6+Yx20QE2GRlnf0kBtNFW7X2zjQ+w6InU58DMqFC1fFUfc+Lg1qAezsBFTkurV YHFAXmJow7J9bLewoIcZQkPzOX1jx2OcVaWwiGjFqblJfW1MSF7xok0z5vJ5H9QuVki3wOo8qMucJ je1VUVLZL8v7nkyPJOUAcI4fw2EZ/jH3jF/nLJAqdl6Vu0CER8Teizxom+PSxvtZhdm13XEuRN3kz SexUXBOYmgJ98jWhi52JIglncsGL1Zjq8Ma7P8pVXGxI4AhYDjLlFexShRe6y/PmSbdKM5fE+R0o+ PRWzP4ew==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6d-2q; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 16/25] libnfs.c: fix a few simple compile warnings Date: Wed, 9 Feb 2022 14:26:01 -0800 Message-Id: <20220209222610.438470-17-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Like including dbench.h first so GNUSOURCE is defined and return is not needed. Signed-off-by: Luis Chamberlain --- libnfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libnfs.c b/libnfs.c index e853e47..1600701 100644 --- a/libnfs.c +++ b/libnfs.c @@ -17,10 +17,11 @@ along with this program; if not, see . */ #define _FILE_OFFSET_BITS 64 -#include +#include "dbench.h" #include "mount.h" #include "nfs.h" #include "libnfs.h" +#include #include #include #include @@ -123,8 +124,7 @@ static data_t *recursive_lookup_fhandle(struct nfsio *nfsio, const char *name) if (t != NULL) { return &t->fh; } - - return ; + return NULL; } static data_t *lookup_fhandle(struct nfsio *nfsio, const char *name, off_t *off) @@ -392,7 +392,6 @@ struct nfsio *nfsio_connect(const char *server, const char *export, const char * mountres3 *mountres; fhandle3 *fh; struct sockaddr_in sin; - int ret; nfsio = malloc(sizeof(struct nfsio)); if (nfsio == NULL) { From patchwork Wed Feb 9 22:26:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 679FDC433F5 for ; Wed, 9 Feb 2022 22:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235453AbiBIW0e (ORCPT ); Wed, 9 Feb 2022 17:26:34 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235455AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85636E015649 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=TyH2K6J/nRkjCZKRXC5/O5q4Hk5e+lxhUfKjvbioAYU=; b=Bio8x8CdgVWDGibneSl/yU0Dbt Mt8AzBCEby7DO6YNxIErc4sNfYPhtIE33ccmbjQTyqUDXRZ1rvWQ/OWxH1DCDDQIRacC/PfLj1HZ7 YHyX+G15wsEQWvsth8hi26SUG2hCVQZADZmp6Xc/pkCcoMiQrVkTuPKIFoX3NQcayLY6N8esrPabn QpD/w/4ke68WgAKAoOOrfbQ/ni/ILZT59v13ezYFVslsy1ztFDcsIHEJ9CFIFJBIJ8D0d0mFqSlY0 COTqgYp1LFYOUX9TWAnyQp1Z2Xi8M492FZm7PRhW1KRGf44/tOof98ApKGkg7y3XTxer5OeQVFpWN WY9PTKzw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6h-45; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 17/25] libnfs: fix compilation warning for inet_tons Date: Wed, 9 Feb 2022 14:26:02 -0800 Message-Id: <20220209222610.438470-18-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Luis Chamberlain --- libnfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnfs.c b/libnfs.c index 1600701..50f914e 100644 --- a/libnfs.c +++ b/libnfs.c @@ -27,6 +27,10 @@ #include #include +#include +#include +#include + #define discard_const(ptr) ((void *)((intptr_t)(ptr))) typedef struct _data_t { From patchwork Wed Feb 9 22:26:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88865C433F5 for ; Wed, 9 Feb 2022 22:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235463AbiBIW0b (ORCPT ); Wed, 9 Feb 2022 17:26:31 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235451AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 861E1E015677 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=auLxMu1bP0Nw8+3Xj2t+yJ45AoADWkRsADb4+RxnZGg=; b=qhJFbGqfZycFOo5s/wQhhUumtz iIBF+Cyn6gw1abZHLpHqBHNXIo6/M2ZwZd4pp61rZZ+bKXnp7k9HVaWG2p6nMFFc45eE5fUFUaypI jR2d8g4SQ2yO8PIhUxXvCBFLa+bFIU82zUB6TFW2t5o1rBJApJtersbbgKk5Ajc7/ZIu2e5+qUVyC ZX1+zKGquPWa208cUTexmZN2T636HGEaJ1Z3ts4k7ArDR128ZIK5BuuVs4a6ZFuuEbU9CfwT8v7XC XON5JnL/+BNZer6BPq8upUetaEup9bbEsDX/Xbumac1kHgKPbMpZDqegaSUdPS7OdHb62JWAZbkLB fKaBv7PQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6j-5W; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 18/25] libnfs.c: fix sign conflict compile warning Date: Wed, 9 Feb 2022 14:26:03 -0800 Message-Id: <20220209222610.438470-19-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Luis Chamberlain --- libnfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnfs.c b/libnfs.c index 50f914e..82e88f9 100644 --- a/libnfs.c +++ b/libnfs.c @@ -853,10 +853,10 @@ nfsstat3 nfsio_read(struct nfsio *nfsio, const char *name, char *buf, uint64_t o goto finished; } - if (offset >= size && size > 0) { + if (offset >= (uint64_t) size && (uint64_t) size > 0) { offset = offset % size; } - if (offset+len >= size) { + if (offset+len >= (uint64_t) size) { offset = 0; } From patchwork Wed Feb 9 22:26:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50B50C433FE for ; Wed, 9 Feb 2022 22:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235445AbiBIW00 (ORCPT ); Wed, 9 Feb 2022 17:26:26 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235463AbiBIW0O (ORCPT ); Wed, 9 Feb 2022 17:26:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91162E01567E for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=h+B3rpYzk+n6bh9FCtTdLrJgfMLxdOLFar2iy99NtGw=; b=K82QV16t2JidQEdOdwDDG08qKX gaAf/JUCjjPTNuNgpwAUhGJ7/Op4sFZ2d+GnrF0vyRBl/vTKHn96MxRTKeFAgqhl5tBHGgiepDg4t dMuPjgIVvZ5zt2WxJ66pnXjwo9gllnUgUA2/Yxe9CGSt/0SBfqM01W6+GzBS3dZi0xlk7igl30a6Y FNdxc3lw2k5gpU1+Jx5ZXuyBcpPmfnGhDtVWGntExwDSrrSQEPKA0WvQygREQ+q4H8aPdKV68zBTE g9NDBrax6lkgbXbmq35kpsFPbqg1Ig4RQayH+TsJjVgtoLFtvzIUDFaZ8iD4S57DhVC+yguDfHoXT 583uaTVg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6n-6y; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 19/25] Makefile.in: Date: Wed, 9 Feb 2022 14:26:04 -0800 Message-Id: <20220209222610.438470-20-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org mount_client.c:19:17: warning: cast between incompatible function types from ‘bool_t (*)(void)’ {aka ‘int (*)(void)’} to ‘bool_t (*)(XDR *, ...)’ {aka ‘int (*)(struct __rpc_xdr *, ...)’} [-Wcast-function-type] 19 | (xdrproc_t) xdr_void, (caddr_t) argp, | ^ Signed-off-by: Luis Chamberlain --- Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.in b/Makefile.in index ef414a5..f8e1f58 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,6 +19,7 @@ CFLAGS+=`pkg-config --cflags libtirpc` # Allows comments to be used for fallthrough CFLAGS+=-Wimplicit-fallthrough=2 CFLAGS_RPCGEN=-Wno-unused-variable +CFLAGS_RPCGEN+=-Wno-cast-function-type LIBS+=`pkg-config --libs libtirpc` EXEEXT=@EXEEXT@ From patchwork Wed Feb 9 22:26:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43C0DC433EF for ; Wed, 9 Feb 2022 22:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235455AbiBIW0h (ORCPT ); Wed, 9 Feb 2022 17:26:37 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235465AbiBIW0P (ORCPT ); Wed, 9 Feb 2022 17:26:15 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A189BE01644C for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=1owq6WpTajZpQ8LNMVy+jFMB/p1pTY56eQLew6SX8ac=; b=tDpT1wIsRZBoorf5aLMnT+5kzc 8pQZZjTr4ymLf+zfuFW3PYIRckTe2u7WXmhqVjH9JyIhbyIppOc886ihtz4PAbN3PIwq5j4tkuF5Y Ktu6GEcg3XlO5n0xP+62bDXCHI2zG7yWH/9ztJgXjd1Dr1kbpCkwTJtfwm8PmWh+YlHi8KetuTqN8 29bJzuQOdGyFkzhNkYxlLUbC+niYkQNiIbIGm+ZTQFkBToBJnMi/6akt/bAZbSo/9ymRGOUThWf66 5Anr5zcdWqHS2SsqGyvr1qCRE2uiCZ2fBrwf8U+jzy4eABCcH2tesF0XtAQM/XNfMbuORPaWbtkGz 8M6AUU2w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6t-8u; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 20/25] linux_scsi.c: fix redeclaration of _GNU_SOURCE Date: Wed, 9 Feb 2022 14:26:05 -0800 Message-Id: <20220209222610.438470-21-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Luis Chamberlain --- linux_scsi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/linux_scsi.c b/linux_scsi.c index 3306cd0..a8ef61f 100644 --- a/linux_scsi.c +++ b/linux_scsi.c @@ -16,10 +16,6 @@ */ #include "dbench.h" -#define _GNU_SOURCE -#include -#undef _GNU_SOURCE - #include #include #include From patchwork Wed Feb 9 22:26:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 495E3C433EF for ; Wed, 9 Feb 2022 22:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235517AbiBIW0l (ORCPT ); Wed, 9 Feb 2022 17:26:41 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235487AbiBIW0P (ORCPT ); Wed, 9 Feb 2022 17:26:15 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF1CDF28A66 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=QyTx/VIaPV6czS2cPMhCe5m2MVAhKE2XPTH8dCt+vnM=; b=EAJepXTf7n5xdiu4EhTdxEw/iN EpVevsLlyjl0n46maBe7rSex9TMOoOt4YbqXqbSueTdWaKytReU2LCo/eS2zqO7ePYOP/fqWg0iZw DYzVgaZnAI6ZqZ5DzuJymyK1auENI2OhRv4xeJFGH6HtobK0tNfz4gj2vIpcpf12bV5d5c1IEXs39 rNju8whJ6RBKb3oMfWBXGxhureyXF1t5qbUGvl0T6Kqo6KjQA8Awiv79wUv++tnKo0exUzY+pQVMw h+HUTURRHzq8p8vjKxsdLkeBbVWn9/FR9iGSiej7dnq76bpDvGwFAYHfomnzhNnuSlcZMp5dsYvNQ f1P1lNNw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q6x-Af; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 21/25] Makefile.in: modernize build output with V=1 or V=0 Date: Wed, 9 Feb 2022 14:26:06 -0800 Message-Id: <20220209222610.438470-22-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Allow the build to be chatty or not. By default we're quiet. Signed-off-by: Luis Chamberlain --- Makefile.in | 120 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 70 insertions(+), 50 deletions(-) diff --git a/Makefile.in b/Makefile.in index f8e1f58..eb84399 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,99 +28,119 @@ LIBNFS_OBJ = libnfs.o mount_client.o nfs_client.o mount_xdr.o nfs_xdr.o DB_OBJS = fileio.o util.o dbench.o child.o system.o snprintf.o sockio.o nfsio.o libnfs.a socklib.o @LINUXSCSI@ iscsi.o libiscsi.o @SMBO@ SRV_OBJS = util.o tbench_srv.o socklib.o +ifeq ($(V),1) + export Q= + export NQ=true +else + export Q=@ + export NQ=@echo +endif + all: dbench doc +%.o: %.c dbench.h + $(NQ) ' CC ' $@ + $(Q)$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< + dbench: $(DB_OBJS) - $(CC) $(CFLAGS) -o $@ $(DB_OBJS) $(LIBS) + $(NQ) ' LD ' $@ + $(Q)$(CC) $(CFLAGS) -o $@ $(DB_OBJS) $(LIBS) tbench_srv: $(SRV_OBJS) - $(CC) -o $@ $(SRV_OBJS) $(LIBS) + $(NQ) ' CC ' $@ + $(Q)$(CC) -o $@ $(SRV_OBJS) $(LIBS) tbench: dbench - ln -sf dbench tbench + $(NQ) ' LN ' $@ + $(Q)ln -sf dbench tbench libnfs.a: $(LIBNFS_OBJ) - @echo Creating library $@ - ar r libnfs.a $(LIBNFS_OBJ) - ranlib libnfs.a + $(NQ) ' AR ' $@ + $(Q)ar r libnfs.a $(LIBNFS_OBJ) + $(Q)ranlib libnfs.a nfsio.o: nfsio.c mount.h nfs.h - @echo Compiling $@ - gcc -g $(CFLAGS) -c nfsio.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) -c nfsio.c -o $@ libnfs.o: libnfs.c libnfs.h mount.h nfs.h - @echo Compiling $@ - gcc -g $(CFLAGS) -c libnfs.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) -c libnfs.c -o $@ mount.h: mount.x - @echo Generating $@ - rpcgen -h mount.x > mount.h + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -h mount.x > mount.h nfs.h: nfs.x - @echo Generating $@ - rpcgen -h nfs.x > nfs.h + $(NQ) ' CC ' $@ + $(Q)rpcgen -h nfs.x > nfs.h mount_xdr.o: mount_xdr.c mount.h - @echo Compiling $@ - gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_xdr.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_xdr.c -o $@ mount_xdr.c: mount.x - @echo Generating $@ - rpcgen -c mount.x > mount_xdr.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -c mount.x > mount_xdr.c mount_client.o: mount_client.c mount.h - @echo Compiling $@ - gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_client.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c mount_client.c -o $@ mount_client.c: mount.x - @echo Generating $@ - rpcgen -l mount.x > mount_client.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -l mount.x > mount_client.c nfs_xdr.o: nfs_xdr.c nfs.h - @echo Compiling $@ - gcc $(CFLAGS) $(CFLAGS_RPCGEN) -g -c nfs_xdr.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc $(CFLAGS) $(CFLAGS_RPCGEN) -g -c nfs_xdr.c -o $@ nfs_xdr.c: nfs.x - @echo Generating $@ - rpcgen -c nfs.x > nfs_xdr.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -c nfs.x > nfs_xdr.c nfs_client.o: nfs_client.c nfs.h - @echo Compiling $@ - gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c nfs_client.c -o $@ + $(NQ) ' CC ' $@ + $(Q)gcc -g $(CFLAGS) $(CFLAGS_RPCGEN) -c nfs_client.c -o $@ nfs_client.c: nfs.x - @echo Generating $@ - rpcgen -l nfs.x > nfs_client.c + $(NQ) ' RPCGEN ' $@ + $(Q)rpcgen -l nfs.x > nfs_client.c doc/dbench.1.html: doc/dbench.1.xml - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< + $(NQ) 'GEN-HTML ' $@ + $(Q)-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< doc/dbench.1: doc/dbench.1.xml - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + $(NQ) 'GEN-MAN ' $@ + $(Q)-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< doc: doc/dbench.1 doc/dbench.1.html # Careful here: don't install client.txt over itself. install: all - mkdir -p $(DESTDIR)$(bindir) - mkdir -p $(DESTDIR)$(docdir)/loadfiles - mkdir -p $(DESTDIR)$(mandir)/man1 - ${INSTALLCMD} dbench $(DESTDIR)$(bindir) - ${INSTALLCMD} loadfiles/client.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/nfs.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/nfs_2.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb_1.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb_2.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/smb_3.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/iscsi.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} loadfiles/scsi.txt $(DESTDIR)$(docdir)/loadfiles - ${INSTALLCMD} -m644 dbench.1 $(DESTDIR)$(mandir)/man1 + $(NQ) ' INSTALL ' $@ + $(Q)mkdir -p $(DESTDIR)$(bindir) + $(Q)mkdir -p $(DESTDIR)$(docdir)/loadfiles + $(Q)(mkdir -p $(DESTDIR)$(mandir)/man1 + $(Q)${INSTALLCMD} dbench $(DESTDIR)$(bindir) + $(Q)${INSTALLCMD} loadfiles/client.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/nfs.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/nfs_2.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb_1.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb_2.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/smb_3.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/iscsi.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} loadfiles/scsi.txt $(DESTDIR)$(docdir)/loadfiles + $(Q)${INSTALLCMD} -m644 dbench.1 $(DESTDIR)$(mandir)/man1 clean: - rm -f *.[ao] *~ dbench tbench_srv - rm -f mount.h mount_xdr.c mount_client.c - rm -f nfs.h nfs_xdr.c nfs_client.c + $(NQ) ' CLEAN ' $@ + $(Q)rm -f *.[ao] *~ dbench tbench_srv + $(Q)rm -f mount.h mount_xdr.c mount_client.c + $(Q)rm -f nfs.h nfs_xdr.c nfs_client.c proto: - ./mkproto.pl *.c > proto.h + $(NQ) ' MKPROTO ' $@ + $(Q)./mkproto.pl *.c > proto.h From patchwork Wed Feb 9 22:26:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9054CC433F5 for ; Wed, 9 Feb 2022 22:26:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235465AbiBIW0m (ORCPT ); Wed, 9 Feb 2022 17:26:42 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235466AbiBIW0P (ORCPT ); Wed, 9 Feb 2022 17:26:15 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4684E00E26B for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=STaFeoEGn3B0DfEkUnqi8MP96mUb5G8OJkeNgh9O9Js=; b=DsQ9xspHoNkptkZbN6e2eNu1mN lpOzyjc922HqffnudsEPHdvHmZnJe641/kIHm0BHNhEiKa5WoF6Bu4CuQ49/JCin1kdg2Hugr3fth RtVgwfiepEJo/oPD0o6IlzytuMQ8fPH1pO6ty0oLua6MN95zwEyeECVIWvwh57D2w+7sFM8JHYdwR rVky9NaxW0NDdF6SidQwc/UooaeRvl/157VMmhF2zKFdl6NXevHhM1sSOU1ppZFEW8QSwx2gXtwZR wvVNuJ0gvmx42pmSg5jMSNFPGLRrQOfwy5y7iW/dYZiBK1UtOHBo2IakljHb/aWHbfyBrEUxHmjWx 1nYXtxyA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q71-Cm; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 22/25] Makefile.in: declare datarootdir Date: Wed, 9 Feb 2022 14:26:07 -0800 Message-Id: <20220209222610.438470-23-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This shuts up a complaint from ./configure Signed-off-by: Luis Chamberlain --- Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.in b/Makefile.in index eb84399..43890d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,6 +4,7 @@ srcdir=@srcdir@ VPATH=@srcdir@ prefix=@prefix@ +datarootdir = @datarootdir@ exec_prefix=@exec_prefix@ bindir=@bindir@ mandir=@mandir@ From patchwork Wed Feb 9 22:26:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741014 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB549C433FE for ; Wed, 9 Feb 2022 22:26:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235487AbiBIW0s (ORCPT ); Wed, 9 Feb 2022 17:26:48 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235504AbiBIW0Q (ORCPT ); Wed, 9 Feb 2022 17:26:16 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAE47E016466 for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=XwfrC/j/2QuPyaMi1BUKKWvKRDzHJESk2Ms0iB801hs=; b=rNuLpwBZTSMQoygBeQmGy4uwWV mDIBX8IE7bynr7Zee4Ego2Oite9RabFO2GvWUiEQRIrXIJyUTs1bQep1uG3PCQ8fQIP8t7sR7wH4l 1L9PakJKdwn6QBBfok1HIWyHvJBQ3AmTm9xqN+nG44d3F0eZhcqG+GKJrgBI0MEHK1G21Sq9WW9k0 MXRs+0nV+LBXAJLLgkTz5g37rCHUHXSTBM2QDOQ/9O8+/xgN8SDlIKf3Jybp7CwXjBIWCCZ0ozFmv fRu2sKxigDhOQqtVT8tyjp/eNN8fenwCjry8dnFYpYSyntIbkJd/o9Eiz76AwZIZMT6yBsTknod9j 4BZ6TuSw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q73-E5; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 23/25] configure.ac: fix smbclient detection Date: Wed, 9 Feb 2022 14:26:08 -0800 Message-Id: <20220209222610.438470-24-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org We need to ask smbclient for the cflags, otherwise the headers won't be found. Signed-off-by: Luis Chamberlain --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b8c26fe..93763d4 100644 --- a/configure.ac +++ b/configure.ac @@ -113,7 +113,7 @@ fi AC_MSG_CHECKING(whether libsmbclient is available) ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" -CFLAGS="$CFLAGS $GLIB_CFLAGS" +CFLAGS="$CFLAGS $GLIB_CFLAGS $(pkg-config --cflags smbclient)" LIBS="$GLIB_LIBS $LIBS -lsmbclient" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include From patchwork Wed Feb 9 22:26:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741012 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49213C433EF for ; Wed, 9 Feb 2022 22:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235466AbiBIW0o (ORCPT ); Wed, 9 Feb 2022 17:26:44 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235491AbiBIW0Q (ORCPT ); Wed, 9 Feb 2022 17:26:16 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C556BE01645B for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=7Il0Euxol344BZBPASZC2uXMSVMFlhzRHesNoHCtBJ4=; b=X8bkqfV6ZJilQy7Rbb0/U2EUzf 2NLH8LtB/f27hKCe0IGwAQHNXQTAGL2QAmMc30USAE2pV+mFj3wJ5K4yu1dVvHNGObYwCT0lbRes9 gdK4qU8OqCnJRLBuFDrauPF0n0LYNSn748LEGDvsdoxEuVSzD5BfS0Pbhxf6zw0vKa0uPWasfbweC IyNWwC0f31qCF8ZDwHoBXGCh9Vo0+atVAS719Wa0n4AyC+FKmPtsgTmB6Ogf6oJkwHsXMt1ovN/Xn 1G6cZpbgiq+yTDIkV4vX4N63GVmn+CitSrNZVfxjbirvSjw1LiIIrQ1DBoodqZu8u3FfKPCCLsyFc 3FTj4ckw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q7H-GC; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 24/25] libiscsi: fix compile warning on data types Date: Wed, 9 Feb 2022 14:26:09 -0800 Message-Id: <20220209222610.438470-25-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This fixes this compilation warning: libiscsi.c: In function ‘iscsi_write10’: libiscsi.c:119:40: warning: pointer targets in passing argument 4 of ‘iscsi_write10_sync’ differ in signedness [-Wpointer-sign] 119 | data, xferlen*512, 512, | ^~~~ | | | char * In file included from libiscsi.c:26: /usr/include/iscsi/iscsi.h:1200:35: note: expected ‘unsigned char *’ but argument is of type ‘char *’ 1200 | unsigned char *data, uint32_t datalen, int blocksize, | ~~~~~~~~~~~~~~~^~~~ CC Signed-off-by: Luis Chamberlain --- libiscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libiscsi.c b/libiscsi.c index 3bc5771..128a7d5 100644 --- a/libiscsi.c +++ b/libiscsi.c @@ -99,7 +99,7 @@ static void iscsi_write10(struct dbench_op *op) uint32_t xferlen = op->params[1]; int fua = op->params[2]; unsigned int data_size=1024*1024; - char data[data_size]; + unsigned char data[data_size]; sd = op->child->private; From patchwork Wed Feb 9 22:26:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12741013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C4A2C433F5 for ; Wed, 9 Feb 2022 22:26:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233593AbiBIW0u (ORCPT ); Wed, 9 Feb 2022 17:26:50 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:55580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235498AbiBIW0Q (ORCPT ); Wed, 9 Feb 2022 17:26:16 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D6AE01116F for ; Wed, 9 Feb 2022 14:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=ZTgnqvtdkvlTfSC9yQnBs/hw5PlvXbpJWCFkbdyEgE8=; b=c6WKwhhZSU2l3m+V50xm8IyG+b cmwb/AMZHQteAug4nECQW96nN+BcHW+8PdV9GcWnAHrWyJcjBxnvvhEp21BJx+qWWA3Vo4eS70yvG gZACBAzUKlh93wEZLciPBxL4iNXAbB6LhCdWaDJhW0FmhYc3yLpaBOSY6EIY1n8DS++4+1tJ0mW7S GWGx92PjNeHgP/97Xx1SISHggtdwYO6yhqxYiafamOQWbh1yVqe0mSrY5BdLyEZ0qarmEHqDwSDFh 6FF/szEhxXskyJMMJylxAemEkAopzvLho7hs4x+gsW9OGfsyGbJOs1xuQyEb0LCRXlDuM6M8iIetJ QhSMKNow==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHvPj-001q7U-IL; Wed, 09 Feb 2022 22:26:15 +0000 From: Luis Chamberlain To: raymond.barbiero.dev@gmail.com Cc: fstests@vger.kernel.org, jack@suse.cz, mgorman@techsingularity.net, dave@stgolabs.net, Luis Chamberlain Subject: [PATCH 25/25] smb: fix compilation and disable warning on deprecated-declarations Date: Wed, 9 Feb 2022 14:26:10 -0800 Message-Id: <20220209222610.438470-26-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220209222610.438470-1-mcgrof@kernel.org> References: <20220209222610.438470-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org smb.c hasn't been updated in a while, so disable warning on deprecated-declarations for now. An smb eager beaver can go fix this. Signed-off-by: Luis Chamberlain --- Makefile.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile.in b/Makefile.in index 43890d2..a1b6645 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,6 +21,8 @@ CFLAGS+=`pkg-config --cflags libtirpc` CFLAGS+=-Wimplicit-fallthrough=2 CFLAGS_RPCGEN=-Wno-unused-variable CFLAGS_RPCGEN+=-Wno-cast-function-type +SMBCFLAGS=-Wno-deprecated-declarations +SMBCFLAGS+=`pkg-config --cflags smbclient` LIBS+=`pkg-config --libs libtirpc` EXEEXT=@EXEEXT@ @@ -68,6 +70,10 @@ libnfs.o: libnfs.c libnfs.h mount.h nfs.h $(NQ) ' CC ' $@ $(Q)gcc -g $(CFLAGS) -c libnfs.c -o $@ +smb.o: smb.c dbench.h + $(NQ) ' CC ' $@ + $(Q)$(CC) -c $(CPPFLAGS) $(CFLAGS) $(SMBCFLAGS) -o $@ $< + mount.h: mount.x $(NQ) ' RPCGEN ' $@ $(Q)rpcgen -h mount.x > mount.h