Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package util-linux for openSUSE:Factory 
checked in at 2023-06-24 20:13:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/util-linux (Old)
 and      /work/SRC/openSUSE:Factory/.util-linux.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "util-linux"

Sat Jun 24 20:13:25 2023 rev:271 rq:1094821 version:2.39

Changes:
--------
--- /work/SRC/openSUSE:Factory/util-linux/util-linux.changes    2023-05-13 
17:16:55.458133603 +0200
+++ /work/SRC/openSUSE:Factory/.util-linux.new.15902/util-linux.changes 
2023-06-24 20:13:30.863992320 +0200
@@ -1,0 +2,49 @@
+Fri Jun 23 07:35:02 UTC 2023 - Fabian Vogt <fv...@suse.com>
+
+- Add patch to fix regression with mount options handling 
(gh#util-linux/util-linux#2326):
+  * 0001-libmount-fix-sync-options-between-context-and-fs-str.patch
+
+-------------------------------------------------------------------
+Wed Jun 14 13:33:48 UTC 2023 - Fabian Vogt <fv...@suse.com>
+
+- Set --disable-libmount-mountfd-support, it's very broken and needs
+  both util-linux and kernel fixes (gh#util-linux/util-linux#2287)
+
+-------------------------------------------------------------------
+Tue Jun 13 11:48:38 UTC 2023 - Thorsten Kukuk <ku...@suse.com>
+
+- UTIL_LINUX_FOUND_SYSTEMD_DEPS: make grep more robust
+- util-linux-tty-tools: build together with systemd in preparation
+  of util-linux 2.40 together with systemd v254
+
+-------------------------------------------------------------------
+Fri Jun  9 13:35:33 UTC 2023 - Antonio Teixeira <antonio.teixe...@suse.com>
+
+- Upgrade to version 2.39:
+  * blkpr: New command to run persistent reservations ioctls on a device.
+  * pipesz: New command to set or examine pipe and FIFO buffer sizes.
+  * waitpid: New command to wait for arbitrary processes.
+  * mount, libmount: Supports new file descriptors based mount kernel API.
+  * mount, libmount: New mount options X-mount.idmap=, X-mount.auto-fstypes,
+    X-mount.{owner,group,mode}=, rootcontext=@target.
+  * renice: Supports posix-compliant -n (via POSIXLY_CORRECT) and add a new
+    option --relative.
+  * dmesg: Supports subsecond granularity for --since and --until.
+  * dmesg: Option --level accepts '+' prefix or postfix for a level name to 
specify
+    all higher or all lower levels.
+  * blkid, libblkid: Supports bcachefs.
+  * fstrim: New option --types to filter out by filesystem types.
+  * lsblk: --nvme and --virtio are new options to filter out devices.
+  * lsblk: Improves detection of hotplug and removable status.
+  * nsenter: New option --env for allowing environment variables inheritance.
+  * namei: New option -Z to report SELinux contexts.
+  * Many other new features and fixes. For complete list see
+    https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes
+- Dropped upstreamed patches:
+  * fix-lib-internal-cache-size.patch
+  * util-linux-fix-tests-when-at-symbol-in-path.patch
+  * util-linux-honor-noclear-when-reprint-issue.patch
+- Add upstream patch util-linux-fix-tests-with-64k-pagesize.patch
+  * Fixes fadvise tests for ppc64
+
+-------------------------------------------------------------------

Old:
----
  fix-lib-internal-cache-size.patch
  util-linux-2.38.1.tar.sign
  util-linux-2.38.1.tar.xz
  util-linux-fix-tests-when-at-symbol-in-path.patch
  util-linux-honor-noclear-when-reprint-issue.patch

New:
----
  0001-libmount-fix-sync-options-between-context-and-fs-str.patch
  util-linux-2.39.tar.sign
  util-linux-2.39.tar.xz
  util-linux-fix-tests-with-64k-pagesize.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.cVo4Bn/_old  2023-06-24 20:13:32.712003232 +0200
+++ /var/tmp/diff_new_pack.cVo4Bn/_new  2023-06-24 20:13:32.716003255 +0200
@@ -85,11 +85,11 @@
 %endif
 # ulbuild == python
 
-Version:        2.38.1
+Version:        2.39
 Release:        0
 License:        GPL-2.0-or-later
 URL:            https://www.kernel.org/pub/linux/utils/util-linux/
-Source:         
https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-%{version}.tar.xz
+Source:         
https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.xz
 Source2:        util-linux-login_defs-check.sh
 Source3:        util-linux-rpmlintrc
 Source6:        etc_filesystems
@@ -98,7 +98,7 @@
 Source9:        remote.pamd
 Source10:       su.pamd
 Source11:       su.default
-Source12:       
https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-%{version}.tar.sign
+Source12:       
https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.sign
 Source13:       %{_name}.keyring
 Source14:       runuser.pamd
 Source15:       runuser-l.pamd
@@ -110,12 +110,10 @@
 Patch2:         Add-documentation-on-blacklisted-modules-to-mount-8-.patch
 # PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix 
"su -s" bash completion.
 Patch4:         util-linux-bash-completion-su-chsh-l.patch
-# PATCH-FIX-SUSE util-linux-fix-tests-when-@-in-path.patch bsc#1194038 -- 
rpmbuild %checks fail when @ in the directory path
-Patch5:         util-linux-fix-tests-when-at-symbol-in-path.patch
-# 
https://github.com/util-linux/util-linux/commit/0c0fb46dcef6c63c74094486e499e376fdb33a04.diff
-Patch6:         util-linux-honor-noclear-when-reprint-issue.patch
-# Patch-FIX_UPSTREAM: fix-lib-internal-cache-size.patch bsc#1210164 -- 
gh#util-linux/util-linux@2fa4168c8bc9
-Patch7:         fix-lib-internal-cache-size.patch
+# PATCH-FIX-UPSTREAM util-linux-fix-tests-with-64k-pagesize.patch -- fadvise: 
fix tests with 64k pagesize
+Patch5:         util-linux-fix-tests-with-64k-pagesize.patch
+# https://github.com/util-linux/util-linux/pull/2331
+Patch6:         0001-libmount-fix-sync-options-between-context-and-fs-str.patch
 BuildRequires:  audit-devel
 BuildRequires:  bc
 BuildRequires:  binutils-devel
@@ -363,6 +361,14 @@
 Files to develop applications using the library to generate universally
 unique IDs (UUIDs).
 
+%lang_package
+%endif
+# ulsubset == core
+
+####################
+# Systemd packages #
+####################
+%if "%ulsubset" == "systemd"
 %package -n util-linux-tty-tools
 Summary:        Tools for writing to TTYs
 License:        BSD-3-Clause
@@ -376,14 +382,6 @@
 %description -n util-linux-tty-tools
 Tools that write to TTYs that the current user does not own.
 
-%lang_package
-%endif
-# ulsubset == core
-
-####################
-# Systemd packages #
-####################
-%if "%ulsubset" == "systemd"
 %package -n uuidd
 Summary:        Helper daemon to guarantee uniqueness of time-based UUIDs
 License:        GPL-2.0-or-later
@@ -495,6 +493,7 @@
        --enable-fs-paths-default="/sbin:/usr/sbin"\
        --enable-static\
        --with-vendordir=%{_distconfdir} \
+       --disable-libmount-mountfd-support \
        $configure_options
 make %{?_smp_mflags}
 }
@@ -528,7 +527,7 @@
 #
 # WARNING: Never edit following line without doing all suggested in the echo 
below!
 UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/findmnt.c 
./misc-utils/logger.c ./misc-utils/lsblk-properties.c ./misc-utils/uuidd.c '
-UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIB\(SYSTEMD\|UDEV\)' . | grep 
-F '.c' | LC_ALL=C sort | tr '\n' ' ')
+UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(find . -type f -name "*.c" -exec grep -l 
'#.*if.*HAVE_LIB\(SYSTEMD\|\UDEV\)' '{}' '+' | LC_ALL=C sort | tr '\n' ' ')
 if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; 
