--- /dev/null
+#! ./tesh
+p Test the DAX loader with a DAX comprising a cycle.
+
+! expect signal SIGABRT
+$ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/simple_dax_with_cycle.xml
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [sd_daxparse/WARNING] the task root is not marked
+> [0.000000] [sd_daxparse/WARNING] the task 1@task1 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 2@task2 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 3@task3 is in a cycle
+> [0.000000] [sd_daxparse/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
+> [0.000000] [xbt/CRITICAL] A problem occurred during parsing. The simulation can't continue.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<adag xmlns="http://pegasus.isi.edu/schema/DAX"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX
+ http://pegasus.isi.edu/schema/dax-2.1.xsd"
+ version="2.1" count="1" index="0" name="smalldax"
+ jobCount="3" fileCount="0" childCount="1">
+
+ <!-- Job and control dependencies go here -->
+ <job id="1" namespace="SG" name="task1" version="1.0" runtime="10">
+ <uses file="i1" link="input" register="true" transfer="true"
+ optional="false" type="data" size="1000000"/>
+ <uses file="o1" link="output" register="true" transfer="true"
+ optional="false" type="data" size="1000000"/>
+ </job>
+ <job id="2" namespace="SG" name="task2" version="1.0" runtime="10">
+ <uses file="i2" link="input" register="true" transfer="true"
+ optional="false" type="data" size="1000000"/>
+ </job>
+ <job id="3" namespace="SG" name="task3" version="1.0" runtime="10">
+ <uses file="o1" link="input" register="true" transfer="true"
+ optional="false" type="data" size="1000000"/>
+ <uses file="o3" link="output" register="true" transfer="true"
+ optional="false" type="data" size="1000000"/>
+ </job>
+ <!-- Control-flow dependencies -->
+ <child ref="3">
+ <parent ref="2"/>
+ </child>
+ <!-- add a cycle on purpose. It won't be a DAG anymore -->
+ <child ref="1">
+ <parent ref="3"/>
+ </child>
+</adag>