[BACK]Return to t_modload.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / modules

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/tests/modules/t_modload.sh between version 1.1 and 1.1.6.1

version 1.1, 2008/03/02 11:22:10 version 1.1.6.1, 2008/05/18 12:36:01
Line 11 
Line 11 
 # 2. Redistributions in binary form must reproduce the above copyright  # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the  #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.  #    documentation and/or other materials provided with the distribution.
 # 3. All advertising materials mentioning features or use of this software  
 #    must display the following acknowledgement:  
 #        This product includes software developed by the NetBSD  
 #        Foundation, Inc. and its contributors.  
 # 4. Neither the name of The NetBSD Foundation nor the names of its  
 #    contributors may be used to endorse or promote products derived  
 #    from this software without specific prior written permission.  
 #  #
 # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS  # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED  # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Line 48  modload: No such file or directory
Line 41  modload: No such file or directory
 EOF  EOF
         atf_check "modload non-existent.o" 1 null experr          atf_check "modload non-existent.o" 1 null experr
   
         atf_check "modload $(atf_get_srcdir)/k_helper.o" 0 null null          atf_check "modload $(atf_get_srcdir)/k_helper.kmod" 0 null null
         check_sysctl vendor.k_helper.present 1          check_sysctl vendor.k_helper.present 1
         check_sysctl vendor.k_helper.prop_int_ok 0          check_sysctl vendor.k_helper.prop_int_ok 0
         check_sysctl vendor.k_helper.prop_str_ok 0          check_sysctl vendor.k_helper.prop_str_ok 0
Line 66  bflag_head() {
Line 59  bflag_head() {
 bflag_body() {  bflag_body() {
         echo "Checking error conditions"          echo "Checking error conditions"
   
         atf_check "modload -b foo k_helper.o" 1 null stderr          atf_check "modload -b foo k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid parameter.*foo' stderr" 0 ignore null          atf_check "grep 'Invalid parameter.*foo' stderr" 0 ignore null
   
         atf_check "modload -b foo= k_helper.o" 1 null stderr          atf_check "modload -b foo= k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid boolean value' stderr" 0 ignore null          atf_check "grep 'Invalid boolean value' stderr" 0 ignore null
   
         atf_check "modload -b foo=bar k_helper.o" 1 null stderr          atf_check "modload -b foo=bar k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid boolean value.*bar' stderr" 0 ignore null          atf_check "grep 'Invalid boolean value.*bar' stderr" 0 ignore null
   
         atf_check "modload -b foo=falsea k_helper.o" 1 null stderr          atf_check "modload -b foo=falsea k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid boolean value.*falsea' stderr" 0 ignore null          atf_check "grep 'Invalid boolean value.*falsea' stderr" 0 ignore null
   
         atf_check "modload -b foo=truea k_helper.o" 1 null stderr          atf_check "modload -b foo=truea k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid boolean value.*truea' stderr" 0 ignore null          atf_check "grep 'Invalid boolean value.*truea' stderr" 0 ignore null
   
         # TODO Once sysctl(8) supports CTLTYPE_BOOL nodes.          # TODO Once sysctl(8) supports CTLTYPE_BOOL nodes.
Line 96  iflag_head() {
Line 89  iflag_head() {
 iflag_body() {  iflag_body() {
         echo "Checking error conditions"          echo "Checking error conditions"
   
         atf_check "modload -i foo k_helper.o" 1 null stderr          atf_check "modload -i foo k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid parameter.*foo' stderr" 0 ignore null          atf_check "grep 'Invalid parameter.*foo' stderr" 0 ignore null
   
         atf_check "modload -i foo= k_helper.o" 1 null stderr          atf_check "modload -i foo= k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid integer value' stderr" 0 ignore null          atf_check "grep 'Invalid integer value' stderr" 0 ignore null
   
         atf_check "modload -i foo=bar k_helper.o" 1 null stderr          atf_check "modload -i foo=bar k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid integer value.*bar' stderr" 0 ignore null          atf_check "grep 'Invalid integer value.*bar' stderr" 0 ignore null
   
         atf_check "modload -i foo=123a k_helper.o" 1 null stderr          atf_check "modload -i foo=123a k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid integer value.*123a' stderr" 0 ignore null          atf_check "grep 'Invalid integer value.*123a' stderr" 0 ignore null
   
         echo "Checking valid values"          echo "Checking valid values"
   
         for v in 5 10; do          for v in 5 10; do
                 atf_check "modload -i prop_int='${v}' \                  atf_check "modload -i prop_int='${v}' \
                            $(atf_get_srcdir)/k_helper.o" 0 null null                             $(atf_get_srcdir)/k_helper.kmod" 0 null null
                 check_sysctl vendor.k_helper.prop_int_ok 1                  check_sysctl vendor.k_helper.prop_int_ok 1
                 check_sysctl vendor.k_helper.prop_int_val "${v}"                  check_sysctl vendor.k_helper.prop_int_val "${v}"
                 atf_check "modunload k_helper" 0 null null                  atf_check "modunload k_helper" 0 null null
Line 130  sflag_head() {
Line 123  sflag_head() {
 sflag_body() {  sflag_body() {
         echo "Checking error conditions"          echo "Checking error conditions"
   
         atf_check "modload -s foo k_helper.o" 1 null stderr          atf_check "modload -s foo k_helper.kmod" 1 null stderr
         atf_check "grep 'Invalid parameter.*foo' stderr" 0 ignore null          atf_check "grep 'Invalid parameter.*foo' stderr" 0 ignore null
   
         echo "Checking valid values"          echo "Checking valid values"
   
         for v in '1st string' '2nd string'; do          for v in '1st string' '2nd string'; do
                 atf_check "modload -s prop_str='${v}' \                  atf_check "modload -s prop_str='${v}' \
                            $(atf_get_srcdir)/k_helper.o" 0 null null                             $(atf_get_srcdir)/k_helper.kmod" 0 null null
                 check_sysctl vendor.k_helper.prop_str_ok 1                  check_sysctl vendor.k_helper.prop_str_ok 1
                 check_sysctl vendor.k_helper.prop_str_val "${v}"                  check_sysctl vendor.k_helper.prop_str_val "${v}"
                 atf_check "modunload k_helper" 0 null null                  atf_check "modunload k_helper" 0 null null

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.6.1

CVSweb <webmaster@jp.NetBSD.org>