From fdedd8cab2fffab319dac30a438d6a02618ca339 Mon Sep 17 00:00:00 2001 From: pdancak Date: Fri, 21 Jun 2024 10:44:02 +0200 Subject: [PATCH] sanity test --- Sanity/fstrm-utils/dnstap.0 | Bin 0 -> 8368 bytes Sanity/fstrm-utils/main.fmf | 36 ++++++++++++++++++++ Sanity/fstrm-utils/runtest.sh | 61 ++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 Sanity/fstrm-utils/dnstap.0 create mode 100644 Sanity/fstrm-utils/main.fmf create mode 100755 Sanity/fstrm-utils/runtest.sh diff --git a/Sanity/fstrm-utils/dnstap.0 b/Sanity/fstrm-utils/dnstap.0 new file mode 100644 index 0000000000000000000000000000000000000000..91be70c70939a82c963e03de87c12c5485db09d2 GIT binary patch literal 8368 zcmeHMdpK0<9{$!`B)LnbB9c8D!)9sW6UZ<>z?}}^;Kwy2txYm>-C+@Gw-KOE`$qt2!sq2LfhLPDKPW$ zvvEM!J|=`M`YQA9Ygbc65HjXPJfS&pihi412)pA5qYzY=><2LOkTFXu-i5Z?46X?!Qh|(lQhyrPo1gF*?*C*BVZ-E#WcN5J`Y;qC8tTuS?hlX1-l&26c zGzC%sk_+(Xgu(1^IE?G>$0LTpfg|0Rfb?V6STKzg8o^j3kQK;E4w*;{&5#a_FbraI z7z@W97QTQcdM9P6GZ{Kqe`xC*eI;qvq4oynVBa%W+jdX{(W7&8mO7IOg|(NxhRs%G zxpW7nSes_diFx|P=ETB^#mx`9W7as(HvynWss|tz0N_PNSMP&D4f%odSQGw#g^DnP zoIU|&JeEP3L6Bg^kz<5WW+3TuF`MNF z@AY7yRLROuS|RNirA}pK%{3`Xr)R6ZlGAni2h(;sL%+|)V%gj@oj+BXdfpk__4d#( zH(!6A>g~dc8kgr+yy`o%HgaPX`da6xHyjBbZ$YuUU0Me;iXCCMd9ODwS;Mwh60jghp-w1yZ> z?Kl0o-y^hA>5ygr%j8UrKuzDMyd{m^(K%03Z1PSLiX(?M&j=|rfAX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3@m>87KXYd=}g(#09&cx@;ampTP2aKGEpzNbJjQ71EJ z_S-sb>)s%qL6l`F%RcA4j1eR-)V*X|sMqSCzVvtE+LGR))7`P2c5l5ht#eW$Udh}# zw#)tSbNQ90d)x1Q`5;^8(n+}ts7yOar<9@I5m)YN*smS7WRD9r{~zPS$LfzBDlqlL z^9|1reEmPh7ZD#n>vl0>R<;@1r6BFXpI#K3ykXhA54DSL%e?9E6g9Eb!b{Z@HUD!b P^FC@KT8lm;008k{vlT&t literal 0 HcmV?d00001 diff --git a/Sanity/fstrm-utils/main.fmf b/Sanity/fstrm-utils/main.fmf new file mode 100644 index 0000000..44814a9 --- /dev/null +++ b/Sanity/fstrm-utils/main.fmf @@ -0,0 +1,36 @@ +summary: Use fstrm upstream utils to excercise the library. +description: '' +contact: Petr Dancak +component: + - fstrm +test: ./runtest.sh +framework: beakerlib +recommend: + - fstrm + - fstrm-utils +duration: 5m +enabled: true +tag: + - NoRHEL4 + - NoRHEL5 + - NoRHEL6 + - NoRHEL7 + - TIPfail_infra + - TIPpass + - Tier1 + - rhel-buildroot + - rhel8-buildroot + - rhel9-buildroot +tier: '1' +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2051512 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2039889 + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1869225 +adjust: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7 + continue: false +extra-nitrate: TC#0609276 +extra-summary: /CoreOS/fstrm/Sanity/fstrm-utils +extra-task: /CoreOS/fstrm/Sanity/fstrm-utils +id: 5463d1fd-5f18-4a8c-8b1b-1a9c7dc11658 diff --git a/Sanity/fstrm-utils/runtest.sh b/Sanity/fstrm-utils/runtest.sh new file mode 100755 index 0000000..01887f6 --- /dev/null +++ b/Sanity/fstrm-utils/runtest.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/fstrm/Sanity/fstrm-utils +# Description: Use fstrm upstream utils to excercise the library. +# Author: Petr Mensik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2021 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="fstrm" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm $PACKAGE-utils + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + TAPSOURCE="`pwd`/dnstap.0" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "fstrm_dump $TAPSOURCE test.dump >/dev/null 2>dump.log" + rlAssertGrep '^Data frame ' dump.log + rlAssertExists test.dump + + rlRun "fstrm_capture -u test -t protobuf:dnstap.Dnstap -w test.captured &" + CAPTURE_PID=$! + rlRun "fstrm_replay --type protobuf:dnstap.Dnstap -u test -r $TAPSOURCE" + rlRun "kill $CAPTURE_PID" + rlRun "wait $CAPTURE_PID" + rlRun "fstrm_dump test.captured 2>&1 | grep '^Data frame'" 0 "Verify capture was successful" + [ "$DEBUG" = y ] && PS1="test-debug $PS1" bash -i + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd