My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 52: OHSM policy file validation testing
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  sneha.hendre@gmail.com
Closed:  Mar 2009


 
Project Member Reported by imreckless@gmail.com, Jan 31, 2009
We hav started with validation testing.

We will try to make as many mistakes we can in 
policy files.

Jan 31, 2009
Project Member #1 imreckless@gmail.com
Attaching test log 1

Tested with invalid groups, users, invalid number of user, types and groups.
testlog
2.2 KB   View   Download
Owner: sneha.hendre
Jan 31, 2009
Project Member #2 imreckless@gmail.com
Changed the xml file version to 2.0

[root@localhost work_31]# ./ohsm -e -a alloc.xml -r relocate.xml -i tier_info.xml -m /mnt
alloc.xml:1: parser error : Unsupported version '2.0'
<?xml version = '2.0'?>
                     ^
Document not parsed successfully.

ohsm : error in parsing the allocation policy file alloc.xml

ohsm : cannot be enabled
[root@localhost work_31]#

Jan 31, 2009
Project Member #3 imreckless@gmail.com
Checking with invalid tags 
Valid <create> --> Invalid <creates>

[root@localhost work_31]# ./ohsm -e -a alloc.xml -r relocate.xml -i tier_info.xml -m /mnt
alloc.xml:28: parser error : Opening and ending tag mismatch: creates line 2 and create
</create>
         ^
Document not parsed successfully.

ohsm : error in parsing the allocation policy file alloc.xml

ohsm : cannot be enabled
[root@localhost work_31]#

Jan 31, 2009
#4 postri...@gmail.com
keep it to version 1.

May be libxml does not support 2.0 version.

I will verify it and update
Jan 31, 2009
Project Member #5 imreckless@gmail.com
Changing version no. was just a test case. No issues on that.
Its fine.

Checking with removing a tag. XML file now not well formed.

[root@localhost work_31]# ./ohsm -e -a alloc.xml -r relocate.xml -i tier_info.xml -m /mnt
alloc.xml:6: parser error : Opening and ending tag mismatch: create line 2 and info
        </info>
               ^
alloc.xml:7: parser error : Extra content at the end of the document
        <users>
        ^
Document not parsed successfully.

ohsm : error in parsing the allocation policy file alloc.xml

ohsm : cannot be enabled
[root@localhost work_31]#

Jan 31, 2009
Project Member #6 imreckless@gmail.com
Added groups tags inside types tag, test failed.

         </groups>
        <types>
                <groups></groups> <<--------------------- Wrong
                <type>c</type> <tier>2</tier>
                <type>h</type> <tier>1</tier>
                <type>o</type> <tier>1</tier>
                <type>k</type> <tier>1</tier>
                <type>mpeg</type> <tier>2</tier>
                <type>xxx</type> <tier>2</tier>
                <type>yyy</type> <tier>2</tier>
                <type>xx</type> <tier>2</tier>
                <type>yy</type> <tier>2</tier>
                <type>zz</type> <tier>2</tier>
        </types>


XML file parsed.
Need a DTD for validating this.
Jan 31, 2009
Project Member #7 imreckless@gmail.com
Added my name in XML file, :P
XML parsing was successful, may be anything outside the tags are not considered

                <type>xx</type> <tier>2</tier>
                <type>yy</type> <tier>2</tier>
                <type>zz</type> <tier>2</tier>
        </types>
        ROHIT  <<------------------
</create>

Jan 31, 2009
Project Member #8 imreckless@gmail.com
Entered wrong values for tags.

        <info>           
                <users>2Rohit</users>  <<--------------------Wrong
                <groups>1</groups>
                <types>10</types>
        </info>

[root@localhost work_31]# ./ohsm -e -a alloc.xml -r relocate.xml -i tier_info.xml -m /mnt

ohsm : alloc.xml : [4] : wrong value in <info><users> tag
ohsm : alloc.xml : [4] : fatal : cannot proceed further
ohsm : error in parsing the allocation policy file alloc.xml

ohsm : cannot be enabled
[root@localhost work_31]#

Jan 31, 2009
Project Member #9 imreckless@gmail.com
Prepare a DTD then XML files will be tested 
against well formed and valid.

Now testing relocation policy file.
Jan 31, 2009
Project Member #10 imreckless@gmail.com
<CREATE>
<NR_RULES>12</NR_RULES> <<-------------wrong number, should be one.
<RULE>


[root@localhost work_31]# ./ohsm -e -a alloc.xml -r relocate.xml -i tier_info.xml -m /mnt

ohsm : relocate.xml : [-1] : wrong value in <NR_RULE> number of rules less then
entered RULES
Error in parsing relocate.xml


Error in parsing the relocation file[root@localhost work_31]#


Jan 31, 2009
Project Member #11 imreckless@gmail.com
<RULE>
<NUMBER>1ihfgg</NUMBER>  <<----------------------Wrong
        <INFO>6</INFO>
   

[root@localhost work_31]# ./ohsm -e -a alloc.xml -r relocate.xml -i tier_info.xml -m /mnt

ohsm : relocate.xml : [63] : wrong value in <NR_RULE> number of rules greater then
entered RULES
ohsm : relocate.xml : [63] : fatal : cannot proceed further

Retval has value -1

Error in parsing the relocation file[root@localhost work_31]#

Jan 31, 2009
Project Member #12 sandeepksinha
Can you list all the types of errors are we handling?
I want a list of it.

Status: In-progress
Jan 31, 2009
Project Member #13 sandeepksinha
Is it not a duplicate of  issue 49  ?
Sneha can you confirm this.
If this is a duplicate you can close this.
We will track validation through #49.
Jan 31, 2009
Project Member #14 sneha.hendre@gmail.com
No this is not duplicate of  issue 49 .
It was for coding purpose as it is over i'll be closing that issue after reviewing
the code.
Feb 2, 2009
#15 postri...@gmail.com
Some last minute changes are required in the coding

It is required because we cannot force user to have allocation policy based on any
criteria.

i.e. if the user does not allocation to be based on gid then I shoould not force him
to do so
Feb 2, 2009
Project Member #16 sandeepksinha
STATUS please ??????????????????????????????
???????????????????

Mar 4, 2009
Project Member #17 sandeepksinha
Why is this issue open ?????????????????//
And without progress.

Rishi, Immediate action please.

Mar 7, 2009
Project Member #18 sandeepksinha
RISHI, looks like you dont even bother to update the issues.

Deadline : One hour from now !!!!!!!!!!!
Mar 7, 2009
#19 postri...@gmail.com
This thing has been done

There is no restriction of this sort on the user
Mar 7, 2009
#20 postri...@gmail.com
(No comment was entered for this change.)
Status: Done

Powered by Google Project Hosting