then
        echo "List of utilities depending on systemd have changed.
 Please check the new util-linux-systemd file list, file removal and update of 
Conflicts for safe update!
@@ -718,11 +717,14 @@
 %verifyscript
 %verify_permissions -e %{_bindir}/mount -e %{_bindir}/umount
 %verify_permissions -e %{_bindir}/su
+%endif
+%dnl # ulsubset == core, ulbuild == base
 
+%if "%ulsubset" == "systemd"
 %verifyscript -n util-linux-tty-tools
 %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write
 %endif
-%dnl # ulsubset == core, ulbuild == base
+%dnl # ulsubset == systemd, ulbuild == base
 
 %endif
 %dnl # ulbuild == base
@@ -797,9 +799,6 @@
 
 %postun -n libfdisk1 -p /sbin/ldconfig
 
-%post -n util-linux-tty-tools
-%set_permissions %{_bindir}/wall %{_bindir}/write
-
 %endif
 %dnl # ulsubset == core, pre & post
 %dnl
@@ -845,6 +844,9 @@
 %postun -n uuidd
 %{service_del_postun uuidd.socket uuidd.service}
 
+%post -n util-linux-tty-tools
+%set_permissions %{_bindir}/wall %{_bindir}/write
+
 %endif
 %dnl # ulsubset == systemd, pre & post
 %dnl
