# @name
#       NAND modular negative test when fs is jffs2
# @desc
#       modprobe nand module first and then do mount and rmmod 
# @setup_requires nand
# @requires  nand && jffs2

NAND_S_MODULAR_NEG_RMMOD_WHEN_MOUNT_JFFS2 source "common.sh"; mod_name=`get_modular_name.sh "nand"` || die "error getting modular name: $mod_name"; do_cmd insmod.sh "$mod_name"; DEV_NODE=`get_blk_device_node.sh "nand"` || die "error getting devnode for nand: $DEV_NODE"; do_cmd blk_device_erase_format_part.sh -d "nand" -n "$DEV_NODE" -f "jffs2"; do_cmd blk_device_do_mount.sh -n "$DEV_NODE" -f "jffs2" -d "nand" -m "/mnt/nand"; rmmod.sh "$mod_name" && exit 1 || exit 0
