All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] open12 failing on i386 with EOVERFLOW
       [not found] <933677084.9868450.1408538960160.JavaMail.zimbra@redhat.com>
@ 2014-08-20 12:53 ` Jan Stancek
  2014-08-20 12:56   ` Jan Stancek
  2014-08-20 14:19   ` chrubis
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Stancek @ 2014-08-20 12:53 UTC (permalink / raw)
  To: ltp-list

Hi,

I'm seeing following failure in this testcase on RHEL-6.5 Server i386 GA distro:

# env PATH=`pwd`:$PATH ./open12
open12      1  TFAIL  :  open12.c:104: test O_APPEND for open failed
open12      2  TCONF  :  open12.c:123: test O_NOATIME flag for open needs filesystems which is mounted without noatime and relatime
open12      3  TPASS  :  test O_CLOEXEC for open success
open12      4  TPASS  :  test O_LARGEFILE for open success
open12      0  TWARN  :  tst_tmpdir.c:206: tst_rmdir: rmobj(/tmp/opexIqjV3) failed: lstat(/tmp/opexIqjV3/large_file) failed; errno=75: Value too large for defined data type

Since it's linked from library, adding -D_FILE_OFFSET_BITS=64 to this testcase has
no effect.

One simple way to fix it would be to unlink it in test, so that
rmobj.c doesn't hit it.

$ diff -u open12.c /tmp/open12.c 
--- open12.c	2014-08-14 17:46:33.052044613 +0200
+++ /tmp/open12.c	2014-08-20 14:48:35.655208417 +0200
@@ -221,6 +221,10 @@
 		tst_resm(TPASS, "test O_LARGEFILE for open success");
 		SAFE_CLOSE(cleanup, TEST_RETURN);
 	}
+
+	/* clean it up here, because lib/rmobj.c on 32bit will
+	 * hit EOVERFLOW in lstat() */
+	unlink(LARGE_FILE);
 }
 
 static void cleanup(void)

Any thoughts?

Regards,
Jan

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] open12 failing on i386 with EOVERFLOW
  2014-08-20 12:53 ` [LTP] open12 failing on i386 with EOVERFLOW Jan Stancek
@ 2014-08-20 12:56   ` Jan Stancek
  2014-08-20 14:19   ` chrubis
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Stancek @ 2014-08-20 12:56 UTC (permalink / raw)
  To: ltp-list





----- Original Message -----
> From: "Jan Stancek" <jstancek@redhat.com>
> To: "ltp-list" <ltp-list@lists.sf.net>
> Sent: Wednesday, 20 August, 2014 2:53:26 PM
> Subject: [LTP] open12 failing on i386 with EOVERFLOW
> 
> Hi,
> 
> I'm seeing following failure in this testcase on RHEL-6.5 Server i386 GA
> distro:
> 
> # env PATH=`pwd`:$PATH ./open12
> open12      1  TFAIL  :  open12.c:104: test O_APPEND for open failed
> open12      2  TCONF  :  open12.c:123: test O_NOATIME flag for open needs
> filesystems which is mounted without noatime and relatime
> open12      3  TPASS  :  test O_CLOEXEC for open success
> open12      4  TPASS  :  test O_LARGEFILE for open success
> open12      0  TWARN  :  tst_tmpdir.c:206: tst_rmdir: rmobj(/tmp/opexIqjV3)
> failed: lstat(/tmp/opexIqjV3/large_file) failed; errno=75: Value too large
> for defined data type
> 

Same issue in openat02:

# env PATH=`pwd`:$PATH ./openat02
openat02    1  TPASS  :  test O_APPEND for openat success
openat02    2  TPASS  :  test O_CLOEXEC for openat success
openat02    3  TPASS  :  test O_LARGEFILE for openat success
openat02    4  TCONF  :  openat02.c:242: test O_NOATIME flag for openat needs filesystems which are mounted without noatime and relatime
openat02    5  TPASS  :  test O_NOFOLLOW for openat success
openat02    6  TPASS  :  test O_TRUNC for openat success
openat02    0  TWARN  :  tst_tmpdir.c:206: tst_rmdir: rmobj(/tmp/opeim4IKK) failed: lstat(/tmp/opeim4IKK/large_file) failed; errno=75: Value too large for defined data type


> Since it's linked from library, adding -D_FILE_OFFSET_BITS=64 to this
> testcase has
> no effect.
> 
> One simple way to fix it would be to unlink it in test, so that
> rmobj.c doesn't hit it.
> 
> $ diff -u open12.c /tmp/open12.c
> --- open12.c	2014-08-14 17:46:33.052044613 +0200
> +++ /tmp/open12.c	2014-08-20 14:48:35.655208417 +0200
> @@ -221,6 +221,10 @@
>  		tst_resm(TPASS, "test O_LARGEFILE for open success");
>  		SAFE_CLOSE(cleanup, TEST_RETURN);
>  	}
> +
> +	/* clean it up here, because lib/rmobj.c on 32bit will
> +	 * hit EOVERFLOW in lstat() */
> +	unlink(LARGE_FILE);
>  }
>  
>  static void cleanup(void)
> 
> Any thoughts?
> 
> Regards,
> Jan
> 
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] open12 failing on i386 with EOVERFLOW
  2014-08-20 12:53 ` [LTP] open12 failing on i386 with EOVERFLOW Jan Stancek
  2014-08-20 12:56   ` Jan Stancek
