[PATCH] Test for failing pread() on cygwin.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Test for failing pread() on cygwin.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@xxxxxxxxx>
---

And the test which fails on cygwin with 1.5.21 and original pread().

 t/t5610-clone-fail.sh |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/t/t5610-clone-fail.sh b/t/t5610-clone-fail.sh
new file mode 100644
index 0000000..d30b25e
--- /dev/null
+++ b/t/t5610-clone-fail.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) 2007 Stefan-W. Hahn <stefan.hahn@xxxxxxxxx>
+#
+
+test_description='test git-clone failure on cygwin using pread()
+
+This test covers the fact that git-clone fails, if pread() does not
+work properly, because the size of objects makes it neccessary to
+read data from a not zero offset.'
+
+. ./test-lib.sh
+
+# Need a repo to clone
+test_create_repo foo2
+
+GIT_AUTHOR_EMAIL=xxxxxxxx@xxxxxxxxxxxxxxxxxxxxxxxxxx
+GIT_COMMITTER_EMAIL=xxxxxxxx@xxxxxxxxxxxxxxxxxxxxxxxxxx
+export GIT_AUTHOR_EMAIL
+export GIT_COMMITTER_EMAIL
+
+(cd foo2 && echo "Hello" > file && git add file && git commit -m 'add file' >/dev/null 2>&1)
+(cd foo2 && echo "Hello2" >> file && git commit -a -m 'test' >/dev/null 2>&1)
+
+test_expect_success \
+    'clone with resolving' \
+    'git-clone foo2 bar2'
+
+test_done
-- 
1.5.0.rc0.g244a7

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]