<commit_before><?xml version="1.0"?>
<oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd">

  <generator>
    <oval:product_name>systemdunitproperty</oval:product_name>
    <oval:product_version>1.0</oval:product_version>
    <oval:schema_version>5.11</oval:schema_version>
    <oval:timestamp>2014-06-18T00:00:00-00:00</oval:timestamp>
  </generator>

  <definitions>

    <definition class="compliance" version="1" id="oval:0:def:1"> <!-- comment="true" -->
      <metadata>
        <title></title>
        <description></description>
      </metadata>
      <criteria operator="AND">
        <criterion test_ref="oval:0:tst:1"/>
        <criterion test_ref="oval:0:tst:2"/>
      </criteria>
    </definition>

  </definitions>

  <tests>

    <systemdunitproperty_test check_existence="only_one_exist" version="1" id="oval:0:tst:1" check="all" comment="true" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <object object_ref="oval:0:obj:1"/>
    </systemdunitproperty_test>
    <systemdunitproperty_test check_existence="at_least_one_exist" version="1" id="oval:0:tst:2" check="all" comment="true" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <object object_ref="oval:0:obj:2"/>
    </systemdunitproperty_test>

  </tests>

  <objects>

    <systemdunitproperty_object version="1" id="oval:0:obj:1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit>boot.mount</unit>
      <property>LoadState</property>
    </systemdunitproperty_object>

    <systemdunitproperty_object version="1" id="oval:0:obj:2" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit>boot.mount</unit>
      <property>Requires</property>
    </systemdunitproperty_object>

  </objects>

</oval_definitions>
<commit_msg>Add three new tests for systemdunitproperty probe<commit_after><?xml version="1.0"?>
<oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd">

  <generator>
    <oval:product_name>systemdunitproperty</oval:product_name>
    <oval:product_version>1.0</oval:product_version>
    <oval:schema_version>5.11</oval:schema_version>
    <oval:timestamp>2014-06-18T00:00:00-00:00</oval:timestamp>
  </generator>

  <definitions>

    <definition class="compliance" version="1" id="oval:0:def:1"> <!-- comment="true" -->
      <metadata><title></title><description></description></metadata>
      <criteria operator="AND">
        <criterion test_ref="oval:0:tst:1"/>
        <criterion test_ref="oval:0:tst:2"/>
      </criteria>
    </definition>

    <definition class="compliance" version="1" id="oval:0:def:2"> <!-- comment="true" -->
      <metadata><title></title><description></description></metadata>
      <criteria>
        <criterion test_ref="oval:0:tst:3" commnent="at least one service unit loaded or not-found"/>
      </criteria>
    </definition>

    <definition class="compliance" version="1" id="oval:0:def:3"> <!-- comment="true" -->
      <metadata><title></title><description></description></metadata>
      <criteria>
        <criterion test_ref="oval:0:tst:4" comment="at least one service unit loaded excluding not-found ones"/>
      </criteria>
    </definition>

    <definition class="compliance" version="1" id="oval:0:def:4"> <!-- comment="true" -->
      <metadata><title></title><description></description></metadata>
      <criteria>
        <criterion test_ref="oval:0:tst:5" comment="at least one service conflicting the shutdown.target"/>
      </criteria>
    </definition>

  </definitions>

  <tests>

    <systemdunitproperty_test check_existence="only_one_exist" version="1" id="oval:0:tst:1" check="all" comment="true" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <object object_ref="oval:0:obj:1"/>
    </systemdunitproperty_test>
    <systemdunitproperty_test check_existence="at_least_one_exist" version="1" id="oval:0:tst:2" check="all" comment="true" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <object object_ref="oval:0:obj:2"/>
    </systemdunitproperty_test>

    <systemdunitproperty_test id="oval:0:tst:3" check="at least one" check_existence="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="test if there's at least one service unit having LoadState equal to 'loaded' or 'not-found'" version="1">
      <object object_ref="oval:0:obj:3"/>
      <state state_ref="oval:0:ste:1"/>
    </systemdunitproperty_test>

    <systemdunitproperty_test id="oval:0:tst:4" check="at least one" check_existence="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="test if there's at least one service unit having LoadState equal to 'loaded' excluding those with LoadState 'not-found'" version="1">
      <object object_ref="oval:0:obj:4"/>
      <state state_ref="oval:0:ste:1"/>
    </systemdunitproperty_test>

    <systemdunitproperty_test id="oval:0:tst:5" check="at least one" check_existence="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="test if there's at least one service conflicting the shutdown.target" version="1">
      <object object_ref="oval:0:obj:5"/>
      <state state_ref="oval:0:ste:3"/>
    </systemdunitproperty_test>

  </tests>

  <objects>

    <systemdunitproperty_object version="1" id="oval:0:obj:1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit>boot.mount</unit>
      <property>LoadState</property>
    </systemdunitproperty_object>

    <systemdunitproperty_object version="1" id="oval:0:obj:2" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit>boot.mount</unit>
      <property>Requires</property>
    </systemdunitproperty_object>

    <systemdunitproperty_object id="oval:0:obj:3" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit operation="pattern match">.*\.service</unit>
      <property>LoadState</property>
    </systemdunitproperty_object>

    <systemdunitproperty_object id="oval:0:obj:4" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit operation="pattern match">.*\.service</unit>
      <property>LoadState</property>
      <filter action="exclude">oval:0:ste:2</filter>
    </systemdunitproperty_object>

    <systemdunitproperty_object id="oval:0:obj:5" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <unit operation="pattern match">.*\.service</unit>
      <property>Conflicts</property>
    </systemdunitproperty_object>

  </objects>

  <states>

    <systemdunitproperty_state id="oval:0:ste:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <value operation="pattern match">(loaded|not-found)</value>
    </systemdunitproperty_state>

    <systemdunitproperty_state id="oval:0:ste:2" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <value operation="equals">not-found</value>
    </systemdunitproperty_state>

    <systemdunitproperty_state id="oval:0:ste:3" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
      <value operation="pattern match">(?i)shutdown.target(?-i)</value>
    </systemdunitproperty_state>

  </states>

</oval_definitions>

{'fraction_non_alphanumeric': 0.17354544443208367, 'fraction_numerical': 0.022360663032595395, 'mean_word_length': 4.961538461538462, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 2, '>': 185, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 33}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4670838', 'n_tokens_mistral': 3129, 'n_tokens_neox': 2979, 'n_words': 364}