sidelaod()
This commit is contained in:
50
san
50
san
@@ -253,6 +253,49 @@ tail_dmesg()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###############################################################################v
|
||||||
|
# Tools
|
||||||
|
#
|
||||||
|
header "Tools"
|
||||||
|
|
||||||
|
descr " zms_client <action> <mount> <file> {<swapto>} "
|
||||||
|
zms_client()
|
||||||
|
{
|
||||||
|
if [ "$1" == "" -o "$1" == "help" ]; then
|
||||||
|
echo "zms_client <action> <mount> <file> {<swapto>}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
local MSG="{ \"action\":\"$1\","
|
||||||
|
|
||||||
|
[ "$2" != "" ] && MSG="$MSG \"mount\":\"$2\", "
|
||||||
|
[ "$3" != "" ] && MSG="$MSG \"file\":\"$3\", "
|
||||||
|
[ "$4" != "" ] && MSG="$MSG \"swapto\":\"$4\", "
|
||||||
|
|
||||||
|
MSG="$MSG \"type\":\"zip\", \"uid\":501, \"gid\":501, \"flags\":0 }"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
plethora msg-send /zip-client "$MSG"
|
||||||
|
plethora msg-receive /zip-server
|
||||||
|
set +x
|
||||||
|
}
|
||||||
|
|
||||||
|
zms_hotswap_stress_test()
|
||||||
|
{
|
||||||
|
local PLUGIN="/nvram/plugins/$1.zip"
|
||||||
|
local PLUGIN_COPY="/tmp/$1.zip"
|
||||||
|
cp $PLUGIN $PLUGIN_COPY
|
||||||
|
|
||||||
|
# local MPOINT=$(zms_client query $PLUGIN | sed -e 's/^.*"mount":"\([^"]*\)".*$/\1/')
|
||||||
|
local MPOINT=/tmp/hotswap_test
|
||||||
|
mkdir $MPOINT
|
||||||
|
zms_client mount "$MPOINT" "$PLUGIN_COPY" "$PLUGIN"
|
||||||
|
while true; do
|
||||||
|
zms_client hotswap "$MPOINT" "$PLUGIN" "$PLUGIN_COPY"
|
||||||
|
zms_client hotswap "$MPOINT" "$PLUGIN_COPY" "$PLUGIN"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Log
|
# Log
|
||||||
@@ -427,6 +470,13 @@ setup_plugfest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# bug reproduce
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Done
|
# Done
|
||||||
|
|||||||
Reference in New Issue
Block a user