Lines Matching full:fail
12 fail() { function
14 echo "GPIO $MODULE test FAIL"
28 echo 1 > "$CONFIGFS_SIM_DIR/$CHIP/live" || fail "Unable to enable the chip"
34 echo 0 > "$CONFIGFS_SIM_DIR/$CHIP/live" || fail "Unable to disable the chip"
48 fail "Directories remain in $CONFIGFS_SIM_DIR: $remaining"
56 fail "Unable to read the chip name from configfs"
59 fail "Unable to read the chip label from the character device"
73 fail "Unable to remove $CONFIGFS_AGG_DIR/$CHIP"
95 echo "$KEY" > "$CONFIGFS_AGG_DIR/$CHIP/$LINE/key" || fail "Unable to set the lookup key"
104 fail "Unable to set the lookup offset"
112 echo "$NAME" > "$CONFIGFS_AGG_DIR/$CHIP/$LINE/name" || fail "Unable to set the line name"
118 echo 1 > "$CONFIGFS_AGG_DIR/$CHIP/live" || fail "Unable to enable the chip"
124 echo 0 > "$CONFIGFS_AGG_DIR/$CHIP/live" || fail "Unable to disable the chip"
138 fail "Directories remain in $CONFIGFS_AGG_DIR: $remaining"
146 fail "Unable to read the device name from configfs"
157 fail "No gpiochip in /sys/devices/platform/$DEV_NAME/"
159 fail "Multiple gpiochips unexpectedly found: $CHIP_LIST"
175 ) || fail "Unable to read the number of lines from the character device"
177 fail "Discrepancy between two sources for the number of lines"
187 fail "Unable to read the chip label from the character device"
202 ) || fail "Unable to read the line name from the character device"
204 fail "Discrepancy between two sources for the name of line"
238 fail "unable to set the chip label"
240 fail "unable to set the number of lines"
245 echo "$LINE_NAME" > "$LINE_DIR/name" || fail "unable to set the line name"
262 test "$(cat "$CONFIGFS_AGG_DIR/agg0/live")" = 1 || fail "chip unexpectedly dead"
264 fail "label is inconsistent"
265 test "$(agg_get_chip_num_lines agg0)" = "1" || fail "number of lines is not 1"
266 test "$(agg_get_line_name agg0 0)" = "test0" || fail "line name is unset"
290 test "$(cat "$CONFIGFS_AGG_DIR/agg0/live")" = 1 || fail "chip unexpectedly dead"
292 fail "label is inconsistent"
293 test "$(agg_get_chip_num_lines agg0)" = "4" || fail "number of lines is not 1"
294 test "$(agg_get_line_name agg0 0)" = "test0" || fail "line name is unset"
295 test "$(agg_get_line_name agg0 1)" = "test1" || fail "line name is unset"
296 test "$(agg_get_line_name agg0 2)" = "test2" || fail "line name is unset"
297 test "$(agg_get_line_name agg0 3)" = "test3" || fail "line name is unset"
307 echo 1 > "$CONFIGFS_AGG_DIR/agg0/live" 2> /dev/null && fail "chip unexpectedly enabled"
308 test "$(cat "$CONFIGFS_AGG_DIR/agg0/live")" = 0 || fail "chip unexpectedly alive"
317 echo 1 > "$CONFIGFS_AGG_DIR/agg0/live" 2> /dev/null && fail "chip unexpectedly enabled"
318 test "$(cat "$CONFIGFS_AGG_DIR/agg0/live")" = 0 || fail "chip unexpectedly alive"
329 echo 1 > "$CONFIGFS_AGG_DIR/agg0/live" 2> /dev/null && fail "chip unexpectedly enabled"
330 test "$(cat "$CONFIGFS_AGG_DIR/agg0/live")" = 0 || fail "chip unexpectedly alive"
334 fail "chip unexpectedly transitioned to 'live' state"
339 mkdir "$CONFIGFS_AGG_DIR/_sysfs" 2> /dev/null && fail "chip _sysfs unexpectedly created"
340 mkdir "$CONFIGFS_AGG_DIR/_sysfs.foo" 2> /dev/null && fail "chip _sysfs.foo unexpectedly created"
347 test "$(cat "$CONFIGFS_AGG_DIR/_sysfs.0/live")" = 1 || fail "chip unexpectedly dead"
349 fail "label is inconsistent"
350 test "$(agg_get_chip_num_lines _sysfs.0)" = "1" || fail "number of lines is not 1"
351 test "$(agg_get_line_name _sysfs.0 0)" = "" || fail "line name is unset"
353 test -d $CONFIGFS_AGG_DIR/_sysfs.0 && fail "_sysfs.0 unexpectedly remains"
354 test -d /dev/${CHIPNAME} && fail "/dev/${CHIPNAME} unexpectedly remains"
359 test "$(cat "$CONFIGFS_AGG_DIR/_sysfs.0/live")" = 1 || fail "chip unexpectedly dead"
361 fail "label is inconsistent"
362 test "$(agg_get_chip_num_lines _sysfs.0)" = "3" || fail "number of lines is not 3"
363 test "$(agg_get_line_name _sysfs.0 0)" = "" || fail "line name is unset"
364 test "$(agg_get_line_name _sysfs.0 1)" = "" || fail "line name is unset"
365 test "$(agg_get_line_name _sysfs.0 2)" = "" || fail "line name is unset"
367 test -d $CONFIGFS_AGG_DIR/_sysfs.0 && fail "_sysfs.0 unexpectedly remains"
368 test -d /dev/${CHIPNAME} && fail "/dev/${CHIPNAME} unexpectedly remains"
374 test "$(cat "$CONFIGFS_AGG_DIR/_sysfs.0/live")" = 0 || fail "chip unexpectedly alive"
378 test "$(cat "$CONFIGFS_AGG_DIR/_sysfs.0/live")" = 1 || fail "chip unexpectedly remains dead"
380 fail "label is inconsistent"
381 test "$(agg_get_chip_num_lines _sysfs.0)" = "1" || fail "number of lines is not 1"
382 test "$(agg_get_line_name _sysfs.0 0)" = "" || fail "line name unexpectedly set"
384 test -d $CONFIGFS_AGG_DIR/_sysfs.0 && fail "_sysfs.0 unexpectedly remains"
385 test -d /dev/${CHIPNAME} && fail "/dev/${CHIPNAME} unexpectedly remains"
389 test "$(cat $CONFIGFS_AGG_DIR/_sysfs.0/live)" = 0 || fail "chip unexpectedly alive"
420 test "$(agg_get_chip_num_lines agg0)" = "3" || fail "number of lines is not 1"
437 test "$(agg_get_line_name agg0 0)" = "new0" || fail "line name is unset"
438 test "$(agg_get_line_name agg0 1)" = "new1" || fail "line name is unset"
460 test "$(agg_get_chip_num_lines agg0)" = "3" || fail "number of lines is not 1"
467 echo 1 > "$CONFIGFS_AGG_DIR/agg0/live" 2> /dev/null && fail "chip unexpectedly enabled"
472 echo 1 > "$CONFIGFS_AGG_DIR/agg0/live" 2> /dev/null && fail "chip unexpectedly enabled"
479 mkdir "$CONFIGFS_AGG_DIR/agg0/line2" 2> /dev/null && fail "line unexpectedly added"
480 rmdir "$CONFIGFS_AGG_DIR/agg0/line1" 2> /dev/null && fail "line unexpectedly removed"
486 fail "lookup key unexpectedly updated"
492 fail "name unexpectedly updated"
498 fail "offset unexpectedly updated"
519 mkdir "$CONFIGFS_AGG_DIR/_sysfs.0/line2" 2> /dev/null && fail "line unexpectedly added"
520 rmdir "$CONFIGFS_AGG_DIR/_sysfs.0/line1" 2> /dev/null && fail "line unexpectedly removed"
526 fail "lookup key unexpectedly updated"
532 fail "name unexpectedly updated"
538 fail "offset unexpectedly updated"
546 mkdir "$CONFIGFS_AGG_DIR/_sysfs.0/line2" 2> /dev/null && fail "line unexpectedly added"
547 rmdir "$CONFIGFS_AGG_DIR/_sysfs.0/line1" 2> /dev/null && fail "line unexpectedly removed"
555 fail "lookup key unexpectedly updated"
563 fail "name unexpectedly updated"
571 fail "offset unexpectedly updated"
578 test "$(cat "$CONFIGFS_AGG_DIR/_sysfs.0/live")" = 0 || fail "chip unexpectedly alive"
579 echo 1 > "$CONFIGFS_AGG_DIR/_sysfs.0/live" 2> /dev/null && fail "chip unexpectedly enabled"
588 mkdir "$CONFIGFS_AGG_DIR/_sysfs.0/line2" 2> /dev/null && fail "line unexpectedly added"
589 rmdir "$CONFIGFS_AGG_DIR/_sysfs.0/line1" 2> /dev/null && fail "line unexpectedly removed"
606 test "$(agg_get_line_name _sysfs.0 0)" = "new0" || fail "line name is unset"
607 test "$(agg_get_line_name _sysfs.0 1)" = "new1" || fail "line name is unset"
632 echo 1 > "$CONFIGFS_AGG_DIR/_sysfs.0/live" 2> /dev/null && fail "chip unexpectedly enabled"
637 echo 1 > "$CONFIGFS_AGG_DIR/_sysfs.0/live" 2> /dev/null && fail "chip unexpectedly enabled"
645 test -d /sys/module/gpio_aggregator || fail "module unexpectedly unloaded"
651 test -d /sys/module/gpio_aggregator && fail "module unexpectedly remains to be loaded"
684 test $(cat $VAL_PATH) = "0" || fail "incorrect value read from sysfs"
688 test "$(cat $VAL_PATH)" = "1" || fail "incorrect value read from sysfs"
705 test $(cat "$VAL_PATH") = "1" || fail "incorrect value read from sysfs"