From nobody Tue Jun 11 07:39:26 2024 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 4Vz0tQ3hn7z5NrtT; Tue, 11 Jun 2024 07:39:26 +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 4Vz0tQ2BJTz45r1; Tue, 11 Jun 2024 07:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718091566; 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=JwKpq69yxlz18qgXNeDEvupfk9JvomfPXYFyTkK7+3E=; b=ADZtI2K932Rw3AUTBPM3yi6Prw7pT3GpKaZs0jPIazQVOm4zH8MxxjbwgxNGdc7RMeBVjL QQdku36OjQl0L+EykX4zsgUNzEa+XoZHG5tqvuUek9HhjkrZ3w5WU7lXP+tK5ozf0jz04A ZIRsA/nBITUUb545wHwUR6+g7Wk35pHjHgeQ9GJ9kw8IeH2YFXbGpeGpvBc/oEFNIHIrU2 qIlgWmKqYtC6FLdFNqr+9i3HOKvLAGqJL8OwXZzfqYtUgxFSIWiLD+PQQ8a1EKIv056IR+ uM1f+7c/QHTbPVrhw8RkymNZ+fF2N0ZqvmbDrBX0r4EMut9LksjfU7xDSiNJIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718091566; a=rsa-sha256; cv=none; b=NCssFBbRLFackfoOa1nSx37YsI5Y6xwcSkrP8uAmT0fF/voc96xKtvinAPqu6/ZxoxwCMi i5zZAx5RCh+ST12GuIPo7Rjb51J2bXX0ofa8zcpywb1mfmh6Ku9nj8btJhT209v9/U3CPt HWx963iPQt6/Vto2aig78rDfboL7lKqH+06NV9t4beCzBBCbWaurd2EvdqlKjHHX8imOKO oDVhERYca3UxC5MR7gO+2Fj99oDTXSAw8rV9CSSFFdXlPoGabZVCrDhA/Qpuj+UEgSsefE 6wKqFzFXwky6I6xa9u/gZSUFs106a15et22XlupLIq3qpzRfNHcXVPpMdmNDxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718091566; 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=JwKpq69yxlz18qgXNeDEvupfk9JvomfPXYFyTkK7+3E=; b=hrlvKBhL9vVvu+OMylJqJw8TuLFC4SdXU8GFPQXN/cur53DdUGmhKZQfYo75Ou2KHAxe2G xDG9zUJUwhsqHHTlMfiHzP7yTKT8/sZxctpI8S7fh9kGRbmH7X83muecyRzKnor8LFCIHF EUZt/pbxHfZGcQyTEb+blrf9ES1eEDno3uhL5V8P7oIAfe8R0QyTLXC7q2RHtiG0Uq0k5R 04eTDDRVr+ns/V7HTO65Qz1PLrqcD6++0YC5gJpPm2ydCkmAHtrykbNcs/PKZ1QBynKJ75 e4i2Z63x5krz3PBuKcCkOa4ZxHsctKR6aT0Qi0fqKGRXo3NGB5+ENs+u1M5isA== 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 4Vz0tQ1cgsz10kR; Tue, 11 Jun 2024 07:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B7dQRs080010; Tue, 11 Jun 2024 07:39:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B7dQfg080007; Tue, 11 Jun 2024 07:39:26 GMT (envelope-from git) Date: Tue, 11 Jun 2024 07:39:26 GMT Message-Id: <202406110739.45B7dQfg080007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: f65d0b18d937 - main - stress2: Replace rename() with arc4random() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f65d0b18d9372b522e247c7bd58422a7ab3d30d8 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=f65d0b18d9372b522e247c7bd58422a7ab3d30d8 commit f65d0b18d9372b522e247c7bd58422a7ab3d30d8 Author: Peter Holm AuthorDate: 2024-06-11 07:38:13 +0000 Commit: Peter Holm CommitDate: 2024-06-11 07:38:13 +0000 stress2: Replace rename() with arc4random() --- tools/test/stress2/misc/nfsrename.sh | 4 ++-- tools/test/stress2/misc/umountf2.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/nfsrename.sh b/tools/test/stress2/misc/nfsrename.sh index b6513fba1553..864c64aed8ac 100755 --- a/tools/test/stress2/misc/nfsrename.sh +++ b/tools/test/stress2/misc/nfsrename.sh @@ -137,7 +137,7 @@ write_file(void) unlink(path); } - fprintf(fp, "blah blah blah garbage %ld\n", random()); + fprintf(fp, "blah blah blah garbage %ld\n", (long)arc4random()); fclose(fp); if (rename(path, filename) < 0) { warn("rename"); @@ -150,7 +150,7 @@ random_sleep(int base, int slop) { long val; - val = random() % slop; + val = arc4random() % slop; usleep(base + val); } diff --git a/tools/test/stress2/misc/umountf2.sh b/tools/test/stress2/misc/umountf2.sh index 5018a804c403..cd5b53616f97 100755 --- a/tools/test/stress2/misc/umountf2.sh +++ b/tools/test/stress2/misc/umountf2.sh @@ -886,11 +886,12 @@ test(void) { unsigned long offset; unsigned long size = maxoplen; - unsigned long rv = random(); + unsigned long rv; unsigned long op = rv % (3 + !lite + mapped_writes); /* turn off the map read if necessary */ + arc4random_buf(&rv, sizeof(rv)); if (op == 2 && !mapped_reads) op = 0;