]> mj.ucw.cz Git - suidgw.git/commitdiff
Clean up tests (and added a simple Perl test)
authorMartin Mares <mj@ucw.cz>
Tue, 12 Feb 2013 12:55:34 +0000 (13:55 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 12 Feb 2013 12:55:34 +0000 (13:55 +0100)
Makefile
quork [deleted symlink]
scripts/quork [deleted file]
tests/quark [new symlink]
tests/quork [new symlink]
tests/scripts/quark [new file with mode: 0755]
tests/scripts/quork [new file with mode: 0755]

index d2f59450505d98bb6d205f89c079497f32677cd7..8aded27ffce1b53767cb4d7136937beaec438921 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,8 @@ suidgw: suidgw.c
 test-setup:
        chown root.root suidgw
        chmod u+s suidgw
-       chown testuser.nogroup scripts/quork
-       chmod ug+s scripts/quork
+       chown testuser.nogroup tests/scripts/*
+       chmod ug+s tests/scripts/*
 
 install: all
        install -o root -g root -m 4755 -s suidgw $(DESTDIR)/usr/bin/
diff --git a/quork b/quork
deleted file mode 120000 (symlink)
index 7dc5260..0000000
--- a/quork
+++ /dev/null
@@ -1 +0,0 @@
-suidgw
\ No newline at end of file
diff --git a/scripts/quork b/scripts/quork
deleted file mode 100755 (executable)
index 232525e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-echo "Quork quork!"
-id
-ls -al /proc/self/fd/
-set
diff --git a/tests/quark b/tests/quark
new file mode 120000 (symlink)
index 0000000..f5645a1
--- /dev/null
@@ -0,0 +1 @@
+../suidgw
\ No newline at end of file
diff --git a/tests/quork b/tests/quork
new file mode 120000 (symlink)
index 0000000..f5645a1
--- /dev/null
@@ -0,0 +1 @@
+../suidgw
\ No newline at end of file
diff --git a/tests/scripts/quark b/tests/scripts/quark
new file mode 100755 (executable)
index 0000000..e4f593e
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+print "Quark!\n";
+sleep 10;
+print "Quark quark!\n";
diff --git a/tests/scripts/quork b/tests/scripts/quork
new file mode 100755 (executable)
index 0000000..232525e
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "Quork quork!"
+id
+ls -al /proc/self/fd/
+set