public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [Bug Fix] Skip first case in adjtimex02 test by a safer method
Date: Wed, 29 Dec 2010 11:35:39 -0500	[thread overview]
Message-ID: <201012291135.40157.vapier@gentoo.org> (raw)
In-Reply-To: <AANLkTinxp9Aj7MwPqpR13cZRjAYdLVwMkhCteDM-S7Vi@mail.gmail.com>


[-- Attachment #1.1: Type: Text/Plain, Size: 1400 bytes --]

On Wednesday, December 29, 2010 04:35:29 Vivi wrote:
> --- testcases/kernel/syscalls/adjtimex/adjtimex02.c
> +++ testcases/kernel/syscalls/adjtimex/adjtimex02.c
> @@ -122,12 +122,7 @@
>         void (*cleanup) ();
>         int exp_errno;
>  } test_cases[] = {
> -#ifndef UCLINUX
> -       /* Skip since uClinux does not implement memory protection */
> -       {
> -       (struct timex *)-1, NULL, NULL, EFAULT},
> -#endif
> -       {
> +       { (struct timex *)-1, NULL, NULL, EFAULT},{
>         &buff, setup2, NULL, EINVAL}, {
>         &buff, setup3, NULL, EINVAL}, {
>         &buff, setup4, NULL, EINVAL}, {
> @@ -159,7 +154,18 @@
>                 Tst_count = 0;
> 
>                 for (i = 0; i < TST_TOTAL; ++i) {
> +#ifdef UCLINUX
>                         /*
> +                        * Skip first case since uClinux does not implement
> +                        * memory protection.
> +                        */
> +                       if (i == 0) {
> +                               tst_resm(TCONF, "uClinux does not
> implement" +                                               " memory
> protection."); +                               continue;
> +                       }
> +#endif

we should be able to handle bad pointers like -1 and NULL.  the kernel's check 
access func should force EFAULT.  so why do we need this new if code ?
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 371 bytes --]

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-12-29 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29  9:35 [LTP] [Bug Fix] Skip first case in adjtimex02 test by a safer method Vivi
2010-12-29 16:35 ` Mike Frysinger [this message]
2011-01-15  5:34   ` Garrett Cooper
2011-01-16  1:21     ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201012291135.40157.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox