From nobody Tue Mar 01 17:24:41 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7B67819FFC78; Tue, 1 Mar 2022 17:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K7PJ92mBWz4X7T; Tue, 1 Mar 2022 17:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646155481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJFftVEKYyDOR9GdQ5Pdu7WUCCGdyB+TmopTSlCVfCs=; b=euSZO16BsHTdhWeKkRTfsDjqwhXL+W0xUMsBDKMDssENg/Vj5+/ejirY1W4ViHQHWIeXJb kwlSDARKpYcBoI4hhJ3gUKnxokOEeZCZR+7AQnoNXSSbAZUSWoGtconU5jUCjkAGoAo1J8 IRxZvCsgTfbc2QhC6PLZSiWjNcTlYdzRxA8CVgFeZ36AkFsFWWjDTxk92S/jAzA4a7eToB bbRl1osU4MeJE+yti4zeun9M3QOIWQBZ4WbYL0dhnxHj5ZOpaG65bTduTF0/wp6bdqToK2 DMA7LZ51/wHWM4OFjEo6IRjXFD/MdTR2+GarS97/FrpHfPDDjYNZrgJ9g/j9Pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 406A2136C4; Tue, 1 Mar 2022 17:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 221HOfdn067755; Tue, 1 Mar 2022 17:24:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 221HOfeS067754; Tue, 1 Mar 2022 17:24:41 GMT (envelope-from git) Date: Tue, 1 Mar 2022 17:24:41 GMT Message-Id: <202203011724.221HOfeS067754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f27fb06cadc6 - main - zfs: Update test format strings to match variable typtes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f27fb06cadc6a8e75ebebd3b60c8a9dc9ae1b833 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646155481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJFftVEKYyDOR9GdQ5Pdu7WUCCGdyB+TmopTSlCVfCs=; b=TzfaAt8+Gue5WN6cDuR+2tfLncESnrvayFQKpQDXdQy5XlHxiKYiHE4g3+a2E/PKh7L3DO ucz0NeS2E08BOlEpjPrxunV/rXGSE2QOFxKmWGqDHPDYfFvMUaBVIaAIyTd0VouxiHZs3T SZkOE0gj29qugPYJhk+FF0adNsNyZRbsckB0XRp0uWYYcwhMDYvqXh3Lrds1U3Goa3GpqW Ba1b4SWkNOO4OFqEZR8Wv+KY87GWEIELa5UnUubZObf7rKFdIuqXSahSsZ6iZhcnE2J9yj MAjxtfOGe3guUtWmIiEX3eX2+G7B2WhH4Kvg52hKGdUB1JlEhSXwJRcVZziOiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646155481; a=rsa-sha256; cv=none; b=x6uHnGD9BYoHOVjDl9Z5tgFXkEp/S5Y8YZIsp7j/Afm+FP+zdeINstsgNRL+9M6GjEqxs4 NMLjGwaInQLLRt+S8eDPoKnqeojk+Hzg/3RoD8xIW5qAulPKcVHWe9+V2cS5PzufTWNbt9 E6Z5gHRkfIie5rJ4K23WmjPj7GQr4MsM55B8IReQd3p7Sk0fTZgFKyjSfpW662P0UZX/cK lMXY0N7iBlywkLgdI7djye2y0R04u9dSnbRIYDybUrAj2h9Txi8oUl8J11Q0Zh15fwJ++2 ekW3UosiQ9aueVioDD01zKinOEPXwwRtAUzTDNzAsNbu820nHjr3aq1gf/6aFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f27fb06cadc6a8e75ebebd3b60c8a9dc9ae1b833 commit f27fb06cadc6a8e75ebebd3b60c8a9dc9ae1b833 Author: Ed Maste AuthorDate: 2022-02-28 01:11:20 +0000 Commit: Ed Maste CommitDate: 2022-03-01 17:21:40 +0000 zfs: Update test format strings to match variable typtes And drop stray 'd' from the end of some printed numbers. I assume this was the result of someone thinking u is a printf length modifier for d, not a format specifier itself. Reviewed by: kevans, rew MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34387 --- tests/sys/cddl/zfs/bin/readmmap.c | 8 ++++---- tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c | 4 ++-- tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c | 4 ++-- tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/sys/cddl/zfs/bin/readmmap.c b/tests/sys/cddl/zfs/bin/readmmap.c index 117246a8c2c4..d2dd5605351d 100644 --- a/tests/sys/cddl/zfs/bin/readmmap.c +++ b/tests/sys/cddl/zfs/bin/readmmap.c @@ -83,7 +83,7 @@ main(int argc, char **argv) bytes = write(fd, buf, size); if (bytes != size) { - (void) printf("short write: %d != %ud\n", bytes, size); + (void) printf("short write: %d != %zu\n", bytes, size); retval = 1; goto end; } @@ -114,20 +114,20 @@ main(int argc, char **argv) bytes = pread(fd, buf, size, 0); if (bytes != size) { - (void) printf("short read: %d != %ud\n", bytes, size); + (void) printf("short read: %d != %zu\n", bytes, size); retval = 1; goto end; } if (buf[idx] != 1) { (void) printf( - "bad data from read! got buf[%ud]=%d, expected 1\n", + "bad data from read! got buf[%zu]=%d, expected 1\n", idx, buf[idx]); retval = 1; goto end; } - (void) printf("good data from read: buf[%ud]=1\n", idx); + (void) printf("good data from read: buf[%zu]=1\n", idx); end: if (fd != -1) { (void) close(fd); diff --git a/tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c b/tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c index afccda1a8840..d858cebd26a8 100644 --- a/tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c +++ b/tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c @@ -227,7 +227,7 @@ do_read(const char *pfile) (void) close(fd); if (ret != 0) { - fprintf(stderr, "read(%d, buf, %d)\n", fd, sizeof (buf)); + fprintf(stderr, "read(%d, buf, %zu)\n", fd, sizeof (buf)); exit(1); } @@ -253,7 +253,7 @@ do_write(const char *pfile) (void) close(fd); if (ret != 0) { - fprintf(stderr, "write(%d, buf, %d)\n", fd, strlen(buf)); + fprintf(stderr, "write(%d, buf, %zu)\n", fd, strlen(buf)); exit(1); } diff --git a/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c b/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c index 0daba26579d4..b2d4bf0dc11a 100644 --- a/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c +++ b/tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c @@ -332,7 +332,7 @@ verify_file(int fd, const pattern_t* p_pat){ int file_offset = chunk_start + chunk_offset; if (good_data && (actual_buf[i] != desired_buf[i])){ fprintf(stderr, "fsync_integrity: miscompare at " - "chunk %i, chunk offset %lx, file offset %lx\n", + "chunk %i, chunk offset %x, file offset %x\n", chunk_idx, chunk_offset, file_offset); fprintf(stderr, "Expected %016lx, got %016lx\n", desired_buf[i], actual_buf[i]); @@ -341,7 +341,7 @@ verify_file(int fd, const pattern_t* p_pat){ } else if (!good_data && (actual_buf[i] == desired_buf[i])) { fprintf(stderr, "fsync_integrity: miscompare ends at " - "chunk %i, chunk offset %lx, file offset %lx\n", + "chunk %i, chunk offset %x, file offset %x\n", chunk_idx, chunk_offset, file_offset); good_data = 1; } diff --git a/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c b/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c index 3200fca3bc90..ec1275dfccc0 100644 --- a/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c +++ b/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c @@ -370,7 +370,7 @@ verify_file(int fd, const pattern_t* p_pat){ int file_offset = chunk_start + chunk_offset; if (good_data && (actual_buf[i] != desired_buf[i])){ fprintf(stderr, "txg_integrity: miscompare at " - "chunk %i, chunk offset %lx, file offset %lx\n", + "chunk %i, chunk offset %x, file offset %x\n", chunk_idx, chunk_offset, file_offset); fprintf(stderr, "Expected %16lx, got %16lx\n", desired_buf[i], actual_buf[i]); @@ -379,7 +379,7 @@ verify_file(int fd, const pattern_t* p_pat){ } else if (!good_data && (actual_buf[i] == desired_buf[i])) { fprintf(stderr, "txg_integrity: miscompare ends at " - "chunk %i, chunk offset %lx, file offset %lx\n", + "chunk %i, chunk offset %x, file offset %x\n", chunk_idx, chunk_offset, file_offset); good_data = 1; }