@@ -938,6 +940,7 @@
 %core %{_bindir}/colrm
 %core %{_bindir}/column
 %core %{_bindir}/dmesg
+%core %{_bindir}/fadvise
 %core %{_bindir}/fallocate
 %core %{_bindir}/fincore
 
@@ -973,6 +976,7 @@
 %core %verify(not mode) %attr(%ul_suid,root,root) %{_bindir}/mount
 %core %{_bindir}/namei
 %core %{_bindir}/nsenter
+%core %{_bindir}/pipesz
 %core %{_bindir}/prlimit
 %core %{_bindir}/rename
 %core %{_bindir}/renice
@@ -993,11 +997,13 @@
 %core %{_bindir}/uuidgen
 %core %{_bindir}/uuidparse
 %core %{_bindir}/uname26
+%core %{_bindir}/waitpid
 %core %{_bindir}/wdctl
 %core %{_sbindir}/addpart
 %core %{_sbindir}/agetty
 %core %{_sbindir}/blkid
 %core %{_sbindir}/blkdiscard
+%core %{_sbindir}/blkpr
 
 # blkzone depends on linux/blkzoned.h
 %if 0%{?suse_version} >= 1330
@@ -1128,6 +1134,7 @@
 %core %{_mandir}/man1/column.1.gz
 %core %{_mandir}/man1/dmesg.1.gz
 %core %{_mandir}/man1/eject.1.gz
+%core %{_mandir}/man1/fadvise.1.gz
 %core %{_mandir}/man1/fallocate.1.gz
 %core %{_mandir}/man1/fincore.1.gz
 %core %{_mandir}/man1/flock.1.gz
@@ -1152,6 +1159,7 @@
 %core %{_mandir}/man1/nsenter.1.gz
 %core %{_mandir}/man1/ionice.1.gz
 %core %{_mandir}/man1/irqtop.1.gz
+%core %{_mandir}/man1/pipesz.1.gz
 %core %{_mandir}/man1/prlimit.1.gz
 %core %{_mandir}/man1/rename.1.gz
 %core %{_mandir}/man1/rev.1.gz
@@ -1173,6 +1181,7 @@
 %core %{_mandir}/man1/utmpdump.1.gz
 %core %{_mandir}/man1/uuidgen.1.gz
 %core %{_mandir}/man1/uuidparse.1.gz
+%core %{_mandir}/man1/waitpid.1.gz
 %core %{_mandir}/man5/adjtime_config.5.gz
 %core %{_mandir}/man5/fstab.5.gz
 %core %{_mandir}/man5/terminal-colors.d.5.gz
@@ -1185,6 +1194,7 @@
 # suse_version >= 1330
 
 %core %{_mandir}/man8/blockdev.8.gz
+%core %{_mandir}/man8/blkpr.8.gz
 %core %{_mandir}/man8/chmem.8.gz
 %core %{_mandir}/man8/ctrlaltdel.8.gz
 %core %{_mandir}/man8/delpart.8.gz
@@ -1305,6 +1315,7 @@
 %exclude %{_datadir}/bash-completion/completions/dmesg
 %exclude %{_datadir}/bash-completion/completions/eject
 %exclude %{_datadir}/bash-completion/completions/fallocate
+%exclude %{_datadir}/bash-completion/completions/fadvise
 %exclude %{_datadir}/bash-completion/completions/fdformat
 %exclude %{_datadir}/bash-completion/completions/fdisk
 %exclude %{_datadir}/bash-completion/completions/fincore
@@ -1348,6 +1359,7 @@
 %exclude %{_datadir}/bash-completion/completions/namei
 %exclude %{_datadir}/bash-completion/completions/nsenter
 %exclude %{_datadir}/bash-completion/completions/partx
