Commit Graph

651 Commits (9ed0e374218969558008d63ef37fc03aeef0b5cf)

Author SHA1 Message Date
Aaron Jacobs 2b71f8cbe8 PosixTest.MkdirInParallel 2015-05-21 15:19:39 +10:00
Aaron Jacobs 150440d500 Return EEXIST from create. This appears to work, on OS X at least. 2015-05-21 15:14:16 +10:00
Aaron Jacobs 0407fb7690 Added memfs create in parallel tests. 2015-05-21 14:30:52 +10:00
Aaron Jacobs 4269d7cd47 Check for already existing in memFS.CreateFile. 2015-05-21 14:25:29 +10:00
Aaron Jacobs 63888f4ddd PosixTest.CreateInParallel_Exclusive 2015-05-21 14:24:45 +10:00
Aaron Jacobs 25ded77e80 PosixTest.CreateInParallel_Truncate 2015-05-21 14:24:45 +10:00
Aaron Jacobs e69cd9188e Split out into a reusable function. 2015-05-21 14:24:45 +10:00
Aaron Jacobs e295ef6019 Fixed two test bugs. 2015-05-21 14:24:45 +10:00
Aaron Jacobs 113fabe937 Don't forget to close. 2015-05-21 14:24:44 +10:00
Aaron Jacobs acccaf1e28 PosixTest.CreateInParallel_NoTruncate 2015-05-21 14:24:44 +10:00
Aaron Jacobs f073423b67 Added test names. 2015-05-21 14:24:44 +10:00
Aaron Jacobs f385176a96 Renamed to memfs.go. 2015-05-21 13:23:18 +10:00
Aaron Jacobs 3086e28fe4 Fixed a bug. 2015-05-19 16:08:50 +10:00
Aaron Jacobs c75db4a11f memFS.ReadSymlin 2015-05-19 16:07:53 +10:00
Aaron Jacobs dcaf480759 MemFSTest.DeleteSymlink 2015-05-19 16:01:36 +10:00
Aaron Jacobs cec7824a4b Made MemFSTest.CreateSymlink more thorough. 2015-05-19 16:00:28 +10:00
Aaron Jacobs 9b36fa15f8 Todone. 2015-05-19 15:57:54 +10:00
Aaron Jacobs 1cda3987e5 memFS.CreateSymlink 2015-05-19 15:57:19 +10:00
Aaron Jacobs 1f56395068 Fixed more errors. 2015-05-19 15:53:01 +10:00
Aaron Jacobs 6f8dbe44b0 Restored lost code. 2015-05-19 15:52:28 +10:00
Aaron Jacobs fe7d0eab90 Fixed more build errors. 2015-05-19 15:51:38 +10:00
Aaron Jacobs 4cfaa1e1e7 Fixed more build errors. 2015-05-19 15:50:12 +10:00
Aaron Jacobs 1c244c414a Fixed some build errors. 2015-05-19 15:49:51 +10:00
Aaron Jacobs 2e7ac1c44b No reader locks. 2015-05-19 15:49:13 +10:00
Aaron Jacobs 5184f42e34 Updated annotations. 2015-05-19 15:48:39 +10:00
Aaron Jacobs 6fdbd3c0c2 Fixed names. 2015-05-19 15:48:17 +10:00
Aaron Jacobs ccac11385f Updated inode contents. 2015-05-19 15:46:09 +10:00
Aaron Jacobs 35770118ce MemFSTest.ReadLink_NotASymlink 2015-05-19 15:26:25 +10:00
Aaron Jacobs 4537a6fb9b MemFSTest.ReadLink_NonExistent 2015-05-19 15:25:31 +10:00
Aaron Jacobs 2a58039db5 MemFSTest.CreateSymlink_AlreadyExists 2015-05-19 15:24:53 +10:00
Aaron Jacobs d2fd911271 Added two more names. 2015-05-19 15:22:50 +10:00
Aaron Jacobs 0a9c888d54 MemFSTest.CreateSymlink 2015-05-19 15:22:31 +10:00
Aaron Jacobs c478c23404 MemFSTest.HardLinks 2015-05-19 15:21:07 +10:00
Aaron Jacobs ba58fa8721 Added test names. 2015-05-19 15:18:50 +10:00
Aaron Jacobs 0c77f49eab Made a test work on both Linux and OS X. 2015-05-18 10:20:21 +10:00
Aaron Jacobs 3338682836 ReadOnlyTest.ReadDir 2015-05-18 10:16:49 +10:00
Aaron Jacobs 9e9c2ac2c9 ReadOnlyTest.StatFiles 2015-05-18 10:15:51 +10:00
Aaron Jacobs 7bef9dadfe Fixed tests to match real behavior. 2015-05-18 10:15:16 +10:00
Aaron Jacobs f547825dfa ReadOnlyTest.Chmod 2015-05-18 10:14:57 +10:00
Aaron Jacobs 039f159ab1 ReadOnlyTest.Chtimes 2015-05-18 10:14:19 +10:00
Aaron Jacobs dbc48cd39f ReadOnlyTest.OpenForWrite 2015-05-18 10:13:28 +10:00
Aaron Jacobs 87e443860a ReadOnlyTest.Mkdir 2015-05-18 10:11:21 +10:00
Aaron Jacobs 409c174eac ReadOnlyTest.CreateFile 2015-05-18 10:11:03 +10:00
Aaron Jacobs 2931e283d2 ReadOnlyTest.ReadRoot 2015-05-18 10:07:41 +10:00
Aaron Jacobs fc1e4aab6b flushFS.ReadDir 2015-05-18 10:06:19 +10:00
Aaron Jacobs 2f2c40a367 Allow opening the root dir in flushfs. 2015-05-18 09:58:40 +10:00
Aaron Jacobs 9ee0e4a22f Started ReadOnlyTest.ReadRoot. 2015-05-18 09:57:05 +10:00
Aaron Jacobs 68a2e8a068 Added the mount_sample flag. 2015-05-18 09:55:39 +10:00
Aaron Jacobs 20ff8c6aec ReadOnlyTest.SetUp 2015-05-18 09:54:34 +10:00
Aaron Jacobs 7caa7e6e91 Added test names. 2015-05-18 09:52:10 +10:00
Aaron Jacobs 306840e4ce Wait less time, making the test faster. 2015-05-05 12:34:07 +10:00
Aaron Jacobs 130ddabc42 InterruptFSTest.InterruptedDuringRead 2015-05-05 12:32:36 +10:00
Aaron Jacobs 1236f0e278 Most of InterruptFSTest.InterruptedDuringRead. 2015-05-05 12:28:18 +10:00
Aaron Jacobs be24b2b3e3 Signal in flight. 2015-05-05 10:34:40 +10:00
Aaron Jacobs 0b00132020 InterruptFS.ReadFile 2015-05-05 10:34:40 +10:00
Aaron Jacobs aeca4a00d5 Fixed a bug. 2015-05-05 10:34:40 +10:00
Aaron Jacobs 8010a8342d InterruptFS.WaitForReadInFlight 2015-05-05 10:34:40 +10:00
Aaron Jacobs fe14fa8f3e Started InterruptFSTest.InterruptedDuringRead. 2015-05-05 10:34:40 +10:00
Aaron Jacobs d862e4b035 interruptfs.New 2015-05-05 10:34:40 +10:00
Aaron Jacobs 5fd9008838 Began on a test. 2015-05-05 10:34:39 +10:00
Aaron Jacobs 7af2286422 Began on interruptfs. 2015-05-05 10:34:39 +10:00
Aaron Jacobs f52a6099c6 Pass along the test context to the server. 2015-05-01 11:20:43 +10:00
Aaron Jacobs a76742833c Plumb through the ogletest context. 2015-05-01 11:11:32 +10:00
Aaron Jacobs 6305cb930b Synchronize on ops in flight in tear-down, fixing forgetfs_test. 2015-04-02 11:10:55 +11:00
Aaron Jacobs 40fdee8c78 Made tests pickier about ReadDir. 2015-04-01 09:05:26 +11:00
Aaron Jacobs e859e64179 fsImpl.Check: Bail out early on Linux.
To my great disappointment, I can't figure out a way to make this test
reliable on Linux. Hopefully the cited mailing list thread will come
through.
2015-03-31 16:01:22 +11:00
Aaron Jacobs 2dd919f8f3 Fixed misspecification of forget behavior for the root inode. 2015-03-31 15:25:20 +11:00
Aaron Jacobs 074e69a3df fsImpl.MkDir 2015-03-31 10:15:46 +11:00
Aaron Jacobs 1bceb941b1 fsImpl.CreateFile 2015-03-31 10:15:06 +11:00
Aaron Jacobs 11878520a6 fsImpl.OpenDir 2015-03-31 10:11:00 +11:00
Aaron Jacobs a31287ac35 ForgetFSTest.MkDir 2015-03-31 10:09:58 +11:00
Aaron Jacobs c0d3a195c6 ForgetFSTest.CreateFile 2015-03-31 10:09:09 +11:00
Aaron Jacobs ce13e404fd ForgetFSTest.Stat_ManyTimes 2015-03-31 10:07:43 +11:00
Aaron Jacobs a84040dc15 ForgetFSTest.Stat_Bar 2015-03-31 10:07:07 +11:00
Aaron Jacobs fb6dcee4d0 ForgetFSTest.Stat_Foo 2015-03-31 10:06:51 +11:00
Aaron Jacobs ea13e766fd ForgetFSTest.Open_ManyTimes 2015-03-31 10:06:06 +11:00
Aaron Jacobs a11be99f88 ForgetFSTest.Open_Bar 2015-03-31 10:04:29 +11:00
Aaron Jacobs fef47a3a32 fsImpl.ForgetInode 2015-03-31 10:01:09 +11:00
Aaron Jacobs ee2040958c The root inode ends with a lookup count of one, too. 2015-03-31 09:53:39 +11:00
Aaron Jacobs 8e04b7d848 fsImpl.OpenFile 2015-03-31 09:50:01 +11:00
Aaron Jacobs 50cda17355 Fixed a panic. 2015-03-31 09:48:50 +11:00
Aaron Jacobs d0a8174ec0 fsImpl.LookUpInode. 2015-03-31 09:46:01 +11:00
Aaron Jacobs 541223bb07 fsImpl.GetInodeAttributes 2015-03-31 09:39:27 +11:00
Aaron Jacobs a573f6e575 The root inode begins with a lookup count of 1.
Cf. jacobsa/fuse@36d7193638
2015-03-30 16:36:28 +11:00
Aaron Jacobs ded5091c2e ForgetFSTest.Open_Foo 2015-03-30 16:35:37 +11:00
Aaron Jacobs f76439120c Check 2015-03-30 16:35:37 +11:00
Aaron Jacobs a787be87bb fsImpl.checkInvariants 2015-03-30 16:35:37 +11:00
Aaron Jacobs b2b1b6a4ef Added fsImpl members. 2015-03-30 16:35:37 +11:00
Aaron Jacobs a37b22d786 fsImpl.Init 2015-03-30 16:35:37 +11:00
Aaron Jacobs 42cefe94f7 Revised a plan. 2015-03-30 16:35:37 +11:00
Aaron Jacobs 8e8c391a21 Made a panic clearer. 2015-03-30 16:35:37 +11:00
Aaron Jacobs faba594f7f ForgetFSTest.SetUp 2015-03-30 16:35:37 +11:00
Aaron Jacobs 36643c8daf Added test names. 2015-03-30 16:35:36 +11:00
Aaron Jacobs d4e690f2f8 Added a test stub. 2015-03-30 16:35:36 +11:00
Aaron Jacobs 987e4f4087 Sketched forgetfs. 2015-03-30 16:35:36 +11:00
Aaron Jacobs 0e7e9c3f78 Added a memfs test for a large file.
To help investigate googlecloudplatform/gcsfuse#27.
2015-03-26 15:54:17 +11:00
Aaron Jacobs d1186c7579 Fixed a build error. 2015-03-25 10:17:02 +11:00
Aaron Jacobs e2a8e77cdc Replaced MountedFileSystem.Unmount with a free function. 2015-03-25 10:15:43 +11:00
Aaron Jacobs 5aa47ca47c Fixed memfs. 2015-03-25 10:00:43 +11:00
Aaron Jacobs 74b847919c Fixed flushfs. 2015-03-25 10:00:19 +11:00
Aaron Jacobs d7e70cb7dc Fixed cachingfs. 2015-03-25 10:00:01 +11:00
Aaron Jacobs c1a851403d Added a RespondToOp helper. 2015-03-25 09:59:24 +11:00
Aaron Jacobs e96100b5ac Fixed hellofs. 2015-03-25 09:55:11 +11:00
Aaron Jacobs e1e438439c Use FileSystem in memfs. 2015-03-25 09:35:32 +11:00
Aaron Jacobs beb1ac7430 Use FileSystem in flushfs. 2015-03-25 09:33:04 +11:00
Aaron Jacobs e0aecb1d0b Use FileSystem in cachingfs. 2015-03-25 09:31:43 +11:00
Aaron Jacobs a01f4b6ae5 Use FileSystem in hellofs. 2015-03-25 09:29:24 +11:00
Aaron Jacobs 2cc1bfaafd Removed some references to FileSystem. 2015-03-24 16:34:43 +11:00
Aaron Jacobs e3ed9f153f Fixed memfs dispatch bugs. 2015-03-24 16:27:00 +11:00
Aaron Jacobs a361e12cab Updated memfs_test. 2015-03-24 16:25:26 +11:00
Aaron Jacobs 417c54c1a4 Started ServeOps. 2015-03-24 16:25:10 +11:00
Aaron Jacobs 0a06b97691 More memfs fixes. 2015-03-24 16:24:43 +11:00
Aaron Jacobs 05e62e432c Simple memfs edits. 2015-03-24 16:20:32 +11:00
Aaron Jacobs fd7866ea8b Fixed flushfs bugs. 2015-03-24 16:19:09 +11:00
Aaron Jacobs 79ec56b9fa Updated mount_sample. 2015-03-24 16:17:56 +11:00
Aaron Jacobs 9a704e1cd1 Mostly updated flushfs. 2015-03-24 16:17:10 +11:00
Aaron Jacobs 9190eea002 Fixed several build errors. 2015-03-24 16:14:42 +11:00
Aaron Jacobs 95557166b5 Updated cachingfs test. 2015-03-24 16:13:34 +11:00
Aaron Jacobs e0068fc2a7 Updated cachingfs. 2015-03-24 16:13:01 +11:00
Aaron Jacobs ca8df835f6 Fixed more errors. 2015-03-24 16:10:28 +11:00
Aaron Jacobs fc3e144abf Fixed simple cachingfs errors. 2015-03-24 16:09:29 +11:00
Aaron Jacobs cfc692da07 Made Server an interface, for expandability. 2015-03-24 16:08:42 +11:00
Aaron Jacobs 25a2502636 Updated hellofs. 2015-03-24 16:00:46 +11:00
Aaron Jacobs 3dcd942c33 Added support for Init in hellofs. 2015-03-24 15:49:26 +11:00
Aaron Jacobs 7393225029 Fixed hello_fs_test build errors. 2015-03-24 15:47:26 +11:00
Aaron Jacobs eca0a3760e Refactored hellofs. 2015-03-24 15:46:49 +11:00
Aaron Jacobs 5a83972716 Other HelloFS methods. 2015-03-24 15:43:19 +11:00
Aaron Jacobs 32d8d19879 HelloFS.Init 2015-03-24 15:40:31 +11:00
Aaron Jacobs 402cc580b2 Fixed some hellofs build errors. 2015-03-24 15:39:45 +11:00
Aaron Jacobs d84d821a32 Updated the samples package. 2015-03-24 15:38:40 +11:00
Aaron Jacobs 32da7d5015 FsyncErrorTest.Msync 2015-03-24 13:49:44 +11:00
Aaron Jacobs a0d210e535 Updated msync tests after setting MS_SYNC. 2015-03-24 13:36:33 +11:00
Aaron Jacobs 80c462596d Oops, set MS_SYNC or Linux does nothing. 2015-03-24 13:32:41 +11:00
Aaron Jacobs 3aaca555a4 NoErrorsTest.Mmap_WithMsync_CloseBeforeMunmap 2015-03-24 13:01:32 +11:00
Aaron Jacobs 2f5062ac6c Oops, msync helper is broken. 2015-03-24 13:00:18 +11:00
Aaron Jacobs 331695907b Oops, forgot to msync. 2015-03-24 12:58:59 +11:00
Aaron Jacobs 597e126409 NoErrorsTest.Mmap_WithMsync_MunmapBeforeClose 2015-03-24 12:57:38 +11:00
Aaron Jacobs 0888482d8a Implemented msync helper. 2015-03-24 12:56:01 +11:00
Aaron Jacobs edd7a48815 Declared msync-related tests. 2015-03-24 12:53:40 +11:00
Aaron Jacobs a032446479 Removed GOMAXPROCS-related workarounds.
These are no longer needed as of the work in #4.
2015-03-24 12:53:12 +11:00
Aaron Jacobs e4e12848fb Fixed fdatasync build errors on darwin. 2015-03-24 12:31:16 +11:00
Aaron Jacobs cf22c43238 Removed redundant checks that don't work for all error types. 2015-03-24 12:26:22 +11:00
Aaron Jacobs e74d8b6a85 Added a --debug flag. 2015-03-24 12:25:27 +11:00
Aaron Jacobs db0ab82bdd FsyncErrorTest.Fdatasync 2015-03-24 12:24:00 +11:00
Aaron Jacobs 51f6b01135 NoErrorsTest.Fdatasync 2015-03-24 12:22:25 +11:00
Aaron Jacobs 5f3f94992c Undid debugging changes. 2015-03-24 12:04:47 +11:00
Aaron Jacobs fddf222e4f Declared fdatasync tests. 2015-03-24 12:04:16 +11:00
Aaron Jacobs 096c3fa695 Added a test for directories. 2015-03-24 12:02:48 +11:00
Aaron Jacobs 38862e8650 Set GOMAXPROCS=2 in mount_sample to help flush out issues like #4. 2015-03-24 11:53:32 +11:00
Aaron Jacobs 4584e4de8f Be consistent about file names. 2015-03-24 11:27:58 +11:00
Aaron Jacobs 12b184c011 Clean up after the tool binary. 2015-03-24 11:27:18 +11:00
Aaron Jacobs 6cc47f10ed Unlink mount points on tear-down. 2015-03-24 11:04:15 +11:00
Aaron Jacobs 5a7e50daa6 Use a helper to be more sure that temp files are cleaned up at exit. 2015-03-24 10:59:46 +11:00
Aaron Jacobs b5e00243ba Allow re-using the mount_sample binary across runs. 2015-03-24 10:24:08 +11:00
Aaron Jacobs 6729af8524 Synchronize on ready with a pipe. 2015-03-24 10:08:17 +11:00
Aaron Jacobs 49455cd59c Wait for tool in a goroutine. 2015-03-24 09:59:13 +11:00
Aaron Jacobs b62be9632c Pass report files by file descriptor. 2015-03-24 09:46:05 +11:00
Aaron Jacobs a438466587 Fixed another invocation problem. 2015-03-24 09:27:09 +11:00
Aaron Jacobs 6b6c7c92ca Added a sleep workaround for now. 2015-03-24 09:26:41 +11:00
Aaron Jacobs 61f3528c80 Fixed another invocation bug. 2015-03-24 09:26:16 +11:00
Aaron Jacobs 47445387e7 Fixed an invocation bug. 2015-03-24 09:25:43 +11:00
Aaron Jacobs 258104ae32 Include stderr in exit errors. 2015-03-24 09:22:39 +11:00
Aaron Jacobs 39dfb0c887 Don't hide command termination errors behind unmount errors. 2015-03-24 09:07:30 +11:00
Aaron Jacobs dff6fe8c82 Share unmount code. 2015-03-24 09:00:50 +11:00
Aaron Jacobs 53d662ca0b Fixed go build arg order. 2015-03-24 08:53:52 +11:00
Aaron Jacobs d12a25db1c Fixed two build errors. 2015-03-24 08:53:11 +11:00
Aaron Jacobs 2665bd1342 Other SetUp methods. 2015-03-24 08:52:56 +11:00
Aaron Jacobs f92de1a6e7 NoErrorsTest.SetUp 2015-03-24 08:52:05 +11:00
Aaron Jacobs ddfca9cb6b Implemented readReports. 2015-03-24 08:51:19 +11:00
Aaron Jacobs c090f136cd Implemented getFlushes and getFsyncs. 2015-03-24 08:45:01 +11:00
Aaron Jacobs cab543fa8c Fixed more build errors. 2015-03-24 08:43:24 +11:00
Aaron Jacobs e7dc200b88 Fixed some build errors. 2015-03-24 08:43:03 +11:00
Aaron Jacobs bfa3465cb9 Open and close reporting files. 2015-03-24 08:42:39 +11:00
Aaron Jacobs 01470b8c34 Fixed test names. 2015-03-24 08:40:35 +11:00
Aaron Jacobs f0ae4d753e Recategorized tests. 2015-03-24 08:39:22 +11:00
Aaron Jacobs 5dde9ea0b7 Fixed a silly mistake. 2015-03-23 16:36:07 +11:00
Aaron Jacobs f02cc98b33 Fixed some build errors. 2015-03-23 16:35:42 +11:00
Aaron Jacobs 3924e25eb8 Refactored helpers. 2015-03-23 16:35:19 +11:00
Aaron Jacobs 4ca6ed02c6 flushFSTest.setUp. 2015-03-23 16:34:39 +11:00
Aaron Jacobs 27722cb25a invokeMountSample 2015-03-23 16:32:50 +11:00
Aaron Jacobs ee8e869e35 buildMountSample 2015-03-23 16:31:52 +11:00
Aaron Jacobs 5001868f24 Sketched invokeMountSample. 2015-03-23 16:26:15 +11:00
Aaron Jacobs 9ae1064493 Fixed a comment. 2015-03-23 16:23:22 +11:00
Aaron Jacobs 0a588af19f Fixed some comments. 2015-03-23 16:16:51 +11:00
Aaron Jacobs ff9c68f93c Begain on a SubprocessTest helper. 2015-03-23 16:15:53 +11:00
Aaron Jacobs f211ff829b Renamed testing.go to in_process.go. 2015-03-23 16:13:18 +11:00
Aaron Jacobs 7066fecc45 Began on helper. 2015-03-23 16:12:02 +11:00
Aaron Jacobs e997c8fc91 Began categorizing tests. 2015-03-23 16:11:01 +11:00
Aaron Jacobs ad0a833fa7 makeFlushFS 2015-03-23 16:08:46 +11:00
Aaron Jacobs 215f15bdc7 Sketched makeFS. 2015-03-23 16:01:16 +11:00
Aaron Jacobs 06fb8e2f13 Sketched main. 2015-03-23 16:00:12 +11:00
Aaron Jacobs 0bbe4cfa3d Added flags for flushfs. 2015-03-23 15:54:20 +11:00
Aaron Jacobs 9b88ab0cc3 Began working on a generic mounting tool for samples/.
For jacobsa/fuse#4.
2015-03-23 15:52:27 +11:00
Aaron Jacobs 64d7bf8a69 Worked around osxfuse/osxfuse#202. 2015-03-23 12:28:13 +11:00
Aaron Jacobs 5908a93101 FlushFSTest.Mmap_MunmapBeforeClose 2015-03-23 11:40:36 +11:00
Aaron Jacobs 7020914422 FlushFSTest.Mmap_CloseBeforeMunmap 2015-03-23 11:40:03 +11:00
Aaron Jacobs 2728137e7d Worked around a deadlock in FlushFSTest.Mmap. 2015-03-23 11:16:39 +11:00
Aaron Jacobs 68a8062681 FlushFSTest.Mmap 2015-03-23 10:52:37 +11:00
Aaron Jacobs fef2721042 Fixed FlushFSTest.Dup_FlushError for darwin. 2015-03-23 10:43:32 +11:00
Aaron Jacobs d2445f678d Fixed FlushFSTest.Dup for darwin. 2015-03-23 10:41:59 +11:00