summaryrefslogtreecommitdiff
path: root/memcheck
diff options
context:
space:
mode:
authorbart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9>2008-06-23 18:57:48 +0000
committerbart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9>2008-06-23 18:57:48 +0000
commita4a86e3cefe8826275c6c104f69fa92a75301677 (patch)
treef0de142235363896009b887b2f71f57b4e727ffb /memcheck
parent654013c92f33a16990deed6d507f6407a9a332e1 (diff)
Added missing mode_t argument to open() system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8274 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'memcheck')
-rw-r--r--memcheck/tests/file_locking.c4
-rw-r--r--memcheck/tests/file_locking.stderr.exp2
2 files changed, 3 insertions, 3 deletions
diff --git a/memcheck/tests/file_locking.c b/memcheck/tests/file_locking.c
index fe5bff48..9d833377 100644
--- a/memcheck/tests/file_locking.c
+++ b/memcheck/tests/file_locking.c
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
unlink(filename);
- if ((fd1 = open(filename, O_RDWR | O_CREAT)) >= 0)
+ if ((fd1 = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) >= 0)
{
fprintf(stderr, "About to lock file for writing.\n");
if (lock_file(fd1))
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
}
else
{
- fprintf(stderr, "ERROR: second lock attempt succeeded !\n");
+ fprintf(stderr, "Second locking attempt succeeded.\n");
}
close(fd2);
}
diff --git a/memcheck/tests/file_locking.stderr.exp b/memcheck/tests/file_locking.stderr.exp
index e12d4346..df5bcfa9 100644
--- a/memcheck/tests/file_locking.stderr.exp
+++ b/memcheck/tests/file_locking.stderr.exp
@@ -1,4 +1,4 @@
About to lock file for writing.
First locking attempt succeeded.
-second open call: Permission denied
+Second locking attempt succeeded.
Test finished successfully.