All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] proc: fixup read test even more
@ 2018-03-17 16:49 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2018-03-17 16:49 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

/proc/sysrq-trigger lives on the ground floor so to speak.

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

	FOLD INTO proc-shotgun-test-read-readdir-readlink-a-little-write-fix.patch

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

--- a/tools/testing/selftests/proc/read.c
+++ b/tools/testing/selftests/proc/read.c
@@ -106,10 +106,10 @@ static void f(DIR *d, unsigned int level)
 			int fd;
 
 		case DT_REG:
-			if (level == 1 && streq(de->d_name, "clear_refs")) {
-				f_reg_write(d, de->d_name, "1", 1);
-			} else if (level == 1 && streq(de->d_name, "sysrq-trigger")) {
+			if (level == 0 && streq(de->d_name, "sysrq-trigger")) {
 				f_reg_write(d, de->d_name, "h", 1);
+			} else if (level == 1 && streq(de->d_name, "clear_refs")) {
+				f_reg_write(d, de->d_name, "1", 1);
 			} else if (level == 3 && streq(de->d_name, "clear_refs")) {
 				f_reg_write(d, de->d_name, "1", 1);
 			} else {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-17 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-17 16:49 [PATCH -mm] proc: fixup read test even more 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.