+%exclude %{_datadir}/bash-completion/completions/pipesz
 %exclude %{_datadir}/bash-completion/completions/pivot_root
 %exclude %{_datadir}/bash-completion/completions/prlimit
 %exclude %{_datadir}/bash-completion/completions/readprofile
@@ -1379,6 +1391,7 @@
 %exclude %{_datadir}/bash-completion/completions/utmpdump
 %exclude %{_datadir}/bash-completion/completions/uuidgen
 %exclude %{_datadir}/bash-completion/completions/uuidparse
+%exclude %{_datadir}/bash-completion/completions/waitpid
 %exclude %{_datadir}/bash-completion/completions/wdctl
 %exclude %{_datadir}/bash-completion/completions/whereis
 %exclude %{_datadir}/bash-completion/completions/wipefs
@@ -1478,18 +1491,6 @@
 %{_libdir}/libuuid.so.1
 %{_libdir}/libuuid.so.1.*
 
-%files -n util-linux-tty-tools
-%{_bindir}/mesg
-%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall
-%verify(not mode) %attr(0755,root,tty) %{_bindir}/write
-%{_mandir}/man1/mesg.1.gz
-%{_mandir}/man1/wall.1.gz
-%{_mandir}/man1/write.1.gz
-
-%{_datadir}/bash-completion/completions/wall
-%{_datadir}/bash-completion/completions/write
-%{_datadir}/bash-completion/completions/mesg
-
 # devel, lang and uuidd files are not packaged in staging mode
 # and packaged separately in full mode
 # FIXME: Is it needed?
@@ -1560,6 +1561,19 @@
 %{_sbindir}/rcuuidd
 %{_unitdir}/uuidd.service
 %{_unitdir}/uuidd.socket
+
+%files -n util-linux-tty-tools
+%{_bindir}/mesg
+%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall
+%verify(not mode) %attr(0755,root,tty) %{_bindir}/write
+%{_mandir}/man1/mesg.1.gz
+%{_mandir}/man1/wall.1.gz
+%{_mandir}/man1/write.1.gz
+
+%{_datadir}/bash-completion/completions/wall
+%{_datadir}/bash-completion/completions/write
+%{_datadir}/bash-completion/completions/mesg
+
 %endif
 # ulsubset == systemd
 

++++++ 0001-libmount-fix-sync-options-between-context-and-fs-str.patch ++++++
>From 7b37d5b5667103beac16f7ae3cca5feaf00a21b0 Mon Sep 17 00:00:00 2001
From: Karel Zak <k...@redhat.com>
Date: Thu, 22 Jun 2023 13:11:57 +0200
Subject: [PATCH] libmount: fix sync options between context and fs structs

Since v2.39 libmount prefers "struct libmnt_optlist" to keep mount options
rather than the original "struct libmnt_fs". This is problem if the
"fs" struct is defined and maintained outside the context.

The library has already a way how to sync "fs" and "optlist", but this
needs to be improved and used more widely. Changes:

* force "fs" from context to always read options from "optlist"

* copy options from "fs" to "optlist" in mnt_context_set_fs()

* internally redirect mnt_fs_* API for options to "optlist" if optlist
  defined

* add simple test to make sure options from different sources are
  always merged together

Addresses: https://github.com/util-linux/util-linux/issues/2326
Signed-off-by: Karel Zak <k...@redhat.com>
---
 libmount/src/context.c | 82 ++++++++++++++++++++++++++++++++++++++++--
 libmount/src/fs.c      | 23 +++++++++---
 2 files changed, 97 insertions(+), 8 deletions(-)

diff --git a/libmount/src/context.c b/libmount/src/context.c
index 4c5e65659..0cd320190 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -911,9 +911,29 @@ int mnt_context_set_fs(struct libmnt_context *cxt, struct 
libmnt_fs *fs)
        if (!cxt)
                return -EINVAL;
 
+       if (cxt->fs == fs)
+               return 0;
+
        DBG(CXT, ul_debugobj(cxt, "setting new FS"));
