| Issue 52: | OHSM policy file validation testing | |
| 1 person starred this issue and may be notified of changes. | Back to list |
We hav started with validation testing. We will try to make as many mistakes we can in policy files.
Jan 31, 2009
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
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
keep it to version 1. May be libxml does not support 2.0 version. I will verify it and update
Jan 31, 2009
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
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
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
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
Prepare a DTD then XML files will be tested against well formed and valid. Now testing relocation policy file.
Jan 31, 2009
<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
<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
Can you list all the types of errors are we handling? I want a list of it.
Status:
In-progress
Jan 31, 2009
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
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
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
STATUS please ?????????????????????????????? ???????????????????
Mar 4, 2009
Why is this issue open ?????????????????// And without progress. Rishi, Immediate action please.
Mar 7, 2009
RISHI, looks like you dont even bother to update the issues. Deadline : One hour from now !!!!!!!!!!!
Mar 7, 2009
This thing has been done There is no restriction of this sort on the user
Mar 7, 2009
(No comment was entered for this change.)
Status:
Done
|
2.2 KB View Download