]> err.no Git - util-linux/commitdiff
namei: new regression test
authorKarel Zak <kzak@redhat.com>
Wed, 31 Jan 2007 15:45:01 +0000 (16:45 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 31 Jan 2007 15:45:01 +0000 (16:45 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/commands.sh.in
tests/expected/ts-namei-logic [new file with mode: 0644]
tests/functions.sh
tests/ts-namei-logic [new file with mode: 0755]

index 92deda21d6eaf624d0108f457e82f5b1a33eacc1..061b42b9488fd1c08ce3c460723c9c8b75b03392 100644 (file)
@@ -13,3 +13,7 @@ TS_CMD_SWAPOFF=${TS_CMD_MOUNT:-"$TOPDIR/mount/swapoff"}
 TS_CMD_IPCS=${TS_CMD_IPCS:-"$TOPDIR/sys-utils/ipcs"}
 
 TS_CMD_COL=${TS_CMD_COL:-"$TOPDIR/text-utils/col"}
+
+TS_CMD_NAMEI=${TS_CMD_NAMEI-"$TOPDIR/misc-utils/namei"}
+
+
diff --git a/tests/expected/ts-namei-logic b/tests/expected/ts-namei-logic
new file mode 100644 (file)
index 0000000..b862462
--- /dev/null
@@ -0,0 +1,19 @@
+f: output/namei/namei1/namei2/a
+ d output
+ d namei
+ d namei1
+ d namei2
+ - a
+f: output/namei/namei1/namei2/b
+ d output
+ d namei
+ d namei1
+ d namei2
+ - b
+f: output/namei/namei1/namei2/a/b
+ d output
+ d namei
+ d namei1
+ d namei2
+ - a
+ ? b - No such file or directory (2)
index 8e8b34f74036a11f4555d706fa070bf84a9c75cb..6c6fa95960adf5c6286959f5b67c4aee4d50df39 100644 (file)
@@ -1,8 +1,8 @@
 
-TS_OUTDIR="$TS_TOPDIR/output"
-TS_DIFFDIR="$TS_TOPDIR/diff"
-TS_EXPECTEDDIR="$TS_TOPDIR/expected"
-TS_INPUTDIR="$TS_TOPDIR/input"
+TS_OUTDIR="output"
+TS_DIFFDIR="diff"
+TS_EXPECTEDDIR="expected"
+TS_INPUTDIR="input"
 
 function ts_skip {
        echo " IGNORE ($1)"
diff --git a/tests/ts-namei-logic b/tests/ts-namei-logic
new file mode 100755 (executable)
index 0000000..55cd757
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+. commands.sh
+. functions.sh
+
+TS_COMPONENT="namei"
+TS_DESC="logic"
+
+ts_init
+
+SANDBOX="$TS_OUTDIR/namei"
+
+mkdir -p $SANDBOX/namei1/namei2
+touch $SANDBOX/namei1/namei2/a $SANDBOX/namei1/namei2/b
+
+touch $TS_OUTPUT
+
+$TS_CMD_NAMEI $SANDBOX/namei1/namei2/a   >> $TS_OUTPUT 2>&1
+$TS_CMD_NAMEI $SANDBOX/namei1/namei2/b   >> $TS_OUTPUT 2>&1
+$TS_CMD_NAMEI $SANDBOX/namei1/namei2/a/b >> $TS_OUTPUT 2>&1
+
+ts_finalize
+