lkml.org 
[lkml]   [2018]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -mm] proc: fixup read test even more
/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 {
\
 
 \ /
  Last update: 2018-03-17 17:49    [W:0.019 / U:2.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site