#!/usr/bin/env bash # -*- coding: utf-8 -*- # # dissector_fuzz.sh -- fuzz test netsniff-ng's dissector and pcap io methods # with shitty pcap example files from the Wireshark archive # # Copyright (C) 2012 Daniel Borkmann # Copyright (C) 2012 Stefan Seering # # Note: build and *install* the toolkit first before running this script! # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. set -u if [ ${BASH_VERSINFO} -lt 3 ] ; then echo 'Error: Your bash need to be version 3 or newer. Exiting.' exit 1 # operators like =~ produce errors silently in old bash versions, so exit here fi archive='ftp://wireshark.org/automated/captures/' show_output='' # empty string evaluates to false run_through='' # empty string evaluates to false count_cores=0 count_files=0 netsniff_ng_opts='' if [ $# -gt 0 ] ; then if [ "$1" = '-h' -o "$1" = '--help' -o "$1" = '--usage' ] ; then echo 'Usage: dissector_fuzz [-s (show netsniff-ng output, default: no)] [-r (keep running on errors, default: no)] [netsniff-ng long-args]' exit 0 fi for opt in $@ ; do if [ "${opt}" = '-s' ] ; then show_output='true' elif [ "${opt}" = '-r' ] ; then run_through='true' else netsniff_ng_opts="${netsniff_ng_opts} ${opt}"; fi done fi mkdir -p fuzzing cd fuzzing wget -r -Nc -np -nd -A.pcap "$archive" |& grep -E "%|^--" ulimit -c unlimited rm -f core for file in *.pcap do echo "Testing file $file ..." if [ $show_output ]; then netsniff-ng --in "$file" "${netsniff_ng_opts}" else netsniff-ng --in "$file" "${netsniff_ng_opts}" > /dev/null fi if [ -e core ]; then echo "Fuck, core dumped on $file!" let count_cores=count_cores+1 if [ $run_through ]; then rm core else exit fi fi done if which cowsay > /dev/null ; then echo_cmd='cowsay' else echo_cmd='echo' fi ${echo_cmd} 'Your fuckup Score' echo " * tested pcaps: $count_files" echo " * core dumps: $count_cores" nux/net-next.git/diff/?h=nds-private-remove&id=9d3717f71c22c4f39723f18ed094c552f4b73146'>diff
diff options
context:
space:
mode:
authorDavid Lin <dtwlin@google.com>2016-07-25 16:29:20 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-26 20:58:37 -0700
commit9d3717f71c22c4f39723f18ed094c552f4b73146 (patch)
tree29c04b17083806b79cf14a48f1738ce23c1f10a3
parent7c4a0edb38ba734bd89efbda4262698a58839c26 (diff)
greybus: audio: add runtime pm to enumerated control and DAPM widget
There's an issue that the userspace is not able to control both the enumerated control and DAPM widget when audio bundle is in the SUSPEND state. This patch fixes the issue by adding pm_runtime_get/put() calls for the both controls. Testing Done: - Use tinymix to get and put both enumerated control and DAPM widget as the followings, and observe audio bundle is able to wake up from suspend. $ tinymix "GB 3 PB source" 1 $ tinymix "GB 3 PB source" GB 3 PB source: AIF1 >AIF2 $ tinymix "GB 3 AIF1_RX MUX" 2 $ tinymix "GB 3 AIF1_RX MUX" GB 3 AIF1_RX MUX: Stereo Left >Right Reported-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Signed-off-by: David Lin <dtwlin@google.com> Reviewed-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r--drivers/staging/greybus/audio_topology.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c