Created libc under containers/posix which now all tasks use to build.

There is a problem in the new libc that test0 now misbehaves. Going to be fixed.
This commit is contained in:
Bahadir Balban
2009-08-27 12:00:04 +03:00
parent 87e2aeaf58
commit a41caeebd2
67 changed files with 2760 additions and 53 deletions

View File

@@ -2,6 +2,7 @@
* Clone test.
*/
#include <stdio.h>
#include <printf.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>

View File

@@ -0,0 +1,12 @@
.section .text.head
.global _start;
.type _start,function;
.align;
_start:
ldr sp, =__stack
bl __container_init
1:
b 1b

View File

@@ -11,12 +11,13 @@
#include <dirent.h>
#include <l4lib/os/posix/readdir.h>
#include <tests.h>
#include <printf.h>
#define DENTS_TOTAL 50
void print_fsize(struct stat *s)
{
printf("%d", s->st_size);
printf("%lu", s->st_size);
}
void print_flink(struct stat *s)

View File

@@ -10,6 +10,7 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <printf.h>
extern char _start_test_exec[];
extern char _end_test_exec[];

View File

@@ -7,6 +7,7 @@
#include <string.h>
#include <tests.h>
#include <errno.h>
#include <printf.h>
int fileio(void)
{

View File

@@ -7,6 +7,7 @@
#include <sys/types.h>
#include <tests.h>
#include <l4/macros.h>
#include <printf.h>
int global = 0;

View File

@@ -14,6 +14,7 @@
#include <unistd.h>
#include <tests.h>
#include <errno.h>
#include <printf.h>
#define PAGE_SIZE 0x1000

View File

@@ -22,7 +22,7 @@ int shmtest(void)
test_printf("Initiating shmget()\n");
for (int i = 0; i < 2; i++) {
if ((shmids[i] = shmget(keys[i], 27, IPC_CREAT | 0666)) < 0) {
test_printf("SHMGET", errno);
test_printf("SHMGET: %d", errno);
goto out_err;
} else
test_printf("SHMID returned: %d\n", shmids[i]);
@@ -30,7 +30,7 @@ int shmtest(void)
test_printf("Now shmat()\n");
for (int i = 0; i < 2; i++) {
if ((int)(bases[i] = shmat(shmids[i], NULL, 0)) == -1) {
test_printf("SHMAT", errno);
test_printf("SHMAT: %d", errno);
goto out_err;
} else
test_printf("SHM base address returned: %p\n", bases[i]);
@@ -42,7 +42,7 @@ int shmtest(void)
test_printf("Now shmdt()\n");
for (int i = 0; i < 2; i++) {
if (shmdt(bases[i]) < 0) {
test_printf("SHMDT", errno);
test_printf("SHMDT: %d", errno);
goto out_err;
} else
test_printf("SHM detached OK.\n");

View File

@@ -0,0 +1,12 @@
.section .text.head
.global _start;
.type _start,function;
.align;
_start:
ldr sp, =__stack
bl __container_init
1:
b 1b

View File

@@ -26,7 +26,7 @@ void main(void)
{
wait_pager(0);
if (getpid() == 2) {
printf("EXECVE TEST -- PASSED --\n", getpid());
printf("EXECVE TEST -- PASSED --\n");
printf("\nThread (%d): Continues to sync with the pager...\n\n", getpid());
while (1)
wait_pager(0);