-       mnt_ref_fs(fs);                 /* new */
-       mnt_unref_fs(cxt->fs);          /* old */
+
+       /* new */
+       if (fs) {
+               struct libmnt_optlist *ol = mnt_context_get_optlist(cxt);
+
+               if (!ol)
+                       return -ENOMEM;
+
+               mnt_ref_fs(fs);
+
+               mnt_optlist_set_optstr(ol, mnt_fs_get_options(fs), NULL);
+               mnt_fs_follow_optlist(fs, ol);
+       }
+
+       /* old */
+       if (cxt->fs)
+               mnt_fs_follow_optlist(cxt->fs, NULL);
+       mnt_unref_fs(cxt->fs);
+
        cxt->fs = fs;
        return 0;
 }
@@ -932,8 +952,17 @@ struct libmnt_fs *mnt_context_get_fs(struct libmnt_context 
*cxt)
 {
        if (!cxt)
                return NULL;
-       if (!cxt->fs)
+       if (!cxt->fs) {
+               struct libmnt_optlist *ol = mnt_context_get_optlist(cxt);
+
+               if (!ol)
+                       return NULL;
                cxt->fs = mnt_new_fs();
+               if (!cxt->fs)
+                       return NULL;
+
+               mnt_fs_follow_optlist(cxt->fs, ol);
+       }
        return cxt->fs;
 }
 
@@ -3314,6 +3343,50 @@ static int test_flags(struct libmnt_test *ts, int argc, 
char *argv[])
        return rc;
 }
 
+static int test_cxtsync(struct libmnt_test *ts, int argc, char *argv[])
+{
+       struct libmnt_context *cxt;
+       struct libmnt_fs *fs;
+       unsigned long flags = 0;
+       int rc;
+
+       if (argc != 4)
+               return -EINVAL;
+
+       fs = mnt_new_fs();
+       if (!fs)
+               return -ENOMEM;
+
+       rc = mnt_fs_set_options(fs, argv[1]);
+       if (rc)
+               return rc;
+
+       cxt = mnt_new_context();
+       if (!cxt)
+               return -ENOMEM;
+
+       rc = mnt_context_set_fs(cxt, fs);
+       if (rc)
+               return rc;
+
+       rc = mnt_context_append_options(cxt, argv[2]);
+       if (rc)
+               return rc;
+
+       rc = mnt_fs_append_options(fs, argv[3]);
+       if (rc)
+               return rc;
+
+       mnt_context_get_mflags(cxt, &flags);
+
+       printf("     fs options: %s\n", mnt_fs_get_options(fs));
+       printf("context options: %s\n", mnt_context_get_options(cxt));
+       printf(" context mflags: %08lx\n", flags);
+
+       mnt_free_context(cxt);
+       return 0;
+}
+
 static int test_mountall(struct libmnt_test *ts, int argc, char *argv[])
 {
        struct libmnt_context *cxt;
@@ -3361,6 +3434,8 @@ static int test_mountall(struct libmnt_test *ts, int 
argc, char *argv[])
        return 0;
 }
 
