#!/bin/bash # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # runtest.sh of /tools/systemtap/Regression/ipv6-tapset-support # Description: Test for BZ#822503 (ipv6 tapset support) # Author: Martin Cermak # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Copyright (c) 2013 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing # to use, modify, copy, or redistribute it subject to the terms # and conditions of the GNU General Public License version 2. # # 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, write to the Free # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 . /etc/os-release || exit 1 rlJournalStart rlPhaseStartSetup rlLogInfo "Related bugs: Fedora rawhide 6.2.0-0.rc8.57.fc39.x86_64 bz2177192" rlAssertRpm nfs-utils rlRun "uname -r" rlRun "which stap" rlRun "TMPD=$(mktemp -d --tmpdir=$HOME tmp.XXXXXXX)" rlRun "mkdir $TMPD/{A,B}" rlRun "chmod --recursive 0777 $TMPD" rlRun "STAPLOG=$(mktemp)" rlServiceStart rpcbind sleep 5 NFS_SERVICE=nfs rlIsRHEL '>=8' && NFS_SERVICE=nfs-server [ $ID == 'fedora' ] && test $VERSION_ID -ge 38 && NFS_SERVICE=nfs-server rlServiceStart $NFS_SERVICE sleep 10 rlRun "exportfs -ua" rlRun "exportfs -i -o 'rw,no_root_squash' *:$TMPD/A" rlPhaseEnd rlPhaseStartTest # ======= work around bz1605574 rlLogInfo "Let's check if we can compile the module." rlLogInfo "In case we can't, we'll go ahead with prologue searching." set -x EXTRA_SWITCHES='' stap -p4 nfsd.proc.lookup.stp || EXTRA_SWITCHES="-P" set +x # ============================= # mount is sufficient to invoke nfsd.proc.lookup rlRun "stap $EXTRA_SWITCHES -v -c 'mount -t nfs -v [::1]:$TMPD/A $TMPD/B' nfsd.proc.lookup.stp |& tee $STAPLOG" rlRun "umount $TMPD/B" rlRun "grep 'Unsupported Address Family' $STAPLOG" 1 rlRun "egrep '^\[0000:0000:0000:0000:0000:0000:0000:0001\]:[0-9]+.*$(basename $TMPD)' $STAPLOG" rlPhaseEnd rlPhaseStartCleanup rlServiceRestore $NFS_SERVICE rlServiceRestore rpcbind rlRun "rm -rf $TMPD $STAPLOG" rlPhaseEnd rlJournalPrintText rlJournalEnd