tests: fix IPC test set

- use one single library instead of loose library files
- we don't have ftime() anymore
- shmat(non-NULL) is currently broken, fix shmt test set to bypass this
- some other small issues
This commit is contained in:
David van Moolenbroek
2012-09-08 17:25:00 +02:00
parent c9f644bd68
commit df3975243b
21 changed files with 56 additions and 185 deletions

View File

@@ -1,32 +1,14 @@
# Makefile for the tests
CC = exec cc
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -I../lib/
CFLAGS = -Wall -D_MINIX -D_POSIX_SOURCE -D_NETBSD_SOURCE=1 -I../lib/
PROG = semctl01 semctl02 semctl03 semctl04 semctl05 semctl06 semctl07
all: $(PROG)
$(PROG): tst_res.o libipc.o tst_sig.o parse_opts.o tst_tmpdir.o rmobj.o
$(CC) $(CFLAGS) -o $@ $@.c tst_res.o libipc.o tst_sig.o parse_opts.o tst_tmpdir.o rmobj.o
rmobj.o: ../lib/rmobj.c
$(CC) $(CFLAGS) -c -o rmobj.o ../lib/rmobj.c
tst_res.o: ../lib/tst_res.c
$(CC) $(CFLAGS) -c -o tst_res.o ../lib/tst_res.c
tst_sig.o: ../lib/tst_sig.c
$(CC) $(CFLAGS) -c -o tst_sig.o ../lib/tst_sig.c
tst_tmpdir.o: ../lib/tst_tmpdir.c
$(CC) $(CFLAGS) -c -o tst_tmpdir.o ../lib/tst_tmpdir.c
parse_opts.o: ../lib/parse_opts.c
$(CC) $(CFLAGS) -c -o parse_opts.o ../lib/parse_opts.c
libipc.o: ../lib/libipc.c
$(CC) $(CFLAGS) -c -o libipc.o ../lib/libipc.c
$(PROG): ../libipc.a
$(CC) $(CFLAGS) -o $@ $@.c ../libipc.a
clean:
rm -f *.o $(PROG)

View File

@@ -94,7 +94,6 @@ int main(int ac, char **av)
TEST(semctl(sem_id_1, 0, IPC_STAT, un_arg));
if (TEST_RETURN != -1) {
printf("result: %d\n", TEST_RETURN);
tst_resm(TFAIL, "call succeeded when error expected");
continue;
}