+
+
 int main(int argc, char *argv[])
 {
        struct libmnt_test tss[] = {
@@ -3368,6 +3443,7 @@ int main(int argc, char *argv[])
        { "--umount", test_umount, "[-t <type>] [-f][-l][-r] <src>|<target>" },
        { "--mount-all", test_mountall,  "[-O <pattern>] [-t <pattern] mount 
all filesystems from fstab" },
        { "--flags", test_flags,   "[-o <opts>] <spec>" },
+       { "--cxtsync", test_cxtsync, "<fsopts> <cxtopts> <fsopts>" },
        { "--search-helper", test_search_helper, "<fstype>" },
        { NULL }};
 
diff --git a/libmount/src/fs.c b/libmount/src/fs.c
index 655f07171..79e32a170 100644
--- a/libmount/src/fs.c
+++ b/libmount/src/fs.c
@@ -228,10 +228,14 @@ int mnt_fs_follow_optlist(struct libmnt_fs *fs, struct 
libmnt_optlist *ol)
 
        if (fs->optlist == ol)
                return 0;
+       if (fs->optlist)
+               mnt_unref_optlist(fs->optlist);
 
        fs->opts_age = 0;
        fs->optlist = ol;
-       mnt_ref_optlist(ol);
+
+       if (ol)
+               mnt_ref_optlist(ol);
        return 0;
 }
 
@@ -919,7 +923,11 @@ int mnt_fs_set_options(struct libmnt_fs *fs, const char 
*optstr)
 
        if (!fs)
                return -EINVAL;
-       fs->opts_age = 0;
+
+       if (fs->optlist) {
+               fs->opts_age = 0;
+               return mnt_optlist_set_optstr(fs->optlist, optstr, NULL);
+       }
 
        if (optstr) {
                int rc = mnt_split_optstr(optstr, &u, &v, &f, 0, 0);
@@ -968,8 +976,10 @@ int mnt_fs_append_options(struct libmnt_fs *fs, const char 
*optstr)
                return -EINVAL;
        if (!optstr)
                return 0;
-
-       fs->opts_age = 0;
+       if (fs->optlist) {
+               fs->opts_age = 0;
+               return mnt_optlist_append_optstr(fs->optlist, optstr, NULL);
+       }
 
        rc = mnt_split_optstr(optstr, &u, &v, &f, 0, 0);
        if (rc)
@@ -1013,7 +1023,10 @@ int mnt_fs_prepend_options(struct libmnt_fs *fs, const 
char *optstr)
        if (!optstr)
                return 0;
 
-       fs->opts_age = 0;
+       if (fs->optlist) {
+               fs->opts_age = 0;
+               return mnt_optlist_prepend_optstr(fs->optlist, optstr, NULL);
+       }
 
        rc = mnt_split_optstr(optstr, &u, &v, &f, 0, 0);
        if (rc)
-- 
2.41.0


++++++ util-linux-2.38.1.tar.xz -> util-linux-2.39.tar.xz ++++++
/work/SRC/openSUSE:Factory/util-linux/util-linux-2.38.1.tar.xz 
/work/SRC/openSUSE:Factory/.util-linux.new.15902/util-linux-2.39.tar.xz differ: 
char 15, line 1

++++++ util-linux-fix-tests-with-64k-pagesize.patch ++++++
>From 8b36444f447949c3ab477f2c43b45a94c30ee7bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <tho...@t-8ch.de>
Date: Sun, 21 May 2023 21:42:14 +0200
Subject: [PATCH 1/4] fadvise: (test) dynamically calculate expected test
 values
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Thomas Weißschuh <tho...@t-8ch.de>
---
 tests/ts/fadvise/drop | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 7c7eee5dc..86c0d5b0a 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -16,7 +16,7 @@ ts_check_prog "sleep"
 ts_cd "$TS_OUTDIR"
 
 FILE="ddtest"
-BS=4k
+BS=4096
 COUNT=8
 
 FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
@@ -41,22 +41,22 @@ create_file() {
     echo
 
     create_file
-    echo "offset: 8192"
-    "$TS_CMD_FADVISE" -o 8192 "$FILE"
+    echo "offset: $(( 2 * $BS ))"
+    "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE"
     echo status: $?
     "$TS_CMD_FINCORE" "$FILE"
     echo
 
     create_file
-    echo "length: 16384"
-    "$TS_CMD_FADVISE" -l 16384 "$FILE"
+    echo "length: $(( 4 * $BS ))"
+    "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE"
     echo status: $?
     "$TS_CMD_FINCORE" "$FILE"
     echo
 
     create_file
-    echo "offset: 8192, length: 16384 fd: 42"
-    "$TS_CMD_FADVISE" -o 8192 -l 16384 --fd 42 42<"$FILE"
+    echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42"
+    "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE"
     echo status: $?
     "$TS_CMD_FINCORE" "$FILE"
     echo
-- 
2.40.0


>From e5009e773fc801eca887dd43b721cd1b1aa327be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <tho...@t-8ch.de>
Date: Sun, 21 May 2023 21:43:38 +0200
Subject: [PATCH 2/4] fadvise: (tests) factor out calls to "fincore"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This will make it easier to pass argument later.

Signed-off-by: Thomas Weißschuh <tho...@t-8ch.de>
---
 tests/ts/fadvise/drop | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 86c0d5b0a..8869b7da4 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -28,37 +28,41 @@ create_file() {
     dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null
 }
 
+do_fincore() {
+    "$TS_CMD_FINCORE" "$FILE"
+}
+
 {
     create_file
-    "$TS_CMD_FINCORE" "$FILE"
+    do_fincore
     echo
 
     create_file
     echo "whole file"
     "$TS_CMD_FADVISE" "$FILE"
     echo status: $?
-    "$TS_CMD_FINCORE" "$FILE"
+    do_fincore
     echo
 
     create_file
     echo "offset: $(( 2 * $BS ))"
     "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE"
     echo status: $?
-    "$TS_CMD_FINCORE" "$FILE"
+    do_fincore
     echo
 
     create_file
     echo "length: $(( 4 * $BS ))"
     "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE"
     echo status: $?
-    "$TS_CMD_FINCORE" "$FILE"
+    do_fincore
     echo
 
     create_file
     echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42"
     "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE"
     echo status: $?
-    "$TS_CMD_FINCORE" "$FILE"
+    do_fincore
     echo
 
     rm "$FILE"
-- 
2.40.0


>From 33980996d0b429fc59c40f8352633c0a21a0f96a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <tho...@t-8ch.de>
Date: Sun, 21 May 2023 21:44:20 +0200
Subject: [PATCH 3/4] fadvise: (test) don't compare fincore page counts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

These depend on the machines pagesize and are therefore not a good
comparision.

Signed-off-by: Thomas Weißschuh <tho...@t-8ch.de>
---
 tests/expected/fadvise/drop | 20 ++++++++++----------
 tests/ts/fadvise/drop       |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop
index f2360b56f..25f23e050 100644
--- a/tests/expected/fadvise/drop
+++ b/tests/expected/fadvise/drop
@@ -1,23 +1,23 @@
-  RES PAGES SIZE FILE
-  32K     8  32K ddtest
+  RES SIZE FILE
+  32K  32K ddtest
 
 whole file
 status: 0
-RES PAGES SIZE FILE
- 0B     0  32K ddtest
+RES SIZE FILE
+ 0B  32K ddtest
 
 offset: 8192
 status: 0
-RES PAGES SIZE FILE
- 8K     2  32K ddtest
+RES SIZE FILE
+ 8K  32K ddtest
 
 length: 16384
 status: 0
-  RES PAGES SIZE FILE
-  16K     4  32K ddtest
+  RES SIZE FILE
+  16K  32K ddtest
 
 offset: 8192, length: 16384 fd: 42
 status: 0
-  RES PAGES SIZE FILE
-  16K     4  32K ddtest
+  RES SIZE FILE
+  16K  32K ddtest
 
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 8869b7da4..6c4298e87 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -29,7 +29,7 @@ create_file() {
 }
 
 do_fincore() {
-    "$TS_CMD_FINCORE" "$FILE"
+    "$TS_CMD_FINCORE" -o RES,SIZE,FILE "$FILE"
 }
 
 {
-- 
2.40.0


>From c0f31b79f5d1c665cdc057fb32f4d161d28aa5b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <tho...@t-8ch.de>
Date: Sun, 21 May 2023 21:45:10 +0200
Subject: [PATCH 4/4] fadvise: (test) test with 64k blocks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This will allow the tests to also pass on systems with 64k pagesizes.

Closes #2249
Signed-off-by: Thomas Weißschuh <tho...@t-8ch.de>
---
 tests/expected/fadvise/drop | 26 +++++++++++++-------------
 tests/ts/fadvise/drop       |  2 +-
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop
index 25f23e050..e7bb26b6e 100644
--- a/tests/expected/fadvise/drop
+++ b/tests/expected/fadvise/drop
@@ -1,23 +1,23 @@
-  RES SIZE FILE
-  32K  32K ddtest
+  RES  SIZE FILE
+ 512K  512K ddtest
 
 whole file
 status: 0
-RES SIZE FILE
- 0B  32K ddtest
+RES  SIZE FILE
+ 0B  512K ddtest
 
-offset: 8192
+offset: 131072
 status: 0
-RES SIZE FILE
- 8K  32K ddtest
+  RES  SIZE FILE
+ 128K  512K ddtest
 
-length: 16384
+length: 262144
 status: 0
-  RES SIZE FILE
-  16K  32K ddtest
+  RES  SIZE FILE
+ 256K  512K ddtest
 
-offset: 8192, length: 16384 fd: 42
+offset: 131072, length: 262144 fd: 42
 status: 0
-  RES SIZE FILE
-  16K  32K ddtest
+  RES  SIZE FILE
+ 256K  512K ddtest
 
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 6c4298e87..45dcb9110 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -16,7 +16,7 @@ ts_check_prog "sleep"
 ts_cd "$TS_OUTDIR"
 
 FILE="ddtest"
-BS=4096
+BS=65536
 COUNT=8
 
 FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
-- 
2.40.0

Reply via email to