• Home
  • Raw
  • Download

Lines Matching full:echo

41                echo "$0: $DIR not present" >&2
42 echo "You must have the following enabled in your kernel:" >&2
69 echo -n "Checking production write strict setting ... "
71 echo "FAIL, but skip in case of old kernel" >&2
75 echo "ok"
77 echo "FAIL, strict value is 0 but force to 1 to continue" >&2
78 echo "1" > ${WRITES_STRICT}
100 echo $msg must be run as root >&2
105 echo "$0: You need perl installed"
109 echo "$0: You need getconf installed"
113 echo "$0: You need diff installed"
150 echo -n $VAL > $TARGET
156 echo "${ORIG}" > "${TARGET}"
162 echo "${TEST_STR}" > "${TARGET}"
177 echo "$TEST_STR" | diff -q -w -u - $1
184 echo "Failed test, return value: $rc" >&2
195 echo ${old_strict} > ${WRITES_STRICT}
202 echo "== Testing sysctl behavior against ${TARGET} =="
206 echo -n "Writing test file ... "
207 echo "${TEST_STR}" > "${TEST_FILE}"
209 echo "FAIL" >&2
212 echo "ok"
215 echo -n "Checking sysctl is not set to test value ... "
217 echo "FAIL" >&2
220 echo "ok"
223 echo -n "Writing sysctl from shell ... "
226 echo "FAIL" >&2
229 echo "ok"
232 echo -n "Resetting sysctl to original value ... "
235 echo "FAIL" >&2
238 echo "ok"
245 echo -n "Writing entire sysctl in single write ... "
249 echo "FAIL" >&2
252 echo "ok"
255 echo -n "Writing middle of sysctl after synchronized seek ... "
259 echo "FAIL" >&2
262 echo "ok"
265 echo -n "Writing beyond end of sysctl ... "
269 echo "FAIL" >&2
272 echo "ok"
275 echo -n "Writing sysctl with multiple long writes ... "
277 (perl -e 'print "A" x 50;'; echo "${TEST_STR}") | \
280 echo "FAIL" >&2
283 echo "ok"
291 echo -n "Checking ignoring spaces up to PAGE_SIZE works on write ..."
296 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
300 echo "FAIL" >&2
303 echo "ok"
307 echo -n "Checking passing PAGE_SIZE of spaces fails on write ..."
312 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
316 echo "FAIL" >&2
319 echo "ok"
327 echo -n "Testing INT_MAX works ..."
330 echo -n $TEST_STR > $TARGET
333 echo "FAIL" >&2
336 echo "ok"
340 echo -n "Testing INT_MAX + 1 will fail as expected..."
343 echo -n $TEST_STR > $TARGET 2> /dev/null
346 echo "FAIL" >&2
349 echo "ok"
353 echo -n "Testing negative values will work as expected..."
356 echo -n $TEST_STR > $TARGET 2> /dev/null
358 echo "FAIL" >&2
361 echo "ok"
369 echo -n "Testing array works as expected ... "
371 echo -n $TEST_STR > $TARGET
374 echo "FAIL" >&2
377 echo "ok"
381 echo -n "Testing skipping trailing array elements works ... "
383 # If we only echo in two digits the last two are left intact
385 echo -n $TEST_STR > $TARGET
386 # After we echo in, to help diff we need to set on TEST_STR what
391 echo "FAIL" >&2
394 echo "ok"
398 echo -n "Testing PAGE_SIZE limit on array works ... "
404 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
409 echo "FAIL" >&2
412 echo "ok"
416 echo -n "Testing exceeding PAGE_SIZE limit fails as expected ... "
421 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
426 echo "FAIL" >&2
429 echo "ok"
437 echo -n "Testing UINT_MAX works ..."
440 echo -n $TEST_STR > $TARGET
443 echo "FAIL" >&2
446 echo "ok"
450 echo -n "Testing UINT_MAX + 1 will fail as expected..."
453 echo -n $TEST_STR > $TARGET 2> /dev/null
456 echo "FAIL" >&2
459 echo "ok"
463 echo -n "Testing negative values will not work as expected ..."
466 echo -n $TEST_STR > $TARGET 2> /dev/null
469 echo "FAIL" >&2
472 echo "ok"
479 echo -n "Writing entire sysctl in short writes ... "
483 echo "FAIL" >&2
486 echo "ok"
489 echo -n "Writing middle of sysctl after unsynchronized seek ... "
493 echo "FAIL" >&2
496 echo "ok"
499 echo -n "Checking sysctl maxlen is at least $MAXLEN ... "
504 echo "FAIL" >&2
507 echo "ok"
510 echo -n "Checking sysctl keeps original string on overflow append ... "
515 echo "FAIL" >&2
518 echo "ok"
521 echo -n "Checking sysctl stays NULL terminated on write ... "
526 echo "FAIL" >&2
529 echo "ok"
532 echo -n "Checking sysctl stays NULL terminated on overwrite ... "
537 echo "FAIL" >&2
540 echo "ok"
605 echo "Test ID list:"
606 echo
607 echo "TEST_ID x NUM_TEST"
608 echo "TEST_ID: Test ID"
609 echo "NUM_TESTS: Number of recommended times to run the test"
610 echo
611 echo "0001 x $(get_test_count 0001) - tests proc_dointvec_minmax()"
612 echo "0002 x $(get_test_count 0002) - tests proc_dostring()"
613 echo "0003 x $(get_test_count 0003) - tests proc_dointvec()"
614 echo "0004 x $(get_test_count 0004) - tests proc_douintvec()"
615 echo "0005 x $(get_test_count 0005) - tests proc_douintvec() array"
625 echo "Usage: $0 [ -t <4-number-digit> ] | [ -w <4-number-digit> ] |"
626 echo " [ -s <4-number-digit> ] | [ -c <4-number-digit> <test- count>"
627 echo " [ all ] [ -h | --help ] [ -l ]"
628 echo ""
629 echo "Valid tests: 0001-$MAX_TEST"
630 echo ""
631 echo " all Runs all tests (default)"
632 echo " -t Run test ID the number amount of times is recommended"
633 echo " -w Watch test ID run until it runs into an error"
634 echo " -c Run test ID once"
635 echo " -s Run test ID x test-count number of times"
636 echo " -l List all test ID list"
637 echo " -h|--help Help"
638 echo
639 echo "If an error every occurs execution will immediately terminate."
640 echo "If you are adding a new test try using -w <test-ID> first to"
641 echo "make sure the test passes a series of tests."
642 echo
643 echo Example uses:
644 echo
645 echo "$TEST_NAME.sh -- executes all tests"
646 echo "$TEST_NAME.sh -t 0002 -- Executes test ID 0002 number of times is recomended"
647 echo "$TEST_NAME.sh -w 0002 -- Watch test ID 0002 run until an error occurs"
648 echo "$TEST_NAME.sh -s 0002 -- Run test ID 0002 once"
649 echo "$TEST_NAME.sh -c 0002 3 -- Run test ID 0002 three times"
650 echo
666 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$1'}')
668 echo ${LAST_TWO%:*}
674 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$1'}')
675 echo ${TEST_DATA#*:*:}
696 echo "Running test: $2 - run #$1"