Changeset 1691

Show
Ignore:
Timestamp:
04/26/07 12:24:10 (2 years ago)
Author:
dsugar
Message:

Updated since problem was fixed ticket:135

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/test0098/test.sh

    r1667 r1691  
    11#!/bin/bash 
    2  
    32DIR=`pwd` 
    4 #echo Dir $DIR 
    53cd ../.. 
    64 
    75RESULT=0 
    8  
    96# LIBSELINUX needs to be passed in as the full path to libselinuxjava.so 
    107 
     
    1310 
    1411#check compiler error result 
    15 if [ $? -ne 0 ]; then 
     12if [ $? -ne 1 ]; then 
    1613        echo Unexpected error during compilation  
    1714        RESULT=1 
    1815fi 
    1916 
    20 #verify the error output is empty 
     17 
     18#spaces removed so 'if' doesn't complain 
     19EXPECTED_ERROR="Parent'spermissiononresourceiswrappedinthebooleanallow_daemons_use_tty,childpermissionmustalsobewrappedbythesameboolean" 
    2120if [ -e $DIR/test.err ]; then 
    2221        LINES=`wc -l $DIR/test.err | cut -f 1 -d ' '` 
    23         if [ $LINES -gt 0 ]; then 
    24                 echo "Unexpected number of lines ($LINES should be 0) in test.err" 
     22        if [ $LINES -ne 2 ]; then 
     23                echo "Unexpected number of lines ($LINES should be 2) in test.err" 
    2524                RESULT=1 
    2625        fi 
    27 fi 
    28  
    29 # check the expected generated files 
    30 diff $DIR/test.te $DIR/expected.te >> /dev/null 
    31 if [ $? -ne 0 ]; then 
     26        ERROR=`cat -bs $DIR/test.err | grep 1 | cut -d : -f 5 | tr -d ' '` 
     27        if [ $ERROR != $EXPECTED_ERROR ]; then 
     28                echo Unexpected error resulted 
     29                RESULT=1 
     30        fi 
     31else 
     32        echo Error output file does not exist 
    3233        RESULT=1 
    33         echo Unexpected results from te diff 
    34 fi 
    35 diff $DIR/test.if $DIR/expected.if >> /dev/null 
    36 if [ $? -ne 0 ]; then 
    37         RESULT=1 
    38         echo Unexpected results from if diff 
    39 fi 
    40 diff $DIR/test.fc $DIR/expected.fc >> /dev/null 
    41 if [ $? -ne 0 ]; then 
    42         RESULT=1 
    43         echo Unexpected results from fc diff 
    4434fi 
    4535 
     
    4838fi; 
    4939 
     40 
    5041return $RESULT