projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9df10fb
)
selftests/vm/compaction_test: fix write to restore nr_hugepages
author
Mike Kravetz
<
[email protected]
>
Fri, 24 Jun 2016 21:48:40 +0000
(14:48 -0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 25 Jun 2016 00:23:52 +0000
(17:23 -0700)
The write at the end of the test to restore nr_hugepages to its previous
value is failing. This is because it is trying to write the number of
bytes in the char array as opposed to the number of bytes in the string.
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Mike Kravetz <
[email protected]
>
Cc: Shuah Khan <
[email protected]
>
Cc: Sri Jayaramappa <
[email protected]
>
Cc: Eric B Munson <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
tools/testing/selftests/vm/compaction_test.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/vm/compaction_test.c
b/tools/testing/selftests/vm/compaction_test.c
index 932ff577ffc0b01405c1a264bbfc36b2baa8c058..00c4f65d12daf995123cdaaf9ef3e53cbe2e18eb 100644
(file)
--- a/
tools/testing/selftests/vm/compaction_test.c
+++ b/
tools/testing/selftests/vm/compaction_test.c
@@
-136,7
+136,7
@@
int check_compaction(unsigned long mem_free, unsigned int hugepage_size)
printf("No of huge pages allocated = %d\n",
(atoi(nr_hugepages)));
- if (write(fd, initial_nr_hugepages, s
izeof
(initial_nr_hugepages))
+ if (write(fd, initial_nr_hugepages, s
trlen
(initial_nr_hugepages))
!= strlen(initial_nr_hugepages)) {
perror("Failed to write to /proc/sys/vm/nr_hugepages\n");
goto close_fd;