mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: adobriyan@gmail.com, mm-commits@vger.kernel.org, willy@infradead.org
Subject: [folded-merged] proc-mandate-proc_lseek-in-struct-proc_ops-fix.patch removed from -mm tree
Date: Thu, 06 May 2021 17:07:02 -0700	[thread overview]
Message-ID: <20210507000702.iDNd2VHcn%akpm@linux-foundation.org> (raw)


The patch titled
     Subject: proc: smoke test lseek()
has been removed from the -mm tree.  Its filename was
     proc-mandate-proc_lseek-in-struct-proc_ops-fix.patch

This patch was dropped because it was folded into proc-mandate-proc_lseek-in-struct-proc_ops.patch

------------------------------------------------------
From: Alexey Dobriyan <adobriyan@gmail.com>
Subject: proc: smoke test lseek()

Now that ->proc_lseek has been made mandatory it would be nice to test
that nothing has been forgotten.

Link: https://lkml.kernel.org/r/YG4OIhChOrVTPgdN@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/proc/read.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/tools/testing/selftests/proc/read.c~proc-mandate-proc_lseek-in-struct-proc_ops-fix
+++ a/tools/testing/selftests/proc/read.c
@@ -14,7 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 // Test
-// 1) read of every file in /proc
+// 1) read and lseek on every file in /proc
 // 2) readlink of every symlink in /proc
 // 3) recursively (1) + (2) for every directory in /proc
 // 4) write to /proc/*/clear_refs and /proc/*/task/*/clear_refs
@@ -45,6 +45,8 @@ static void f_reg(DIR *d, const char *fi
 	fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK);
 	if (fd == -1)
 		return;
+	/* struct proc_ops::proc_lseek is mandatory if file is seekable. */
+	(void)lseek(fd, 0, SEEK_SET);
 	rv = read(fd, buf, sizeof(buf));
 	assert((0 <= rv && rv <= sizeof(buf)) || rv == -1);
 	close(fd);
_

Patches currently in -mm which might be from adobriyan@gmail.com are

proc-save-loc-in-__xlate_proc_name.patch
proc-mandate-proc_lseek-in-struct-proc_ops.patch
proc-delete-redundant-subset=pid-check.patch
proc-test-subset=pid.patch


                 reply	other threads:[~2021-05-07  0:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210507000702.iDNd2VHcn%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).