From: David Marlin <dmarlin@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: LTP list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] problems building lchown02.c for uClinux
Date: Tue, 17 Aug 2010 16:42:27 -0500 [thread overview]
Message-ID: <4C6B0243.1070306@redhat.com> (raw)
In-Reply-To: <AANLkTinp94tZRbNveZO3VzEQ_gOR1jFQadqVnvRR95ak@mail.gmail.com>
Mike Frysinger wrote:
> On Tue, Aug 17, 2010 at 2:34 PM, David Marlin wrote:
>> 'lchown02.c' does not build properly due to calls to mmap and
>> get_high_address (which references sbrk) when UCLINUX=1 is defined.
>
> you'll need to clarify. it builds fine for me, it just may not run
> correctly due to the assumptions of memory placement.
Thank you for the feedback. I'm new to uClinux, so I'm only going on
what I've read, but my understanding is that 'sbrk' is not supported in
uClinux. My information may be a bit dated, so a newer (better)
reference would be welcome.
Much of the syscalls test code that is "#ifdef'd" out for UCLINUX=1
involves skipping references (directly or indirectly) to sbrk.
get_high_address is one of those references, where it directly calls sbrk:
char *get_high_address(void)
{
return (char *)sbrk(0) + (4 * getpagesize());
}
Most of the testcases skip the call to get_high_address when UCLINUX=1,
so I was just following their example.
> for runtime issues, how about we change lib/get_high_address.c to
> return NULL for UCLINUX targets. then in lchown.c, we can check for
> NULL and skip the test when we get that value.
I'm flexible, so any approach that works is ok with me. I assume we'll
need to locate all the tests that have been skipping get_high_address
for uClinux and update them, as appropriate. Will we also need to
change the approach for tests that directly reference sbrk, for example,
testcases/kernel/syscalls/stat/stat06.c
testcases/kernel/syscalls/setgroups/setgroups04.c
> that leaves your ifdefing of -1 pointer address. any sane nommu port
> should reject that address in the kernel. if yours isnt, fix your
> kernel.
Again, I was just following the example of the existing LTP test code, i.e.,
testcases/kernel/syscalls/lstat/lstat02.c
I can adjust to any approach that LTP follows. (I have not actually
tried this test on our kernel yet, so it may just work)
Thank you,
d.marlin
==========
> -mike
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2010-08-17 21:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 18:34 [LTP] problems building lchown02.c for uClinux David Marlin
2010-08-17 19:50 ` Garrett Cooper
2010-08-17 20:01 ` David Marlin
2010-08-17 20:13 ` Mike Frysinger
2010-08-17 20:21 ` Mike Frysinger
2010-08-17 22:18 ` Mike Frysinger
2010-08-17 20:39 ` Mike Frysinger
2010-08-17 21:42 ` David Marlin [this message]
2010-08-17 22:26 ` Mike Frysinger
2010-08-18 0:13 ` David Marlin
2010-08-18 0:51 ` Garrett Cooper
2010-08-18 0:54 ` 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=4C6B0243.1070306@redhat.com \
--to=dmarlin@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=vapier@gentoo.org \
/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