Lines Matching full:target
17 # TEST_ID:TEST_COUNT:ENABLED:TARGET:SKIP_NO_TARGET
22 # TARGET: test target file required on the test_sysctl module
23 # SKIP_NO_TARGET: 1 skip if TARGET not there
24 # 0 run eventhough TARGET not there
129 TRIGGER=$(basename ${TARGET})
149 echo -n $VAL > $TARGET
154 if [ ! -z $TARGET ] && [ ! -z $ORIG ]; then
155 if [ -f ${TARGET} ]; then
156 echo "${ORIG}" > "${TARGET}"
163 echo "${TEST_STR}" > "${TARGET}"
219 echo "== Testing sysctl behavior against ${TARGET} =="
233 if verify "${TARGET}"; then
242 if ! verify "${TARGET}"; then
251 if verify "${TARGET}"; then
264 dd if="${TEST_FILE}" of="${TARGET}" bs=4096 2>/dev/null
265 if ! verify "${TARGET}"; then
274 dd if="${TEST_FILE}" of="${TARGET}" bs=1 seek=1 skip=1 2>/dev/null
275 if ! verify "${TARGET}"; then
284 dd if="${TEST_FILE}" of="${TARGET}" bs=20 seek=2 2>/dev/null
285 if verify "${TARGET}"; then
295 dd of="${TARGET}" bs=50 2>/dev/null
296 if verify "${TARGET}"; then
310 orig="$(cat $TARGET)"
311 echo -n "$TEST_STR" > $TARGET 2> /dev/null
313 # write should fail and $TARGET should retain its original value
314 if [ $? = 0 ] || [ "$(cat $TARGET)" != "$orig" ]; then
366 dd of="${TARGET}" 2>/dev/null
368 if ! verify "${TARGET}"; then
382 dd of="${TARGET}" 2>/dev/null
384 if verify "${TARGET}"; then
399 echo -n $TEST_STR > $TARGET
401 if ! verify "${TARGET}"; then
412 echo -n $TEST_STR > $TARGET 2> /dev/null
414 if verify "${TARGET}"; then
425 echo -n $TEST_STR > $TARGET 2> /dev/null
426 if ! verify "${TARGET}"; then
440 echo -n $TEST_STR > $TARGET
442 if ! verify_diff_w "${TARGET}"; then
454 echo -n $TEST_STR > $TARGET
459 if ! verify_diff_w "${TARGET}"; then
474 dd of="${TARGET}" 2>/dev/null
477 if ! verify_diff_w "${TARGET}"; then
491 dd of="${TARGET}" 2>/dev/null
494 if verify_diff_w "${TARGET}"; then
509 echo -n $TEST_STR > $TARGET
511 if ! verify "${TARGET}"; then
522 echo -n $TEST_STR > $TARGET 2> /dev/null
524 if verify "${TARGET}"; then
535 echo -n $TEST_STR > $TARGET 2> /dev/null
537 if verify "${TARGET}"; then
550 dd if="${TEST_FILE}" of="${TARGET}" bs=1 2>/dev/null
551 if ! verify "${TARGET}"; then
560 dd if="${TEST_FILE}" of="${TARGET}" bs=1 seek=1 2>/dev/null
561 if verify "${TARGET}"; then
571 dd of="${TARGET}" bs="${MAXLEN}" 2>/dev/null
572 if ! grep -q B "${TARGET}"; then
582 dd of="${TARGET}" bs=$(( MAXLEN - 1 )) 2>/dev/null
583 if grep -q B "${TARGET}"; then
593 dd of="${TARGET}" bs="${MAXLEN}" 2>/dev/null
594 if grep -q B "${TARGET}"; then
604 dd of="${TARGET}" bs=$(( $MAXLEN + 1 )) 2>/dev/null
605 if grep -q B "${TARGET}"; then
617 TARGET="${SYSCTL}/$1"
620 if [ ! -f ${TARGET} ] ; then
658 cat $TEST_FILE > $TARGET 2> /dev/null
665 if ! verify_diff_proc_file "$TARGET" "$TEST_FILE"; then
677 TARGET="${SYSCTL}/$(get_test_target 0001)"
679 ORIG=$(cat "${TARGET}")
689 TARGET="${SYSCTL}/$(get_test_target 0002)"
691 ORIG=$(cat "${TARGET}")
702 TARGET="${SYSCTL}/$(get_test_target 0003)"
704 ORIG=$(cat "${TARGET}")
715 TARGET="${SYSCTL}/$(get_test_target 0004)"
717 ORIG=$(cat "${TARGET}")
728 TARGET="${SYSCTL}/$(get_test_target 0005)"
730 ORIG=$(cat "${TARGET}")
737 TARGET="${SYSCTL}/$(get_test_target 0006)"
745 TARGET="${SYSCTL}/$(get_test_target 0007)"
746 echo -n "Testing if $TARGET is set to 1 ... "
748 if [ ! -f $TARGET ]; then
749 echo -e "SKIPPING\n$TARGET is not present"
759 ORIG=$(cat "${TARGET}")
773 echo -e "FAIL\nKernel param found but $TARGET is not 1." >&2
785 TARGET="${SYSCTL}/$(get_test_target 0008)"
786 echo -n "Testing if $TARGET is matched in kernel ... "
788 if [ ! -f $TARGET ]; then
789 echo -e "SKIPPING\n$TARGET is not present"
793 ORIG_VALUE=$(cat "${TARGET}")
807 TARGET="${SYSCTL}/$(get_test_target 0009)"
808 echo -n "Testing if $TARGET unregistered correctly ... "
809 if [ -d $TARGET ]; then
821 TARGET="${SYSCTL}/$(get_test_target 0010)"
822 echo -n "Testing that $TARGET was not created ... "
823 if [ -d $TARGET ]; then
835 TARGET="${SYSCTL}/$(get_test_target 0011)"
836 echo -n "Testing empty dir handling in ${TARGET} ... "
837 if [ ! -d ${TARGET} ]; then
838 echo -e "FAIL\nCould not create ${TARGET}" >&2
843 TARGET2="${TARGET}/empty"
961 echo "Target $TEST_TARGET for test $TEST_ID does not exist ... SKIPPING"
1012 TARGET=$3
1014 if skip_test $TEST_ID $TARGET; then