which/tests/artifacts/test.basic-functionality-te...

262 lines
14 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

posix on
:: [ 12:25:31 ] :: [ WARNING ] :: POSIX mode detected and switched off
:: [ 12:25:31 ] :: [ WARNING ] :: POSIX mode detected and switched off
:: [ 12:25:31 ] :: [ WARNING ] :: Please fix your test to have /bin/bash shebang
:: [ 12:25:31 ] :: [ WARNING ] :: Please fix your test to have /bin/bash shebang
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
which-2.21-4.fc27.x86_64
:: [ PASS ] :: Checking for the presence of which rpm
:: [ 12:25:31 ] :: Package versions:
:: [ 12:25:31 ] :: Package versions:
:: [ 12:25:31 ] :: which-2.21-4.fc27.x86_64
:: [ 12:25:31 ] :: which-2.21-4.fc27.x86_64
:: [ BEGIN ] :: Creating tmp directory :: actually running 'TmpDir=$(mktemp -d)'
:: [ BEGIN ] :: Creating tmp directory :: actually running 'TmpDir=$(mktemp -d)'
:: [ PASS ] :: Creating tmp directory (Expected 0, got 0)
:: [ BEGIN ] :: Running 'pushd /tmp/tmp.cVaYqMMJWL'
:: [ BEGIN ] :: Running 'pushd /tmp/tmp.cVaYqMMJWL'
/tmp/tmp.cVaYqMMJWL /usr/local/bin/basic-functionality-test
:: [ PASS ] :: Command 'pushd /tmp/tmp.cVaYqMMJWL' (Expected 0, got 0)
:: [ BEGIN ] :: Running 'cp -p /bin/true /tmp/tmp.cVaYqMMJWL'
:: [ BEGIN ] :: Running 'cp -p /bin/true /tmp/tmp.cVaYqMMJWL'
:: [ PASS ] :: Command 'cp -p /bin/true /tmp/tmp.cVaYqMMJWL' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test --version
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'VERSION=$( rpm -q --qf '%{VERSION}' which )'
:: [ BEGIN ] :: Running 'VERSION=$( rpm -q --qf '%{VERSION}' which )'
:: [ PASS ] :: Command 'VERSION=$( rpm -q --qf '%{VERSION}' which )' (Expected 0, got 0)
:: [ BEGIN ] :: Running 'which --version'
:: [ BEGIN ] :: Running 'which --version'
GNU which v2.21, Copyright (C) 1999 - 2015 Carlo Wood.
GNU which comes with ABSOLUTELY NO WARRANTY;
This program is free software; your freedom to use, change
and distribute this program is protected by the GPL.
:: [ PASS ] :: Command 'which --version' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.0WBy8LPp' should contain 'GNU which v2.21'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test locating the bash binary
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'which bash'
:: [ BEGIN ] :: Running 'which bash'
/bin/bash
:: [ PASS ] :: Command 'which bash' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.eBwKSEjp' should contain '/bin/bash'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test an alias
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'echo 'alias foo=bar' > bashrc'
:: [ BEGIN ] :: Running 'echo 'alias foo=bar' > bashrc'
:: [ PASS ] :: Command 'echo 'alias foo=bar' > bashrc' (Expected 0, got 0)
:: [ BEGIN ] :: Running 'echo -e 'alias foo=true
which foo' | bash -i'
:: [ BEGIN ] :: Running 'echo -e 'alias foo=true
which foo' | bash -i'
[root@localhost tmp.cVaYqMMJWL]# alias foo=true
[root@localhost tmp.cVaYqMMJWL]# which foo
]0;root@localhost:/tmp/tmp.cVaYqMMJWL]0;root@localhost:/tmp/tmp.cVaYqMMJWLalias foo='true'
/bin/true
[root@localhost tmp.cVaYqMMJWL]# exit
]0;root@localhost:/tmp/tmp.cVaYqMMJWL:: [ PASS ] :: Command 'echo -e 'alias foo=true\nwhich foo' | bash -i' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.W7TNYyLv' should contain 'alias foo='true''
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.W7TNYyLv' should contain '/bin/true'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test non existing command
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'which foobar'
:: [ BEGIN ] :: Running 'which foobar'
which: no foobar in (/sbin:/bin:/usr/sbin:/usr/bin)
:: [ PASS ] :: Command 'which foobar' (Expected 1, got 1)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.qmmfZVfo' should contain 'no foobar in (/sbin:/bin:/usr/sbin:/usr/bin)'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test with customized PATH
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which true''
:: [ BEGIN ] :: Running 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which true''
/tmp/tmp.cVaYqMMJWL/true
:: [ PASS ] :: Command 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which true'' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.1ondAtov' should contain '/tmp/tmp.cVaYqMMJWL/true'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test options -a / --all
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which -a true''
:: [ BEGIN ] :: Running 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which -a true''
/tmp/tmp.cVaYqMMJWL/true
/bin/true
/usr/bin/true
:: [ PASS ] :: Command 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which -a true'' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.9pOxwvyK' should contain '/tmp/tmp.cVaYqMMJWL/true'
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.9pOxwvyK' should contain '/bin/true'
:: [ BEGIN ] :: Running 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which --all true''
:: [ BEGIN ] :: Running 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which --all true''
/tmp/tmp.cVaYqMMJWL/true
/bin/true
/usr/bin/true
:: [ PASS ] :: Command 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which --all true'' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.SMe8bSin' should contain '/tmp/tmp.cVaYqMMJWL/true'
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.SMe8bSin' should contain '/bin/true'
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ BEGIN ] :: Running 'popd'
:: [ BEGIN ] :: Running 'popd'
/usr/local/bin/basic-functionality-test
:: [ PASS ] :: Command 'popd' (Expected 0, got 0)
:: [ BEGIN ] :: Removing tmp directory :: actually running 'rm -r /tmp/tmp.cVaYqMMJWL'
:: [ BEGIN ] :: Removing tmp directory :: actually running 'rm -r /tmp/tmp.cVaYqMMJWL'
:: [ PASS ] :: Removing tmp directory (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Package : unknown
:: [ LOG ] :: Installed : which-2.21-4.fc27.x86_64
:: [ LOG ] :: beakerlib RPM : beakerlib-1.16-4.fc27
:: [ LOG ] :: bl-redhat RPM : not installed
:: [ LOG ] :: Test started : 2017-12-11 12:25:31 EET
:: [ LOG ] :: Test finished : 2017-12-11 12:25:34 EET
:: [ LOG ] :: Test name : basic-functionality-test
:: [ LOG ] :: Distro : Fedora release 27 (Twenty Seven)
:: [ LOG ] :: Hostname : localhost.localdomain
:: [ LOG ] :: Architecture : x86_64
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Test description
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
PURPOSE of /CoreOS/which/Sanity/basic-functionality-test
Description: tests basic functionality
Author: Karel Srot <ksrot@redhat.com>
tests following scenarios:
* test --version
* test locating the bash binary
* test an alias
* test non existing command
* test with customized PATH
* test options -a / --all
:: [ WARNING ] :: POSIX mode detected and switched off
:: [ WARNING ] :: Please fix your test to have /bin/bash shebang
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Checking for the presence of which rpm
:: [ LOG ] :: Package versions:
:: [ LOG ] :: which-2.21-4.fc27.x86_64
:: [ PASS ] :: Creating tmp directory (Expected 0, got 0)
:: [ PASS ] :: Command 'pushd /tmp/tmp.cVaYqMMJWL' (Expected 0, got 0)
:: [ PASS ] :: Command 'cp -p /bin/true /tmp/tmp.cVaYqMMJWL' (Expected 0, got 0)
:: [ LOG ] :: Duration: 1s
:: [ LOG ] :: Assertions: 4 good, 0 bad
:: [ PASS ] :: RESULT: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test --version
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'VERSION=$( rpm -q --qf '%{VERSION}' which )' (Expected 0, got 0)
:: [ PASS ] :: Command 'which --version' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.0WBy8LPp' should contain 'GNU which v2.21'
:: [ LOG ] :: Duration: 0s
:: [ LOG ] :: Assertions: 3 good, 0 bad
:: [ PASS ] :: RESULT: test --version
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test locating the bash binary
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'which bash' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.eBwKSEjp' should contain '/bin/bash'
:: [ LOG ] :: Duration: 0s
:: [ LOG ] :: Assertions: 2 good, 0 bad
:: [ PASS ] :: RESULT: test locating the bash binary
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test an alias
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'echo 'alias foo=bar' > bashrc' (Expected 0, got 0)
:: [ PASS ] :: Command 'echo -e 'alias foo=true\nwhich foo' | bash -i' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.W7TNYyLv' should contain 'alias foo='true''
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.W7TNYyLv' should contain '/bin/true'
:: [ LOG ] :: Duration: 0s
:: [ LOG ] :: Assertions: 4 good, 0 bad
:: [ PASS ] :: RESULT: test an alias
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test non existing command
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'which foobar' (Expected 1, got 1)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.qmmfZVfo' should contain 'no foobar in (/sbin:/bin:/usr/sbin:/usr/bin)'
:: [ LOG ] :: Duration: 0s
:: [ LOG ] :: Assertions: 2 good, 0 bad
:: [ PASS ] :: RESULT: test non existing command
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test with customized PATH
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which true'' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.1ondAtov' should contain '/tmp/tmp.cVaYqMMJWL/true'
:: [ LOG ] :: Duration: 0s
:: [ LOG ] :: Assertions: 2 good, 0 bad
:: [ PASS ] :: RESULT: test with customized PATH
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: test options -a / --all
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which -a true'' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.9pOxwvyK' should contain '/tmp/tmp.cVaYqMMJWL/true'
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.9pOxwvyK' should contain '/bin/true'
:: [ PASS ] :: Command 'bash -c 'export PATH=/tmp/tmp.cVaYqMMJWL:/sbin:/bin:/usr/sbin:/usr/bin; which --all true'' (Expected 0, got 0)
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.SMe8bSin' should contain '/tmp/tmp.cVaYqMMJWL/true'
:: [ PASS ] :: File '/var/tmp/rlRun_LOG.SMe8bSin' should contain '/bin/true'
:: [ LOG ] :: Duration: 1s
:: [ LOG ] :: Assertions: 6 good, 0 bad
:: [ PASS ] :: RESULT: test options -a / --all
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ PASS ] :: Command 'popd' (Expected 0, got 0)
:: [ PASS ] :: Removing tmp directory (Expected 0, got 0)
:: [ LOG ] :: Duration: 0s
:: [ LOG ] :: Assertions: 2 good, 0 bad
:: [ PASS ] :: RESULT: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: basic-functionality-test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ LOG ] :: Phases: 8 good, 0 bad
:: [ PASS ] :: RESULT: basic-functionality-test
:: [ 12:25:34 ] :: JOURNAL XML: /var/tmp/beakerlib-3xyUzEH/journal.xml
:: [ 12:25:34 ] :: JOURNAL XML: /var/tmp/beakerlib-3xyUzEH/journal.xml
:: [ 12:25:34 ] :: JOURNAL TXT: /var/tmp/beakerlib-3xyUzEH/journal.txt
:: [ 12:25:34 ] :: JOURNAL TXT: /var/tmp/beakerlib-3xyUzEH/journal.txt