All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm 1/2] proc: exit correctly in /proc/*/maps test
@ 2019-02-06  7:36 Alexey Dobriyan
  2019-02-06  7:39 ` [PATCH -mm 2/2] proc: use ramfs for executable generation Alexey Dobriyan
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2019-02-06  7:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

If open() or writev() fails, test will hang waiting for child test
process.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

	fold into proc-test-proc-maps-smaps-smaps_rollup-statm.patch

 tools/testing/selftests/proc/proc-pid-vm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/tools/testing/selftests/proc/proc-pid-vm.c
+++ b/tools/testing/selftests/proc/proc-pid-vm.c
@@ -189,11 +189,11 @@ static int make_exe(const uint8_t *payload, size_t len)
 
 	fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_EXCL|O_TMPFILE, 0700);
 	if (fd == -1) {
-		return 1;
+		exit(1);
 	}
 
 	if (writev(fd, iov, 3) != sizeof(struct elf64_hdr) + sizeof(struct elf64_phdr) + len) {
-		return 1;
+		exit(1);
 	}
 
 	/* Avoid ETXTBSY on exec. */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH -mm 2/2] proc: use ramfs for executable generation
  2019-02-06  7:36 [PATCH -mm 1/2] proc: exit correctly in /proc/*/maps test Alexey Dobriyan
@ 2019-02-06  7:39 ` Alexey Dobriyan
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Dobriyan @ 2019-02-06  7:39 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

tmpfs is under CONFIG_TMPFS which can be disabled.
ramfs is always enabled.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

	fold into proc-test-proc-maps-smaps-smaps_rollup-statm.patch

 tools/testing/selftests/proc/proc-pid-vm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/tools/testing/selftests/proc/proc-pid-vm.c
+++ b/tools/testing/selftests/proc/proc-pid-vm.c
@@ -20,7 +20,6 @@
  * Test /proc/$PID/smaps_rollup
  * Test /proc/$PID/statm
  *
- * FIXME require CONFIG_TMPFS which can be disabled
  * FIXME test other values from "smaps"
  * FIXME support other archs
  */
@@ -58,7 +57,7 @@ static void make_private_tmp(void)
 	if (mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL) == -1) {
 		exit(1);
 	}
-	if (mount(NULL, "/tmp", "tmpfs", 0, NULL) == -1) {
+	if (mount(NULL, "/tmp", "ramfs", 0, NULL) == -1) {
 		exit(1);
 	}
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-06  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06  7:36 [PATCH -mm 1/2] proc: exit correctly in /proc/*/maps test Alexey Dobriyan
2019-02-06  7:39 ` [PATCH -mm 2/2] proc: use ramfs for executable generation Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.