Lines Matching full:echo
44 echo "$0: $DIR not present" >&2
45 echo "You must have the following enabled in your kernel:" >&2
72 echo -n "Checking production write strict setting ... "
74 echo "FAIL, but skip in case of old kernel" >&2
78 echo "ok"
80 echo "FAIL, strict value is 0 but force to 1 to continue" >&2
81 echo "1" > ${WRITES_STRICT}
103 echo $msg must be run as root >&2
108 echo "$0: You need perl installed"
112 echo "$0: You need getconf installed"
116 echo "$0: You need diff installed"
125 echo "$0: module $TEST_DRIVER not found [SKIP]"
155 echo -n $VAL > $TARGET
161 echo "${ORIG}" > "${TARGET}"
167 echo "${TEST_STR}" > "${TARGET}"
182 echo "$TEST_STR" | diff -q -w -u - $1
189 echo "Failed test, return value: $rc" >&2
200 echo ${old_strict} > ${WRITES_STRICT}
207 echo "== Testing sysctl behavior against ${TARGET} =="
211 echo -n "Writing test file ... "
212 echo "${TEST_STR}" > "${TEST_FILE}"
214 echo "FAIL" >&2
217 echo "ok"
220 echo -n "Checking sysctl is not set to test value ... "
222 echo "FAIL" >&2
225 echo "ok"
228 echo -n "Writing sysctl from shell ... "
231 echo "FAIL" >&2
234 echo "ok"
237 echo -n "Resetting sysctl to original value ... "
240 echo "FAIL" >&2
243 echo "ok"
250 echo -n "Writing entire sysctl in single write ... "
254 echo "FAIL" >&2
257 echo "ok"
260 echo -n "Writing middle of sysctl after synchronized seek ... "
264 echo "FAIL" >&2
267 echo "ok"
270 echo -n "Writing beyond end of sysctl ... "
274 echo "FAIL" >&2
277 echo "ok"
280 echo -n "Writing sysctl with multiple long writes ... "
282 (perl -e 'print "A" x 50;'; echo "${TEST_STR}") | \
285 echo "FAIL" >&2
288 echo "ok"
296 echo -n "Checking ignoring spaces up to PAGE_SIZE works on write ..."
301 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
305 echo "FAIL" >&2
308 echo "ok"
312 echo -n "Checking passing PAGE_SIZE of spaces fails on write ..."
317 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
321 echo "FAIL" >&2
324 echo "ok"
332 echo -n "Testing INT_MAX works ..."
335 echo -n $TEST_STR > $TARGET
338 echo "FAIL" >&2
341 echo "ok"
345 echo -n "Testing INT_MAX + 1 will fail as expected..."
348 echo -n $TEST_STR > $TARGET 2> /dev/null
351 echo "FAIL" >&2
354 echo "ok"
358 echo -n "Testing negative values will work as expected..."
361 echo -n $TEST_STR > $TARGET 2> /dev/null
363 echo "FAIL" >&2
366 echo "ok"
374 echo -n "Testing array works as expected ... "
376 echo -n $TEST_STR > $TARGET
379 echo "FAIL" >&2
382 echo "ok"
386 echo -n "Testing skipping trailing array elements works ... "
388 # If we only echo in two digits the last two are left intact
390 echo -n $TEST_STR > $TARGET
391 # After we echo in, to help diff we need to set on TEST_STR what
396 echo "FAIL" >&2
399 echo "ok"
403 echo -n "Testing PAGE_SIZE limit on array works ... "
409 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
414 echo "FAIL" >&2
417 echo "ok"
421 echo -n "Testing exceeding PAGE_SIZE limit fails as expected ... "
426 (perl -e 'print " " x '$LIMIT';'; echo "${TEST_STR}") | \
431 echo "FAIL" >&2
434 echo "ok"
442 echo -n "Testing UINT_MAX works ..."
445 echo -n $TEST_STR > $TARGET
448 echo "FAIL" >&2
451 echo "ok"
455 echo -n "Testing UINT_MAX + 1 will fail as expected..."
458 echo -n $TEST_STR > $TARGET 2> /dev/null
461 echo "FAIL" >&2
464 echo "ok"
468 echo -n "Testing negative values will not work as expected ..."
471 echo -n $TEST_STR > $TARGET 2> /dev/null
474 echo "FAIL" >&2
477 echo "ok"
484 echo -n "Writing entire sysctl in short writes ... "
488 echo "FAIL" >&2
491 echo "ok"
494 echo -n "Writing middle of sysctl after unsynchronized seek ... "
498 echo "FAIL" >&2
501 echo "ok"
504 echo -n "Checking sysctl maxlen is at least $MAXLEN ... "
509 echo "FAIL" >&2
512 echo "ok"
515 echo -n "Checking sysctl keeps original string on overflow append ... "
520 echo "FAIL" >&2
523 echo "ok"
526 echo -n "Checking sysctl stays NULL terminated on write ... "
531 echo "FAIL" >&2
534 echo "ok"
537 echo -n "Checking sysctl stays NULL terminated on overwrite ... "
542 echo "FAIL" >&2
545 echo "ok"
610 echo "Test ID list:"
611 echo
612 echo "TEST_ID x NUM_TEST"
613 echo "TEST_ID: Test ID"
614 echo "NUM_TESTS: Number of recommended times to run the test"
615 echo
616 echo "0001 x $(get_test_count 0001) - tests proc_dointvec_minmax()"
617 echo "0002 x $(get_test_count 0002) - tests proc_dostring()"
618 echo "0003 x $(get_test_count 0003) - tests proc_dointvec()"
619 echo "0004 x $(get_test_count 0004) - tests proc_douintvec()"
620 echo "0005 x $(get_test_count 0005) - tests proc_douintvec() array"
630 echo "Usage: $0 [ -t <4-number-digit> ] | [ -w <4-number-digit> ] |"
631 echo " [ -s <4-number-digit> ] | [ -c <4-number-digit> <test- count>"
632 echo " [ all ] [ -h | --help ] [ -l ]"
633 echo ""
634 echo "Valid tests: 0001-$MAX_TEST"
635 echo ""
636 echo " all Runs all tests (default)"
637 echo " -t Run test ID the number amount of times is recommended"
638 echo " -w Watch test ID run until it runs into an error"
639 echo " -c Run test ID once"
640 echo " -s Run test ID x test-count number of times"
641 echo " -l List all test ID list"
642 echo " -h|--help Help"
643 echo
644 echo "If an error every occurs execution will immediately terminate."
645 echo "If you are adding a new test try using -w <test-ID> first to"
646 echo "make sure the test passes a series of tests."
647 echo
648 echo Example uses:
649 echo
650 echo "$TEST_NAME.sh -- executes all tests"
651 echo "$TEST_NAME.sh -t 0002 -- Executes test ID 0002 number of times is recomended"
652 echo "$TEST_NAME.sh -w 0002 -- Watch test ID 0002 run until an error occurs"
653 echo "$TEST_NAME.sh -s 0002 -- Run test ID 0002 once"
654 echo "$TEST_NAME.sh -c 0002 3 -- Run test ID 0002 three times"
655 echo
671 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$1'}')
673 echo ${LAST_TWO%:*}
679 TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$1'}')
680 echo ${TEST_DATA#*:*:}
701 echo "Running test: $2 - run #$1"