name=iscsi_target_name) self.assertExitcode(0) try: generation_count = 1 for performance_test_file in performance_test_files: start_time = time() self.data.read_raw( count=128 * 1024, seek=2 * 128 * 1024 * (generation_count - 1)) end_time = time() print "Read time (%s) %s" % (generation_count, end_time - start_time) generation_count += 1 self.dedupv1.monitor("profile") self.dedupv1.monitor("trace") self.dedupv1.monitor("stats") finally: self.open_iscsi.disconnect(server=iscsi_target_ip, name=iscsi_target_name) self.dedupv1.stop() if __name__ == "__main__": perform_systemtest( [ Dedupv1PerformanceSystemTest ])
if "state" not in m: return False return "ok" == m["state"] self.adapt_config_file("storage.gc=greedy", "storage.gc=greedy\nstorage.gc.eviction-timeout=0") self.start_default_system() self.assertTrue(self.is_fault_injection_enabled()) self.dedupv1.monitor("fault-inject", "crash=container-storage.ack.container-merge-after-secondary-put hit-points=3") filename = self.get_urandom_file(1) self.data.copy_raw(filename, 1) self.dedupv1.monitor("flush") # We want nearly empty containers self.dedupv1.monitor("idle", "force-busy=true") # We want no idling here. output = self.dedupv1.monitor("container-gc", "merge=1:2") self.assertFalse("ERROR" in output) output = self.dedupv1.monitor("container-gc", "merge=3:4") self.assertFalse("ERROR" in output) output = self.dedupv1.monitor("container-gc", "merge=1:3") self.dedupv1.start() self.assertExitcode(0) if __name__ == "__main__": perform_systemtest([Dedupv1FaultInjectSystemTest])
self.win_sys.iscsi_connect("iqn.2005-03.info.christmann:backup:special") self.assertFalse(self.remote_run.py.os.path.exists("%s:\\" % self.win_sys.drive_letter)) self.win_sys.format() self.assertTrue(self.remote_run.py.os.path.exists("%s:\\" % self.win_sys.drive_letter)) def test_copy_random_data(self, size=1024): """ test_copy_random_data """ self.start_default_system() self.dedupv1.targets("add tid=3 name=iqn.2005-03.info.christmann:backup:special") self.assertExitcode(0) self.dedupv1.volumes("attach id=4 device-name=Backup2 logical-size=500G target=iqn.2005-03.info.christmann:backup:special:0") self.assertExitcode(0) self.win_sys.iscsi_connect("iqn.2005-03.info.christmann:backup:special") self.win_sys.format() # Generate random data remote_file = self.win_sys.get_random_data_file(size) self.remote_run("xcopy %s %s" % (remote_file, "%s:\\" % self.win_sys.drive_letter)) if __name__ == "__main__": perform_systemtest([Dedupv1WindowsSystemTest])