#!/bin/sh
# PCP QA Test No. 1043
# Exercise pmdalinux softirqs no-values edge case.
#
# Copyright (c) 2016 Red Hat.
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

[ $PCP_PLATFORM = linux ] || _notrun "Linux interrupts/softirqs testing"

status=1	# failure is the default!
trap "cd $here; rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15

# real QA test starts here
mkdir -p $tmp.root/proc
cp -a /proc/stat $tmp.root/proc/stat

export LINUX_STATSPATH=$tmp.root
pmda=$PCP_PMDAS_DIR/linux/pmda_linux.so,linux_init

echo && echo "Checking non-existent softirqs data"
pminfo -f -L -K clear -K add,60,$pmda kernel.percpu.softirqs

# success, all done
status=0
exit
