Source-Changes-HG archive

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

[src/trunk]: src/tests/rump/rumpvfs One more lseek test case: in case of an e...



details:   https://anonhg.NetBSD.org/src/rev/a556a7554594
branches:  trunk
changeset: 762522:a556a7554594
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 22 13:25:18 2011 +0000

description:
One more lseek test case: in case of an error, check rv == -1
(so that it's not e.g UINT_MAX).

diffstat:

 tests/rump/rumpvfs/t_basic.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r f88f7ebb38bc -r a556a7554594 tests/rump/rumpvfs/t_basic.c
--- a/tests/rump/rumpvfs/t_basic.c      Tue Feb 22 13:17:20 2011 +0000
+++ b/tests/rump/rumpvfs/t_basic.c      Tue Feb 22 13:25:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_basic.c,v 1.1 2011/02/22 10:36:13 pooka Exp $        */
+/*     $NetBSD: t_basic.c,v 1.2 2011/02/22 13:25:18 pooka Exp $        */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -62,6 +62,9 @@
        RZ(rump_init());
        RL(fd = rump_sys_open(TESTFILE, O_RDWR | O_CREAT, 0777));
 
+       rv = rump_sys_lseek(37, FIVE_MEGS, SEEK_SET);
+       ATF_REQUIRE_ERRNO(EBADF, rv == -1);
+
        rv = rump_sys_lseek(fd, FIVE_MEGS, SEEK_SET);
        ATF_REQUIRE_EQ(rv, FIVE_MEGS);
 



Home | Main Index | Thread Index | Old Index