lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 3 Nov 2014 13:48:24 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [GIT PULL] ftracetest: Take the first debugfs mount found


Linus,

Running the ftracetests on a machine that had the debugfs file system
mounted in two locations caused the ftracetests to fail. This is because
the ftracetests script does a grep of the /proc/mounts file to find
where the debugfs file system is mounted. If it is mounted twice, then
the grep returns two lines instead of just one. This causes the ftracetests
to get confused and fail.

Use "head -1" to only return the first mount point for debugfs.

Please pull the latest ftracetest-3.18-rc1 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
ftracetest-3.18-rc1

Tag SHA1: 8c7027b611ee71a58c89ce0cc8b2b17b6da5e81c
Head SHA1: e7dbb48958897c0a80b14250a981a563d9160e4d


Steven Rostedt (Red Hat) (1):
      ftracetest: Take the first debugfs mount found

----
 tools/testing/selftests/ftrace/ftracetest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit e7dbb48958897c0a80b14250a981a563d9160e4d
Author: Steven Rostedt (Red Hat) <rostedt@...dmis.org>
Date:   Fri Oct 31 18:02:05 2014 -0400

    ftracetest: Take the first debugfs mount found
    
    Running ftracetests on a box that mounted debugfs in two locations
    made the ftracetests fail. This is because the tests uses a grep
    of debugfs from the /proc/mounts file to find the debugfs mount
    point, and then appends "/tracing" to that string to get the tracing
    directory.
    
    If the debugfs directory is mounted twice, then that grep will return
    two answers and appending "/tracing" to a string with two lines will
    not work.
    
    Use "head -1" to only take the first mount point found.
    
    Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
    Signed-off-by: Steven Rostedt <rostedt@...dmis.org>

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index a8f81c782856..515247601df4 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -82,7 +82,7 @@ parse_opts() { # opts
 }
 
 # Parameters
-DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' '`
+DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' ' | head -1`
 TRACING_DIR=$DEBUGFS_DIR/tracing
 TOP_DIR=`absdir $0`
 TEST_DIR=$TOP_DIR/test.d
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