--- /dev/null
+SRCDIR = ../../src
+
+SINGLETONS = create-normal create-empty create-null create-invalid create-long
+
+define SINGLETON_PROG
+PROGS += $(1)
+$(1)_SRC = $(1).c
+endef
+
+$(foreach prog,$(SINGLETONS),$(eval $(call SINGLETON_PROG,$(prog))))
+
+include $(SRCDIR)/Makefile.userprog
--- /dev/null
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void)
+{
+ printf ("create(\"\"):\n");
+ printf ("%d\n", create ("", 0));
+ printf ("survived\n");
+ return 0;
+}
--- /dev/null
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void)
+{
+ printf ("create(0xc0101234):\n");
+ printf ("%d\n", create ((char *) 0xc0101234, 0));
+ printf ("survived\n");
+ return 0;
+}
--- /dev/null
+#include <stdio.h>
+#include <string.h>
+#include <syscall.h>
+
+int
+main (void)
+{
+ static char name[256];
+ memset (name, 'x', sizeof name);
+ name[sizeof name - 1] = '\0';
+
+ printf ("create(\"%s\"):\n", name);
+ printf ("%d\n", create (name, 0));
+ printf ("survived\n");
+
+ return 0;
+}
--- /dev/null
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void)
+{
+ printf ("create(\"quux.dat\"): ");
+ printf ("%d\n", create ("quux.dat", 0));
+ printf ("survived\n");
+ return 0;
+}
--- /dev/null
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void)
+{
+ printf ("create(null): ");
+ printf ("%d\n", create (NULL, 0));
+ printf ("survived\n");
+ return 0;
+}