Lines Matching full:target

27 # TEST_ID:TEST_COUNT:ENABLED:TARGET
32 # TARGET: test target file required on the test_sysctl module
134 TRIGGER=$(basename ${TARGET})
154 echo -n $VAL > $TARGET
159 if [ ! -z $TARGET ] && [ ! -z $ORIG ]; then
160 if [ -f ${TARGET} ]; then
161 echo "${ORIG}" > "${TARGET}"
168 echo "${TEST_STR}" > "${TARGET}"
224 echo "== Testing sysctl behavior against ${TARGET} =="
238 if verify "${TARGET}"; then
247 if ! verify "${TARGET}"; then
256 if verify "${TARGET}"; then
269 dd if="${TEST_FILE}" of="${TARGET}" bs=4096 2>/dev/null
270 if ! verify "${TARGET}"; then
279 dd if="${TEST_FILE}" of="${TARGET}" bs=1 seek=1 skip=1 2>/dev/null
280 if ! verify "${TARGET}"; then
289 dd if="${TEST_FILE}" of="${TARGET}" bs=20 seek=2 2>/dev/null
290 if verify "${TARGET}"; then
300 dd of="${TARGET}" bs=50 2>/dev/null
301 if verify "${TARGET}"; then
315 orig="$(cat $TARGET)"
316 echo -n "$TEST_STR" > $TARGET 2> /dev/null
318 # write should fail and $TARGET should retain its original value
319 if [ $? = 0 ] || [ "$(cat $TARGET)" != "$orig" ]; then
371 dd of="${TARGET}" 2>/dev/null
373 if ! verify "${TARGET}"; then
387 dd of="${TARGET}" 2>/dev/null
389 if verify "${TARGET}"; then
404 echo -n $TEST_STR > $TARGET
406 if ! verify "${TARGET}"; then
417 echo -n $TEST_STR > $TARGET 2> /dev/null
419 if verify "${TARGET}"; then
430 echo -n $TEST_STR > $TARGET 2> /dev/null
431 if ! verify "${TARGET}"; then
445 echo -n $TEST_STR > $TARGET
447 if ! verify_diff_w "${TARGET}"; then
459 echo -n $TEST_STR > $TARGET
464 if ! verify_diff_w "${TARGET}"; then
479 dd of="${TARGET}" 2>/dev/null
482 if ! verify_diff_w "${TARGET}"; then
496 dd of="${TARGET}" 2>/dev/null
499 if verify_diff_w "${TARGET}"; then
514 echo -n $TEST_STR > $TARGET
516 if ! verify "${TARGET}"; then
527 echo -n $TEST_STR > $TARGET 2> /dev/null
529 if verify "${TARGET}"; then
540 echo -n $TEST_STR > $TARGET 2> /dev/null
542 if verify "${TARGET}"; then
555 dd if="${TEST_FILE}" of="${TARGET}" bs=1 2>/dev/null
556 if ! verify "${TARGET}"; then
565 dd if="${TEST_FILE}" of="${TARGET}" bs=1 seek=1 2>/dev/null
566 if verify "${TARGET}"; then
576 dd of="${TARGET}" bs="${MAXLEN}" 2>/dev/null
577 if ! grep -q B "${TARGET}"; then
587 dd of="${TARGET}" bs=$(( MAXLEN - 1 )) 2>/dev/null
588 if grep -q B "${TARGET}"; then
598 dd of="${TARGET}" bs="${MAXLEN}" 2>/dev/null
599 if grep -q B "${TARGET}"; then
609 dd of="${TARGET}" bs=$(( $MAXLEN + 1 )) 2>/dev/null
610 if grep -q B "${TARGET}"; then
622 TARGET="${SYSCTL}/$1"
625 if [ ! -f ${TARGET} ] ; then
626 echo "Target for test $TEST_ID: $TARGET not exist, skipping test ..."
664 cat $TEST_FILE > $TARGET 2> /dev/null
671 if ! verify_diff_proc_file "$TARGET" "$TEST_FILE"; then
683 TARGET="${SYSCTL}/$(get_test_target 0001)"
685 ORIG=$(cat "${TARGET}")
695 TARGET="${SYSCTL}/$(get_test_target 0002)"
697 ORIG=$(cat "${TARGET}")
708 TARGET="${SYSCTL}/$(get_test_target 0003)"
710 ORIG=$(cat "${TARGET}")
721 TARGET="${SYSCTL}/$(get_test_target 0004)"
723 ORIG=$(cat "${TARGET}")
734 TARGET="${SYSCTL}/$(get_test_target 0005)"
736 ORIG=$(cat "${TARGET}")
743 TARGET="${SYSCTL}/bitmap_0001"
751 TARGET="${SYSCTL}/boot_int"
752 if [ ! -f $TARGET ]; then
753 echo "Skipping test for $TARGET as it is not present ..."
763 echo -n "Testing if $TARGET is set to 1 ..."
764 ORIG=$(cat "${TARGET}")
779 echo "Kernel param found but $TARGET is not 1, TEST FAILED"
791 TARGET="${SYSCTL}/match_int"
792 if [ ! -f $TARGET ]; then
793 echo "Skipping test for $TARGET as it is not present ..."
797 echo -n "Testing if $TARGET is matched in kernel"
798 ORIG_VALUE=$(cat "${TARGET}")