Bug 114264 - /usr/share/rhr/scripts/stress test has a bash programming error in it
/usr/share/rhr/scripts/stress test has a bash programming error in it
Status: CLOSED DEFERRED
Product: Red Hat Ready Certification Tests
Classification: Retired
Component: other (Show other bugs)
1.8
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rob Landry
Rob Landry
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-25 13:14 EST by Glen A. Foster
Modified: 2007-04-18 13:02 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-28 16:43:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Glen A. Foster 2004-01-25 13:14:05 EST
Description of problem: Whilst trying to port the rhr-crush test to
RHEL3 (see bug 114266), I noticed in /usr/share/rhr/scripts/stress
there's a programming error -- (looks like perl-ish line):

    (
        until ! [ $percent -lt 100 ]; do
            usedram=`used_ram`
            percent=`echo "$usedram / $realram * 100" | bc -l`
            percent=`echo $percent | awk -F\. ' { print "0"$1; } '`
            if [ $percent -ge 100 ]; then
                $percent=100
            fi
            echo $percent
        done
    ) | gauge crush 8 41

... the line "$percent=100" should not have the leading $

Version-Release number of selected component (if applicable):
# rpm -q rhr-crush
rhr-crush-0.7-10

How reproducible: 100%

Steps to Reproduce:
1. code read /usr/share/rhr/scripts/stress
2.
3.
  
Additional info: Here's the patch you should apply:

--- stress.orig 2004-01-25 10:44:42.000000000 -0700
+++ stress      2004-01-25 10:44:51.000000000 -0700
@@ -15,7 +15,7 @@
             percent=`echo "$usedram / $realram * 100" | bc -l`
             percent=`echo $percent | awk -F\. ' { print "0"$1; } '`
             if [ $percent -ge 100 ]; then
-                $percent=100
+                percent=100
             fi
             echo $percent
         done
Comment 1 Rob Landry 2004-04-28 16:43:32 EDT
rhr 1.x scripts have been replaced by the 2.x series; while RHEL 2.1
still requires the 1.x since certs are not common and the 2.x will be
modified to run on the 2.1 I'm going to go ahead and deffer this one.

Note You need to log in before you can comment on or make changes to this bug.