Browse Source

Add in a test for outb (that currently fails)

Eric Andersen 24 years ago
parent
commit
d6c19a6e1a
4 changed files with 32 additions and 2 deletions
  1. 2 2
      test/Makefile
  2. 1 0
      test/misc/.cvsignore
  3. 20 0
      test/misc/Makefile
  4. 9 0
      test/misc/outb.c

+ 2 - 2
test/Makefile

@@ -23,12 +23,12 @@
 TOPDIR=../
 include $(TOPDIR)Rules.mak
 
+ALL_SUBDIRS = args assert ctype pwd_grp signal silly stdlib string unistd misc
 ifeq ($(TARGET_ARCH), $(NATIVE_ARCH))
-	DIRS = args assert ctype pwd_grp signal silly stdlib string unistd 
+	DIRS = $(ALL_SUBDIRS)
 else
 	DIRS =
 endif
-ALL_SUBDIRS = args assert ctype pwd_grp signal silly stdlib string unistd
 
 all: subdirs
 

+ 1 - 0
test/misc/.cvsignore

@@ -0,0 +1 @@
+outb

+ 20 - 0
test/misc/Makefile

@@ -0,0 +1,20 @@
+TESTDIR=../
+include $(TESTDIR)/Rules.mak
+
+TARGETS=outb
+all: $(TARGETS)
+
+outb: outb.c ../testsuite.h Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
+	-@ echo "-------"
+	-@ echo " "
+	-@ echo "Compiling vs uClibc: "
+	-@ echo " "
+	$(TESTCC) $(CFLAGS) -c $< -o $@.o
+	$(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+	$(STRIPTOOL) -x -R .note -R .comment $@
+	./$@
+	-@ echo " "
+clean:
+	rm -f *.[oa] *~ core $(TARGETS)
+
+

+ 9 - 0
test/misc/outb.c

@@ -0,0 +1,9 @@
+#include <sys/io.h>
+
+int main(void)
+{
+    ioperm(0x340,0x342,1);
+    outb(0x340,0x0);
+    exit(0);
+}
+