Skip to content

Commit

Permalink
Various improvements to userspace tests framework (#1410)
Browse files Browse the repository at this point in the history
* Replace libwrap with macros.
* Testname not needed anymore.
* Split vfs_symlink test in twos.
* Add missing atexit implementation.
* Each VFS test runs in separate directory.
  • Loading branch information
cahirwpz authored Jul 31, 2023
1 parent 87571b8 commit 6b7cfaf
Show file tree
Hide file tree
Showing 42 changed files with 278 additions and 551 deletions.
37 changes: 0 additions & 37 deletions bin/utest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,8 @@ SOURCES = \
vm_map.c \
vm_map_prot.c \

LIBWRAP = \
xaccess.c \
xchdir.c \
xchmod.c \
xclose.c \
xfork.c \
xfstat.c \
xgetgroups.c \
xgetresgid.c \
xgetresuid.c \
xgettimeofday.c \
xkill.c \
xkillpg.c \
xlchmod.c \
xlink.c \
xlstat.c \
xmkdir.c \
xmmap.c \
xmprotect.c \
xmunmap.c \
xopen.c \
xpipe.c \
xread.c \
xrmdir.c \
xsetgroups.c \
xsetresgid.c \
xsetresuid.c \
xsignal.c \
xsigaction.c \
xsigprocmask.c \
xstat.c \
xsymlink.c \
xunlink.c \
xwaitpid.c \
xwrite.c

PROGRAM = utest

SOURCES += $(addprefix libwrap/,$(LIBWRAP))
CPPFLAGS += -I.
EXTRAFILES = $(shell find extra -type f)
INSTALL-FILES = $(EXTRAFILES:extra/%=$(SYSROOT)/%)
Expand Down
2 changes: 2 additions & 0 deletions bin/utest/getcwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <unistd.h>

TEST_ADD(getcwd, 0) {
xchdir("/");

{
/* Working directory is set to root if not changed */
char buffer[256];
Expand Down
9 changes: 0 additions & 9 deletions bin/utest/libwrap/xaccess.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xchdir.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xchmod.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xclose.c

This file was deleted.

11 changes: 0 additions & 11 deletions bin/utest/libwrap/xfork.c

This file was deleted.

10 changes: 0 additions & 10 deletions bin/utest/libwrap/xfstat.c

This file was deleted.

11 changes: 0 additions & 11 deletions bin/utest/libwrap/xgetgroups.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xgetresgid.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xgetresuid.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xgettimeofday.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xkill.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xkillpg.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xlchmod.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xlink.c

This file was deleted.

10 changes: 0 additions & 10 deletions bin/utest/libwrap/xlstat.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xmkdir.c

This file was deleted.

11 changes: 0 additions & 11 deletions bin/utest/libwrap/xmmap.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xmprotect.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xmunmap.c

This file was deleted.

20 changes: 0 additions & 20 deletions bin/utest/libwrap/xopen.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xpipe.c

This file was deleted.

11 changes: 0 additions & 11 deletions bin/utest/libwrap/xread.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xrmdir.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xsetgroups.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xsetresgid.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xsetresuid.c

This file was deleted.

10 changes: 0 additions & 10 deletions bin/utest/libwrap/xsigaction.c

This file was deleted.

11 changes: 0 additions & 11 deletions bin/utest/libwrap/xsignal.c

This file was deleted.

10 changes: 0 additions & 10 deletions bin/utest/libwrap/xsigprocmask.c

This file was deleted.

10 changes: 0 additions & 10 deletions bin/utest/libwrap/xstat.c

This file was deleted.

9 changes: 0 additions & 9 deletions bin/utest/libwrap/xsymlink.c

This file was deleted.

Loading

0 comments on commit 6b7cfaf

Please sign in to comment.