One more lseek test case: in case of an error, check rv == -1

(so that it's not e.g UINT_MAX).
This commit is contained in:
pooka 2011-02-22 13:25:18 +00:00
parent 75f0848d7d
commit 6ac867388f
1 changed files with 4 additions and 1 deletions

View File

@ -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 @@ ATF_TC_BODY(lseekrv, tc)
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);