diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-03-05 00:22:01 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-03-05 00:22:01 +0000 |
commit | 92f6eacb378fe0d3ee668dc6bf17511c6781bf52 (patch) | |
tree | f800e30f1162ceff613db3d9ed3f49da9432e1e3 /rdiff-backup/testing | |
parent | 1d98cd8af3761cb473fe4ebbbdee60109a1b757a (diff) | |
download | rdiff-backup-92f6eacb378fe0d3ee668dc6bf17511c6781bf52.tar.gz |
Added test for long socket handling
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@294 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing')
-rw-r--r-- | rdiff-backup/testing/regressiontest.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/rdiff-backup/testing/regressiontest.py b/rdiff-backup/testing/regressiontest.py index 7e1c430..90b9d66 100644 --- a/rdiff-backup/testing/regressiontest.py +++ b/rdiff-backup/testing/regressiontest.py @@ -158,6 +158,33 @@ class IncrementTest1(unittest.TestCase): InternalBackup(1, 1, "testfiles/longfilenames1", Local.rpout.path, 100) InternalBackup(1, 1, "testfiles/longfilenames2", Local.rpout.path, 200) + def test_long_socket(self): + """Test backing up a directory with long sockets in them + + For some reason many unicies don't allow sockets with long + names to be made in the usual way. + + """ + sockdir = rpath.RPath(Globals.local_connection, "testfiles/sockettest") + if sockdir.lstat(): + Myrm(sockdir.path) + sockdir.setdata() + sockdir.mkdir() + tmp_sock = sockdir.append("sock") + tmp_sock.mksock() + sock1 = sockdir.append("Long_socket_name---------------------------------------------------------------------------------------------------") + self.assertRaises(rpath.SkipFileException, sock1.mksock) + rpath.rename(tmp_sock, sock1) + assert sock1.issock() + sock2 = sockdir.append("Medium_socket_name--------------------------------------------------------------") + sock2.mksock() + + Myrm(Local.rpout.path) + InternalBackup(1, 1, sockdir.path, Local.rpout.path, + current_time = 1) + InternalBackup(1, 1, "testfiles/empty", Local.rpout.path, + current_time = 10000) + def testNoWrite(self): """Test backup/restore on dirs without write permissions""" def write_string(rp, s = ""): |