#!/bin/bash

#WARNING: DO NOT RUN THIS FILE DIRECTLY
#  This file expects to be a part of ppc64-diag test suite
#  Run this file with ../run_tests -t test-log-rotate-000 -q

check_suite
copy_sysfs

mkdir -p $OUT/platform

run_binary "./opal_errd" "-s $SYSFS -o $OUT/platform -D -e /bin/true -n 3 -c 1 -a 29"
sed -e 's/ELOG\[[0-9]*\]/ELOG[XXXX]/' -i $OUTSTDERR

ls -1 $OUT >> $OUTSTDOUT
(cd $OUT/platform; md5sum *) | sort  -t ' ' -k 2 | awk  -F'[- ]' '{print $1"  "$4}'  >> $OUTSTDOUT

diff_with_result

register_success
