diff options
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/selftests/ftrace/ftracetest | 2 | ||||
-rw-r--r-- | tools/testing/selftests/net/psock_fanout.c | 2 |
2 files changed, 2 insertions, 2 deletions
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 | |||
82 | } | 82 | } |
83 | 83 | ||
84 | # Parameters | 84 | # Parameters |
85 | DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' '` | 85 | DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' ' | head -1` |
86 | TRACING_DIR=$DEBUGFS_DIR/tracing | 86 | TRACING_DIR=$DEBUGFS_DIR/tracing |
87 | TOP_DIR=`absdir $0` | 87 | TOP_DIR=`absdir $0` |
88 | TEST_DIR=$TOP_DIR/test.d | 88 | TEST_DIR=$TOP_DIR/test.d |
diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c index 57b9c2b7c4ff..6f6733331d95 100644 --- a/tools/testing/selftests/net/psock_fanout.c +++ b/tools/testing/selftests/net/psock_fanout.c | |||
@@ -128,7 +128,7 @@ static int sock_fanout_read_ring(int fd, void *ring) | |||
128 | struct tpacket2_hdr *header = ring; | 128 | struct tpacket2_hdr *header = ring; |
129 | int count = 0; | 129 | int count = 0; |
130 | 130 | ||
131 | while (header->tp_status & TP_STATUS_USER && count < RING_NUM_FRAMES) { | 131 | while (count < RING_NUM_FRAMES && header->tp_status & TP_STATUS_USER) { |
132 | count++; | 132 | count++; |
133 | header = ring + (count * getpagesize()); | 133 | header = ring + (count * getpagesize()); |
134 | } | 134 | } |