Add read_all file systems test
PATCH v4 1/1 Add read_all file systems test
While using a shell script I wrote, which dumps the contents of /sys and /proc (submitted in a separate patch), I found some minor kernel bugs. There is already a test specifically for /proc however it is attempting to verify the behavior of particular files. This test is more general and can be applied to any file system.
---
V4:
* Move lpthread to CFLAGS.
* Handle edge case where it may not be possible to add the stop code to a queue.
runtest/fs | 4 + testcases/kernel/fs/read_all/.gitignore | 1 + testcases/kernel/fs/read_all/Makefile | 22 ++ testcases/kernel/fs/read_all/read_all.c | 434 ++++++++++++++++++++++++++++++++ 4 files changed, 461 insertions(+) create mode 100644 testcases/kernel/fs/read_all/.gitignore create mode 100644 testcases/kernel/fs/read_all/Makefile create mode 100644 testcases/kernel/fs/read_all/read_all.c
runtest/fs +4 -0
@@ -69,6 +69,10 @@ fs_di fs_di -d $TMPDIR # Was not sure why it should reside in runtest/crashme and won´t get tested ever proc01 proc01 -m 128 +read_all_dev read_all -d /dev -q -r 10 +read_all_proc read_all -d /proc -q -r 10 +read_all_sys read_all -d /sys -q -r 10 + #Run the File System Race Condition Check tests as well fs_racer fs_racer.sh -t 5
testcases/kernel/fs/read_all/.gitignore new file +1 -0
@@ -0,0 +1 @@ +read_all
testcases/kernel/fs/read_all/Makefile new file +22 -0
@@ -0,0 +1,22 @@ +# Copyright (c) 2017 Linux Test Project +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +top_srcdir ?= ../../../.. + +include $(top_srcdir)/include/mk/testcases.mk + +CFLAGS += -D_GNU_SOURCE -lpthread + +include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/fs/read_all/read_all.c new file +434 -0
434 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH v4 1/1 Add read_all file systems test
Hi!
Quoted 1 line
* Move lpthread to CFLAGS.
It's -pthread not -lpthread, fixed that and pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v4 1/1 Add read_all file systems test
Hello,
Quoted 4 lines · Cyril Hrubis
Hi!
Quoted 1 line
* Move lpthread to CFLAGS.
It's -pthread not -lpthread, fixed that and pushed, thanks.
Ah, sorry, thanks.
Signature · 2 lines
Thank you, Richard.