diff --git a/CHANGES.txt b/CHANGES.txt
index df8609e29b6..9e49dd399ea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -125,6 +125,9 @@ Release 0.21.0 - Unreleased
NEW FEATURES
+ HADOOP-6332. Large-scale Automated Test Framework. (sharad, Sreekanth
+ Ramakrishnan, at all via cos)
+
HADOOP-4268. Change fsck to use ClientProtocol methods so that the
corresponding permission requirement for running the ClientProtocol
methods will be enforced. (szetszwo)
diff --git a/build.xml b/build.xml
index cc827e2ec0e..11cda1b5237 100644
--- a/build.xml
+++ b/build.xml
@@ -92,6 +92,7 @@
+
@@ -565,6 +566,7 @@
description="Make hadoop-fi.jar">
@@ -618,71 +620,96 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -1175,7 +1202,8 @@
classpathref="mvn-ant-task.classpath"/>
-
diff --git a/ivy/hadoop-core-system-template.xml b/ivy/hadoop-core-system-template.xml
new file mode 100644
index 00000000000..d17596c7f7d
--- /dev/null
+++ b/ivy/hadoop-core-system-template.xml
@@ -0,0 +1,127 @@
+
+
+
+ 4.0.0
+ org.apache.hadoop
+ hadoop-core
+ jar
+ @version
+
+
+ commons-cli
+ commons-cli
+ 1.2
+
+
+ xmlenc
+ xmlenc
+ 0.52
+
+
+ commons-httpclient
+ commons-httpclient
+ 3.0.1
+
+
+ commons-codec
+ commons-codec
+ 1.4
+
+
+ commons-net
+ commons-net
+ 1.4.1
+
+
+ org.mortbay.jetty
+ jetty
+ 6.1.14
+
+
+ org.mortbay.jetty
+ jetty-util
+ 6.1.14
+
+
+ tomcat
+ jasper-runtime
+ 5.5.12
+
+
+ tomcat
+ jasper-compiler
+ 5.5.12
+
+
+ org.mortbay.jetty
+ jsp-api-2.1
+ 6.1.14
+
+
+ org.mortbay.jetty
+ jsp-2.1
+ 6.1.14
+
+
+ commons-el
+ commons-el
+ 1.0
+
+
+ net.java.dev.jets3t
+ jets3t
+ 0.7.1
+
+
+ commons-net
+ commons-net
+ 1.4.1
+
+
+ org.mortbay.jetty
+ servlet-api-2.5
+ 6.1.14
+
+
+ net.sf.kosmosfs
+ kfs
+ 0.3
+
+
+ junit
+ junit
+ 4.5
+
+
+ hsqldb
+ hsqldb
+ 1.8.0.10
+
+
+ oro
+ oro
+ 2.0.8
+
+
+ org.apache.hadoop
+ avro
+ 1.3.0
+
+
+
diff --git a/ivy/hadoop-core-system.pom b/ivy/hadoop-core-system.pom
new file mode 100644
index 00000000000..8f11854c253
--- /dev/null
+++ b/ivy/hadoop-core-system.pom
@@ -0,0 +1,258 @@
+
+
+
+
+ 4.0.0
+ org.apache.hadoop
+ hadoop-core-system
+ jar
+ ${hadoop.version}
+
+ Hadoop is the distributed computing framework of Apache;
+ hadoop-core-system contains shared classes of embeded
+ Hadoop test framework for system testing.
+
+
+
+ Apache License, Version 2.0
+ http://apache.org/licenses/LICENSE-2.0
+
+
+
+
+
+
+
+ commons-logging
+ commons-logging
+ ${commons-logging.version}
+
+
+ avalon-framework
+ avalon-framework
+
+
+ javax.servlet
+ servlet-api
+
+
+ junit
+ junit
+
+
+ logkit
+ logkit
+
+
+ log4j
+ log4j
+
+
+
+
+
+ log4j
+ log4j
+ ${log4j.version}
+ optional
+
+
+ javax.mail
+ mail
+
+
+ javax.jms
+ jms
+
+
+ com.sun.jdmk
+ jmxtools
+
+
+ com.sun.jmx
+ jmxri
+
+
+
+
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j-api.version}
+ optional
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j-log4j12.version}
+ optional
+
+
+ log4j
+ log4j
+
+
+
+
+
+
+
+ commons-httpclient
+ commons-httpclient
+ 3.1
+ optional
+
+
+ commons-logging
+ commons-logging
+
+
+ junit
+ junit
+
+
+
+
+ commons-codec
+ commons-codec
+ 1.3
+ optional
+
+
+
+
+ commons-cli
+ commons-cli
+ 2.0-20070823
+ optional
+
+
+
+
+
+ commons-net
+ commons-net
+ 1.4.1
+ optional
+
+
+
+
+ javax.servlet
+ servlet-api
+ ${servlet-api.version}
+ optional
+
+
+ jetty
+ org.mortbay.jetty
+ ${jetty.version}
+ optional
+
+
+
+
+
+
+ org.mortbay.jetty
+ jsp-2.1
+ ${jetty.version}
+ optional
+
+
+ org.mortbay.jetty
+ jsp-api-2.1
+ ${jetty.version}
+ optional
+
+
+ commons-el
+ commons-el
+ ${commons-el.version}
+ optional
+
+
+
+
+
+
+ org.eclipse.jdt
+ core
+ ${core.version}
+ optional
+
+
+ org.apache.ant
+ ant
+ ${apacheant.version}
+ optional
+
+
+
+
+
+ net.java.dev.jets3t
+ jets3t
+ ${jets3t.version}
+ optional
+
+
+ commons-logging
+ commons-logging
+
+
+ junit
+ junit
+
+
+
+
+
+
+
+
+
+ xmlenc
+ xmlenc
+ 0.52
+ optional
+
+
+
diff --git a/ivy/hadoop-core-system.xml b/ivy/hadoop-core-system.xml
new file mode 100644
index 00000000000..e5f8e926447
--- /dev/null
+++ b/ivy/hadoop-core-system.xml
@@ -0,0 +1,127 @@
+
+
+
+ 4.0.0
+ org.apache.hadoop
+ hadoop-core-system
+ jar
+ 0.22.0-SNAPSHOT
+
+
+ commons-cli
+ commons-cli
+ 1.2
+
+
+ xmlenc
+ xmlenc
+ 0.52
+
+
+ commons-httpclient
+ commons-httpclient
+ 3.0.1
+
+
+ commons-codec
+ commons-codec
+ 1.4
+
+
+ commons-net
+ commons-net
+ 1.4.1
+
+
+ org.mortbay.jetty
+ jetty
+ 6.1.14
+
+
+ org.mortbay.jetty
+ jetty-util
+ 6.1.14
+
+
+ tomcat
+ jasper-runtime
+ 5.5.12
+
+
+ tomcat
+ jasper-compiler
+ 5.5.12
+
+
+ org.mortbay.jetty
+ jsp-api-2.1
+ 6.1.14
+
+
+ org.mortbay.jetty
+ jsp-2.1
+ 6.1.14
+
+
+ commons-el
+ commons-el
+ 1.0
+
+
+ net.java.dev.jets3t
+ jets3t
+ 0.7.1
+
+
+ commons-net
+ commons-net
+ 1.4.1
+
+
+ org.mortbay.jetty
+ servlet-api-2.5
+ 6.1.14
+
+
+ net.sf.kosmosfs
+ kfs
+ 0.3
+
+
+ junit
+ junit
+ 4.5
+
+
+ hsqldb
+ hsqldb
+ 1.8.0.10
+
+
+ oro
+ oro
+ 2.0.8
+
+
+ org.apache.hadoop
+ avro
+ 1.3.0
+
+
+
diff --git a/src/test/all-tests b/src/test/all-tests
new file mode 100644
index 00000000000..a945de64318
--- /dev/null
+++ b/src/test/all-tests
@@ -0,0 +1 @@
+**/Test*.java
diff --git a/src/test/aop/build/aop.xml b/src/test/aop/build/aop.xml
index 5e562b5b7c1..3adce1ac3d2 100644
--- a/src/test/aop/build/aop.xml
+++ b/src/test/aop/build/aop.xml
@@ -14,13 +14,27 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
+
+
+
+
+
+
+
+
+
+
+
@@ -46,15 +60,19 @@
-
+
+
+
+
+
@@ -69,15 +87,76 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -99,11 +178,12 @@
+
-
+
@@ -129,4 +209,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/system/aop/org/apache/hadoop/test/system/DaemonProtocolAspect.aj b/src/test/system/aop/org/apache/hadoop/test/system/DaemonProtocolAspect.aj
new file mode 100644
index 00000000000..1f3567e21b0
--- /dev/null
+++ b/src/test/system/aop/org/apache/hadoop/test/system/DaemonProtocolAspect.aj
@@ -0,0 +1,287 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.test.system;
+
+import java.io.File;
+import java.io.IOException;
+import java.security.PrivilegedExceptionAction;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Properties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.hadoop.util.Shell.ShellCommandExecutor;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.conf.Configuration;
+
+/**
+ * Default DaemonProtocolAspect which is used to provide default implementation
+ * for all the common daemon methods. If a daemon requires more specialized
+ * version of method, it is responsibility of the DaemonClient to introduce the
+ * same in woven classes.
+ *
+ */
+public aspect DaemonProtocolAspect {
+
+ private boolean DaemonProtocol.ready;
+
+ @SuppressWarnings("unchecked")
+ private HashMap