Author: stefan2
Date: Mon Jul 29 13:52:11 2013
New Revision: 1508070
URL: http://svn.apache.org/r1508070
Log:
On the fsx branch: Merge the latest FSX-related tests changes
(r1507729,1507731,1507735,1507736) from branches/fsfs-format7.
Modified:
subversion/branches/fsx/ (props changed)
subversion/branches/fsx/subversion/libsvn_fs_x/ (props changed)
subversion/branches/fsx/subversion/tests/cmdline/svnadmin_tests.py
subversion/branches/fsx/subversion/tests/cmdline/svntest/main.py
subversion/branches/fsx/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/fsx/subversion/tests/libsvn_repos/repos-test.c
Propchange: subversion/branches/fsx/
------------------------------------------------------------------------------
Merged /subversion/branches/fsfs-format7:r1507729-1507731,1507735-1507736
Propchange: subversion/branches/fsx/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
Merged
/subversion/branches/fsfs-format7/subversion/libsvn_fs_x:r1507729-1507732,1507735-1507736
Modified: subversion/branches/fsx/subversion/tests/cmdline/svnadmin_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/tests/cmdline/svnadmin_tests.py?rev=1508070&r1=1508069&r2=1508070&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/tests/cmdline/svnadmin_tests.py
(original)
+++ subversion/branches/fsx/subversion/tests/cmdline/svnadmin_tests.py Mon Jul
29 13:52:11 2013
@@ -61,8 +61,7 @@ def check_hotcopy_bdb(src, dst):
if origerr or backerr or origout != backout:
raise svntest.Failure
-def check_hotcopy_fsfs(src, dst):
- "Verify that the SRC FSFS repository has been correctly copied to DST."
+def check_hotcopy_fsfs_fsx(src, dst):
# Walk the source and compare all files to the destination
for src_dirpath, src_dirs, src_files in os.walk(src):
# Verify that the current directory exists in the destination
@@ -146,6 +145,14 @@ def check_hotcopy_fsfs(src, dst):
f1.close()
f2.close()
+def check_hotcopy_fsfs(src, dst):
+ "Verify that the SRC FSFS repository has been correctly copied to DST."
+ check_hotcopy_fsfs_fsx(src, dst)
+
+def check_hotcopy_fsx(src, dst):
+ "Verify that the SRC FSX repository has been correctly copied to DST."
+ check_hotcopy_fsfs_fsx(src, dst)
+
#----------------------------------------------------------------------
# How we currently test 'svnadmin' --
@@ -457,8 +464,10 @@ def hotcopy_dot(sbox):
if svntest.main.is_fs_type_fsfs():
check_hotcopy_fsfs(sbox.repo_dir, backup_dir)
- else:
+ if svntest.main.is_fs_type_bdb():
check_hotcopy_bdb(sbox.repo_dir, backup_dir)
+ if svntest.main.is_fs_type_fsx():
+ check_hotcopy_fsx(sbox.repo_dir, backup_dir)
#----------------------------------------------------------------------
@@ -549,9 +558,17 @@ def verify_windows_paths_in_repos(sbox):
if errput:
raise SVNUnexpectedStderr(errput)
- # unfortunately, FSFS needs to do more checks than BDB resulting in
- # different progress output
- if svntest.main.is_fs_type_fsfs():
+ # unfortunately, some backends needs to do more checks than other
+ # resulting in different progress output
+ if svntest.main.is_fs_type_fsx():
+ svntest.verify.compare_and_display_lines(
+ "Error while running 'svnadmin verify'.",
+ 'STDERR', ["* Verifying metadata at revision 0 ...\n",
+ "* Verifying repository metadata ...\n",
+ "* Verified revision 0.\n",
+ "* Verified revision 1.\n",
+ "* Verified revision 2.\n"], output)
+ elif svntest.main.is_fs_type_fsfs():
svntest.verify.compare_and_display_lines(
"Error while running 'svnadmin verify'.",
'STDERR', ["* Verifying repository metadata ...\n",
Modified: subversion/branches/fsx/subversion/tests/cmdline/svntest/main.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/tests/cmdline/svntest/main.py?rev=1508070&r1=1508069&r2=1508070&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/fsx/subversion/tests/cmdline/svntest/main.py Mon Jul 29
13:52:11 2013
@@ -1753,7 +1753,7 @@ def _create_parser():
parser.add_option('--url', action='store',
help='Base url to the repos (e.g. svn://localhost)')
parser.add_option('--fs-type', action='store',
- help='Subversion file system type (fsfs or bdb)')
+ help='Subversion file system type (fsfs, bdb or fsx)')
parser.add_option('--cleanup', action='store_true',
help='Whether to clean up')
parser.add_option('--enable-sasl', action='store_true',
Modified: subversion/branches/fsx/subversion/tests/libsvn_fs/fs-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/tests/libsvn_fs/fs-test.c?rev=1508070&r1=1508069&r2=1508070&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/fsx/subversion/tests/libsvn_fs/fs-test.c Mon Jul 29
13:52:11 2013
@@ -5048,15 +5048,27 @@ test_fs_info_format(const svn_test_opts_
int fs_format;
svn_version_t *supports_version;
svn_version_t v1_5_0 = {1, 5, 0, ""};
+ svn_version_t v1_9_0 = {1, 9, 0, ""};
svn_test_opts_t opts2;
+ svn_boolean_t is_fsx = strcmp(opts->fs_type, "fsx") == 0;
opts2 = *opts;
- opts2.server_minor_version = 5;
+ opts2.server_minor_version = is_fsx ? 9 : 5;
SVN_ERR(svn_test__create_fs(&fs, "test-fs-format-info", &opts2, pool));
SVN_ERR(svn_fs_info_format(&fs_format, &supports_version, fs, pool, pool));
- SVN_TEST_ASSERT(fs_format == 3); /* happens to be the same for FSFS and BDB
*/
- SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_5_0));
+
+ if (is_fsx)
+ {
+ SVN_TEST_ASSERT(fs_format == 1);
+ SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_9_0));
+ }
+ else
+ {
+ /* happens to be the same for FSFS and BDB */
+ SVN_TEST_ASSERT(fs_format == 3);
+ SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_5_0));
+ }
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsx/subversion/tests/libsvn_repos/repos-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/tests/libsvn_repos/repos-test.c?rev=1508070&r1=1508069&r2=1508070&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/tests/libsvn_repos/repos-test.c
(original)
+++ subversion/branches/fsx/subversion/tests/libsvn_repos/repos-test.c Mon Jul
29 13:52:11 2013
@@ -3270,21 +3270,26 @@ test_repos_info(const svn_test_opts_t *o
svn_version_t v1_0_0 = {1, 0, 0, ""};
svn_version_t v1_4_0 = {1, 4, 0, ""};
int repos_format;
+ svn_boolean_t is_fsx = strcmp(opts->fs_type, "fsx") == 0;
opts2 = *opts;
- opts2.server_minor_version = 3;
- SVN_ERR(svn_test__create_repos(&repos, "test-repo-info-3",
- &opts2, pool));
- SVN_ERR(svn_repos_capabilities(&capabilities, repos, pool, pool));
- SVN_TEST_ASSERT(apr_hash_count(capabilities) == 0);
- SVN_ERR(svn_repos_info_format(&repos_format, &supports_version, repos,
- pool, pool));
- SVN_TEST_ASSERT(repos_format == 3);
- SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_0_0));
+ /* for repo types that have been around before 1.4 */
+ if (!is_fsx)
+ {
+ opts2.server_minor_version = 3;
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-info-3",
+ &opts2, pool));
+ SVN_ERR(svn_repos_capabilities(&capabilities, repos, pool, pool));
+ SVN_TEST_ASSERT(apr_hash_count(capabilities) == 0);
+ SVN_ERR(svn_repos_info_format(&repos_format, &supports_version, repos,
+ pool, pool));
+ SVN_TEST_ASSERT(repos_format == 3);
+ SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_0_0));
+ }
- opts2.server_minor_version = 8;
- SVN_ERR(svn_test__create_repos(&repos, "test-repo-info-8",
+ opts2.server_minor_version = 9;
+ SVN_ERR(svn_test__create_repos(&repos, "test-repo-info-9",
&opts2, pool));
SVN_ERR(svn_repos_capabilities(&capabilities, repos, pool, pool));
SVN_TEST_ASSERT(apr_hash_count(capabilities) == 1);