@ 2014-08-20 14:19   ` chrubis
       [not found]     ` <1919467615.10002040.1408549666554.JavaMail.zimbra@redhat.com>
  1 sibling, 1 reply; 5+ messages in thread
From: chrubis @ 2014-08-20 14:19 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list

Hi!
> # env PATH=`pwd`:$PATH ./open12
> open12      1  TFAIL  :  open12.c:104: test O_APPEND for open failed
> open12      2  TCONF  :  open12.c:123: test O_NOATIME flag for open needs filesystems which is mounted without noatime and relatime
> open12      3  TPASS  :  test O_CLOEXEC for open success
> open12      4  TPASS  :  test O_LARGEFILE for open success
> open12      0  TWARN  :  tst_tmpdir.c:206: tst_rmdir: rmobj(/tmp/opexIqjV3) failed: lstat(/tmp/opexIqjV3/large_file) failed; errno=75: Value too large for defined data type
> 
> Since it's linked from library, adding -D_FILE_OFFSET_BITS=64 to this testcase has
> no effect.
> 
> One simple way to fix it would be to unlink it in test, so that
> rmobj.c doesn't hit it.

That is simple enough but I'm a bit reluctant to add the fix to each
test that will test O_LARGEFILE.

Given that the only purpose of lstat() in rmobj() is to figure out if
given path is a file or directory, we can try to work around this by
trying to opendir() the path first and treat it like a file when we get
ENOTDIR. What do you think?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] open12 failing on i386 with EOVERFLOW
       [not found]     ` <1919467615.10002040.1408549666554.JavaMail.zimbra@redhat.com>
@ 2014-08-20 15:54       ` chrubis
       [not found]       ` <1317036748.10807258.1408632581704.JavaMail.zimbra@redhat.com>
  1 sibling, 0 replies; 5+ messages in thread
From: chrubis @ 2014-08-20 15:54 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list

Hi!
> > That is simple enough but I'm a bit reluctant to add the fix to each
> > test that will test O_LARGEFILE.
> > 
> > Given that the only purpose of lstat() in rmobj() is to figure out if
> > given path is a file or directory, we can try to work around this by
> > trying to opendir() the path first and treat it like a file when we get
> > ENOTDIR. What do you think?
> 
> I like the idea. I can try it tomorrow, unless you have patch ready.

Not yet, I've been working on enabling keyctl01 testcase that was
previously wrongly disabled by configure checks.

(It looks like the TCONF propagation is starting to pay off because
 it's far easier to spot and review skipped testcases.)

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] open12 failing on i386 with EOVERFLOW
       [not found]       ` <1317036748.10807258.1408632581704.JavaMail.zimbra@redhat.com>
@ 2014-08-21 15:33         ` chrubis
  0 siblings, 0 replies; 5+ messages in thread
From: chrubis @ 2014-08-21 15:33 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list

Hi!
> > > That is simple enough but I'm a bit reluctant to add the fix to each
> > > test that will test O_LARGEFILE.
> > > 
> > > Given that the only purpose of lstat() in rmobj() is to figure out if
> > > given path is a file or directory, we can try to work around this by
> > > trying to opendir() the path first and treat it like a file when we get
> > > ENOTDIR. What do you think?
> > 
> > I like the idea. I can try it tomorrow, unless you have patch ready.
> 
> I hit some issues with opendir() because it tries to follow symlinks,
> so in case of bad symlink I was getting ENOENT, in some testcases ELOOP.

Doesn't that mean that we are not dealing with a directory and should
proceed with the unlink()? Or am I mistaken?

> I posted version using plain open(O_DIRECTORY | O_NOFOLLOW,..), if you
> want to comment on such approach. Initial results from x86 and ppc64 looked
> good, so I'll run it through some more testing.

This looks good, maybe better than the original idea and given that both
flags were added to kernel 2.1.126 we can just assume that these are
present anywhere.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-21 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <933677084.9868450.1408538960160.JavaMail.zimbra@redhat.com>
2014-08-20 12:53 ` [LTP] open12 failing on i386 with EOVERFLOW Jan Stancek
2014-08-20 12:56   ` Jan Stancek
2014-08-20 14:19   ` chrubis
     [not found]     ` <1919467615.10002040.1408549666554.JavaMail.zimbra@redhat.com>
2014-08-20 15:54       ` chrubis
     [not found]       ` <1317036748.10807258.1408632581704.JavaMail.zimbra@redhat.com>
2014-08-21 15:33         ` chrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.