Signed-off-by: Keegan McAllister <[email protected]>
---
 tests/test-depmod/18alternatives-syntax.sh |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/tests/test-depmod/18alternatives-syntax.sh 
b/tests/test-depmod/18alternatives-syntax.sh
index 7dededb..afd3c26 100755
--- a/tests/test-depmod/18alternatives-syntax.sh
+++ b/tests/test-depmod/18alternatives-syntax.sh
@@ -57,6 +57,32 @@ config /foo
 EOF
 [ "`depmod 2>&1 || echo $?`" = "WARNING: /etc/depmod.alternatives/01alt.conf 
line 3: malformed alternatives file" ]
 
+# Empty moduledir
+cat > $ALT_CONF <<EOF
+moduledir
+EOF
+[ "`depmod 2>&1 || echo $?`" = "WARNING: /etc/depmod.alternatives/01alt.conf 
line 1: malformed alternatives file" ]
+
+# Empty moduledir (trailing spaces)
+cat > $ALT_CONF <<EOF
+moduledir   
+EOF
+[ "`depmod 2>&1 || echo $?`" = "WARNING: /etc/depmod.alternatives/01alt.conf 
line 1: malformed alternatives file" ]
+
+# Empty config
+cat > $ALT_CONF <<EOF
+moduledir /other_lib/modules
+config
+EOF
+[ "`depmod 2>&1 || echo $?`" = "WARNING: /etc/depmod.alternatives/01alt.conf 
line 2: malformed alternatives file" ]
+
+# Empty config (trailing spaces)
+cat > $ALT_CONF <<EOF
+moduledir /other_lib/modules
+config   
+EOF
+[ "`depmod 2>&1 || echo $?`" = "WARNING: /etc/depmod.alternatives/01alt.conf 
line 2: malformed alternatives file" ]
+
 # Unreadable file
 echo > $ALT_CONF
 chmod 000 $ALT_CONF
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to