add simple malloc 8MB testcase

This commit is contained in:
Marian Ohligs 2013-01-30 16:29:59 +01:00
parent 400451879c
commit a08d79fba5
5 changed files with 45 additions and 3 deletions

1
.gitignore vendored
View file

@ -16,6 +16,7 @@ include/metalsvm/config.inc
tools/make_initrd
tools/scc_bootinfo.asm
newlib/examples/hello
newlib/examples/memtests
newlib/examples/jacobi
newlib/examples/echo
newlib/examples/tests

View file

@ -549,6 +549,7 @@ struct testcase_t testcases[] = {
// USERSPACE_TC("/bin/jacobi", "Jacobi serial user space app"),
USERSPACE_TC("/bin/tests", "Tests user space app"),
//USERSPACE_TC("/bin/hello", "Hello userspace app"),
USERSPACE_TC("/bin/memtests", "malloc 8MB"),
KERNELSPACE_TC(producer_consumer, "Producer consumer kernel space test"),
KERNELSPACE_TC(join_test, "Join kernel space test"),
#ifdef CONFIG_ROCKCREEK

View file

@ -47,7 +47,7 @@
//#define START_TESTS
//#define START_JACOBI
#define START_CHIEFTEST
//#define START_CHIEFTEST
// does our demos require GFX support?
//#define CONFIG_GFX

View file

@ -11,13 +11,19 @@ LDFLAGS =
default: all
all: hello tests jacobi mshell server client rlogind
all: memtests hello tests jacobi mshell server client rlogind
jacobi: jacobi.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $< -lm
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
memtests: memtests.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $< -lm
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
tests: tests.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $<
@ -56,7 +62,7 @@ client: client.o
chmod a-x $@.sym
clean:
$(RM) hello tests server client rlogind mshell jacobi hello *.sym *.o *~
$(RM) hello tests server client rlogind memtests mshell jacobi hello *.sym *.o *~
depend:
$(CC_FOR_TARGET) -MM $(CFLAGS) *.c > Makefile.dep

View file

@ -0,0 +1,34 @@
/*
* Copyright 2010 Stefan Lankes, Chair for Operating Systems,
* RWTH Aachen University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of MetalSVM.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <dirent.h>
/*file descriptor init*/
#define TEST_SIZE_MB 8
int main(int argc, char** argv)
{
uint8_t* test = malloc(sizeof(char)*TEST_SIZE_MB*1024*1024);
}