Lines Matching full:echo

61 	echo -n "Checking production write strict setting ... "
63 echo "FAIL, but skip in case of old kernel" >&2
67 echo "OK"
69 echo "FAIL, strict value is 0 but force to 1 to continue" >&2
70 echo "1" > ${WRITES_STRICT}
92 echo $msg must be run as root >&2
97 echo "$0: You need perl installed"
101 echo "$0: You need getconf installed"
105 echo "$0: You need diff installed"
114 echo "$0: module $TEST_DRIVER not found [SKIP]"
115 echo "You must set CONFIG_TEST_SYSCTL=m in your kernel" >&2
120 echo "$0: modprobe $TEST_DRIVER failed."
149 echo -n $VAL > $TARGET
156 echo "${ORIG}" > "${TARGET}"
163 echo "${TEST_STR}" > "${TARGET}"
194 echo "$TEST_STR" | diff -q -w -u - $1 > /dev/null
201 echo "Failed test, return value: $rc" >&2
212 echo ${old_strict} > ${WRITES_STRICT}
219 echo "== Testing sysctl behavior against ${TARGET} =="
223 echo -n "Writing test file ... "
224 echo "${TEST_STR}" > "${TEST_FILE}"
226 echo "FAIL" >&2
229 echo "OK"
232 echo -n "Checking sysctl is not set to test value ... "
234 echo "FAIL" >&2
237 echo "OK"
240 echo -n "Writing sysctl from shell ... "
243 echo "FAIL" >&2
246 echo "OK"
249 echo -n "Resetting sysctl to original value ... "
252 echo "FAIL" >&2
255 echo "OK"
262 echo -n "Writing entire sysctl in single write ... "
266 echo "FAIL" >&2
269 echo "OK"
272 echo -n "Writing middle of sysctl after synchronized seek ... "
276 echo "FAIL" >&2
279 echo "OK"
282 echo -n "Writing beyond end of sysctl ... "
286 echo "FAIL" >&2
289 echo "OK"
292 echo -n "Writing sysctl with multiple long writes ... "
294 (perl -e 'print "A" x 50;'; echo "${TEST_STR}") | \
297 echo "FAIL" >&2
300 echo "OK"
307 echo -n "Testing that $1 fails as expected ... "
311 echo -n "$TEST_STR" > $TARGET 2> /dev/null
315 echo "FAIL" >&2
318 echo "OK"
360 echo -n "Checking ignoring spaces up to PAGE_SIZE works on write ... "
365 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
369 echo "FAIL" >&2
372 echo "OK"
376 echo -n "Checking passing PAGE_SIZE of spaces fails on write ... "
381 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
385 echo "FAIL" >&2
388 echo "OK"
396 echo -n "Testing INT_MAX works ... "
399 echo -n $TEST_STR > $TARGET
402 echo "FAIL" >&2
405 echo "OK"
409 echo -n "Testing INT_MAX + 1 will fail as expected ... "
412 echo -n $TEST_STR > $TARGET 2> /dev/null
415 echo "FAIL" >&2
418 echo "OK"
422 echo -n "Testing negative values will work as expected ... "
425 echo -n $TEST_STR > $TARGET 2> /dev/null
427 echo "FAIL" >&2
430 echo "OK"
438 echo -n "Testing array works as expected ... "
440 echo -n $TEST_STR > $TARGET
443 echo "FAIL" >&2
446 echo "OK"
450 echo -n "Testing skipping trailing array elements works ... "
452 # If we only echo in two digits the last two are left intact
454 echo -n $TEST_STR > $TARGET
455 # After we echo in, to help diff we need to set on TEST_STR what
460 echo "FAIL" >&2
463 echo "OK"
467 echo -n "Testing PAGE_SIZE limit on array works ... "
473 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
478 echo "FAIL" >&2
481 echo "OK"
485 echo -n "Testing exceeding PAGE_SIZE limit fails as expected ... "
490 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
495 echo "FAIL" >&2
498 echo "OK"
506 echo -n "Testing UINT_MAX works ... "
509 echo -n $TEST_STR > $TARGET
512 echo "FAIL" >&2
515 echo "OK"
519 echo -n "Testing UINT_MAX + 1 will fail as expected ... "
522 echo -n $TEST_STR > $TARGET 2> /dev/null
525 echo "FAIL" >&2
528 echo "OK"
532 echo -n "Testing negative values will not work as expected ... "
535 echo -n $TEST_STR > $TARGET 2> /dev/null
538 echo "FAIL" >&2
541 echo "OK"
548 echo -n "Writing entire sysctl in short writes ... "
552 echo "FAIL" >&2
555 echo "OK"
558 echo -n "Writing middle of sysctl after unsynchronized seek ... "
562 echo "FAIL" >&2
565 echo "OK"
568 echo -n "Checking sysctl maxlen is at least $MAXLEN ... "
573 echo "FAIL" >&2
576 echo "OK"
579 echo -n "Checking sysctl keeps original string on overflow append ... "
584 echo "FAIL" >&2
587 echo "OK"
590 echo -n "Checking sysctl stays NULL terminated on write ... "
595 echo "FAIL" >&2
598 echo "OK"
601 echo -n "Checking sysctl stays NULL terminated on overwrite ... "
606 echo "FAIL" >&2
609 echo "OK"
654 echo -n "Checking bitmap handler ... "
656 echo -n "$TEST_STR" > $TEST_FILE
660 echo "FAIL" >&2
666 echo "FAIL" >&2
669 echo "OK"
746 echo -n "Testing if $TARGET is set to 1 ... "
749 echo -e "SKIPPING\n$TARGET is not present"
754 echo -e "SKIPPING\nTest only possible if sysctl_test is built-in, not module:"
762 echo "OK"
767 echo -e "SKIPPING\nThere is no /proc/cmdline to check for paramter"
773 echo -e "FAIL\nKernel param found but $TARGET is not 1." >&2
778 echo -e "SKIPPING\nExpected kernel parameter missing."
779 echo "Kernel must be booted with parameter: sysctl.debug.test_sysctl.boot_int=1"
786 echo -n "Testing if $TARGET is matched in kernel ... "
789 echo -e "SKIPPING\n$TARGET is not present"
796 echo "FAIL" >&2
801 echo "OK"
808 echo -n "Testing if $TARGET unregistered correctly ... "
810 echo "FAIL" >&2
815 echo "OK"
822 echo -n "Testing that $TARGET was not created ... "
824 echo "FAIL" >&2
829 echo "OK"
836 echo -n "Testing empty dir handling in ${TARGET} ... "
838 echo -e "FAIL\nCould not create ${TARGET}" >&2
845 echo -e "FAIL\nCould not create ${TARGET2}" >&2
850 echo "OK"
856 echo "Test ID list:"
857 echo
858 echo "TEST_ID x NUM_TEST"
859 echo "TEST_ID: Test ID"
860 echo "NUM_TESTS: Number of recommended times to run the test"
861 echo
862 echo "0001 x $(get_test_count 0001) - tests proc_dointvec_minmax()"
863 echo "0002 x $(get_test_count 0002) - tests proc_dostring()"
864 echo "0003 x $(get_test_count 0003) - tests proc_dointvec()"
865 echo "0004 x $(get_test_count 0004) - tests proc_douintvec()"
866 echo "0005 x $(get_test_count 0005) - tests proc_douintvec() array"
867 echo "0006 x $(get_test_count 0006) - tests proc_do_large_bitmap()"
868 echo "0007 x $(get_test_count 0007) - tests setting sysctl from kernel boot param"
869 echo "0008 x $(get_test_count 0008) - tests sysctl macro values match"
870 echo "0009 x $(get_test_count 0009) - tests sysct unregister"
871 echo "0010 x $(get_test_count 0010) - tests sysct mount point"
872 echo "0011 x $(get_test_count 0011) - tests empty directories"
880 echo "Usage: $0 [ -t <4-number-digit> ] | [ -w <4-number-digit> ] |"
881 echo " [ -s <4-number-digit> ] | [ -c <4-number-digit> <test- count>"
882 echo " [ all ] [ -h | --help ] [ -l ]"
883 echo ""
884 echo "Valid tests: 0001-$MAX_TEST"
885 echo ""
886 echo " all Runs all tests (default)"
887 echo " -t Run test ID the number amount of times is recommended"
888 echo " -w Watch test ID run until it runs into an error"
889 echo " -c Run test ID once"
890 echo " -s Run test ID x test-count number of times"
891 echo " -l List all test ID list"
892 echo " -h|--help Help"
893 echo
894 echo "If an error every occurs execution will immediately terminate."
895 echo "If you are adding a new test try using -w <test-ID> first to"
896 echo "make sure the test passes a series of tests."
897 echo
898 echo Example uses:
899 echo
900 echo "$TEST_NAME.sh -- executes all tests"
901 echo "$TEST_NAME.sh -t 0002 -- Executes test ID 0002 number of times is recomended"
902 echo "$TEST_NAME.sh -w 0002 -- Watch test ID 0002 run until an error occurs"
903 echo "$TEST_NAME.sh -s 0002 -- Run test ID 0002 once"
904 echo "$TEST_NAME.sh -c 0002 3 -- Run test ID 0002 three times"
905 echo
919 echo $1 | sed 's/^0*//'
926 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$awk_field'}')
927 echo ${TEST_DATA} | awk -F":" '{print $2}'
934 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$awk_field'}')
935 echo ${TEST_DATA} | awk -F":" '{print $3}'
942 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$awk_field'}')
943 echo ${TEST_DATA} | awk -F":" '{print $4}'
950 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$awk_field'}')
951 echo ${TEST_DATA} | awk -F":" '{print $5}'
961 echo "Target $TEST_TARGET for test $TEST_ID does not exist ... SKIPPING"
988 echo "Running test: $2 - run #$1"