+2007-09-27 Thorsten Kukuk <kukuk@thkukuk.de>
+
+ * xtests/run-xtests.sh: Add support to skip tests.
+ * xtests/tst-pam_limits1.c: Skip test if RLIMIT_NICE is not
+ defined.
+
2007-09-03 Steve Langasek <vorlon@debian.org>
* modules/pam_limits/pam_limits.c: remove a number of unnecessary
failed=0
pass=0
+skiped=0
all=0
mkdir -p /etc/security
else
./$testname > /dev/null
fi
- if test $? -ne 0 ; then
+ RETVAL=$?
+ if test $RETVAL -eq 77 ; then
+ echo "SKIP: $testname"
+ skiped=`expr $skiped + 1`
+ elif test $RETVAL -ne 0 ; then
echo "FAIL: $testname"
failed=`expr $failed + 1`
else
if test "$failed" -ne 0; then
echo "==================="
echo "$failed of $all tests failed"
+ echo "$skiped tests not run"
echo "==================="
exit 1
else
echo "=================="
- echo "All $all tests passed"
+ echo "$all tests passed"
+ echo "$skiped tests not run"
echo "=================="
fi
exit 0
if (argc > 1 && strcmp (argv[1], "-d") == 0)
debug = 1;
+#ifdef RLIMIT_NICE
retval = pam_start("tst-pam_limits1", user, &conv, &pamh);
if (retval != PAM_SUCCESS)
{
return 1;
}
return 0;
+#else
+ if (debug)
+ fprintf (stderr, "pam_limits1: RLIMIT_NICE does not exist)\n");
+
+ return 77;
+#endif
}