~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/livepatch/test-shadow-vars.sh

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/testing/selftests/livepatch/test-shadow-vars.sh (Architecture sparc) and /tools/testing/selftests/livepatch/test-shadow-vars.sh (Architecture ppc)


  1 #!/bin/bash                                         1 #!/bin/bash
  2 # SPDX-License-Identifier: GPL-2.0                  2 # SPDX-License-Identifier: GPL-2.0
  3 # Copyright (C) 2018 Joe Lawrence <joe.lawrence      3 # Copyright (C) 2018 Joe Lawrence <joe.lawrence@redhat.com>
  4                                                     4 
  5 . $(dirname $0)/functions.sh                        5 . $(dirname $0)/functions.sh
  6                                                     6 
  7 MOD_TEST=test_klp_shadow_vars                       7 MOD_TEST=test_klp_shadow_vars
  8                                                     8 
  9 setup_config                                        9 setup_config
 10                                                    10 
 11                                                    11 
 12 # - load a module that exercises the shadow va     12 # - load a module that exercises the shadow variable API
 13                                                    13 
 14 start_test "basic shadow variable API"             14 start_test "basic shadow variable API"
 15                                                    15 
 16 load_mod $MOD_TEST                                 16 load_mod $MOD_TEST
 17 unload_mod $MOD_TEST                               17 unload_mod $MOD_TEST
 18                                                    18 
 19 check_result "% insmod test_modules/$MOD_TEST.     19 check_result "% insmod test_modules/$MOD_TEST.ko
 20 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1234)     20 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1234) = PTR0
 21 $MOD_TEST:   got expected NULL result              21 $MOD_TEST:   got expected NULL result
 22 $MOD_TEST: shadow_ctor: PTR3 -> PTR2               22 $MOD_TEST: shadow_ctor: PTR3 -> PTR2
 23 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR1, i     23 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR1, id=0x1234, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR2 = PTR3
 24 $MOD_TEST: shadow_ctor: PTR6 -> PTR5               24 $MOD_TEST: shadow_ctor: PTR6 -> PTR5
 25 $MOD_TEST: klp_shadow_alloc(obj=PTR1, id=0x123     25 $MOD_TEST: klp_shadow_alloc(obj=PTR1, id=0x1235, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR5 = PTR6
 26 $MOD_TEST: shadow_ctor: PTR8 -> PTR7               26 $MOD_TEST: shadow_ctor: PTR8 -> PTR7
 27 $MOD_TEST: klp_shadow_alloc(obj=PTR9, id=0x123     27 $MOD_TEST: klp_shadow_alloc(obj=PTR9, id=0x1234, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR7 = PTR8
 28 $MOD_TEST: shadow_ctor: PTR11 -> PTR10             28 $MOD_TEST: shadow_ctor: PTR11 -> PTR10
 29 $MOD_TEST: klp_shadow_alloc(obj=PTR9, id=0x123     29 $MOD_TEST: klp_shadow_alloc(obj=PTR9, id=0x1235, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR10 = PTR11
 30 $MOD_TEST: shadow_ctor: PTR13 -> PTR12             30 $MOD_TEST: shadow_ctor: PTR13 -> PTR12
 31 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR14,      31 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR14, id=0x1234, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR12 = PTR13
 32 $MOD_TEST: shadow_ctor: PTR16 -> PTR15             32 $MOD_TEST: shadow_ctor: PTR16 -> PTR15
 33 $MOD_TEST: klp_shadow_alloc(obj=PTR14, id=0x12     33 $MOD_TEST: klp_shadow_alloc(obj=PTR14, id=0x1235, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR15 = PTR16
 34 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1234)     34 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1234) = PTR3
 35 $MOD_TEST:   got expected PTR3 -> PTR2 result      35 $MOD_TEST:   got expected PTR3 -> PTR2 result
 36 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1235)     36 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1235) = PTR6
 37 $MOD_TEST:   got expected PTR6 -> PTR5 result      37 $MOD_TEST:   got expected PTR6 -> PTR5 result
 38 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1234)     38 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1234) = PTR8
 39 $MOD_TEST:   got expected PTR8 -> PTR7 result      39 $MOD_TEST:   got expected PTR8 -> PTR7 result
 40 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1235)     40 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1235) = PTR11
 41 $MOD_TEST:   got expected PTR11 -> PTR10 resul     41 $MOD_TEST:   got expected PTR11 -> PTR10 result
 42 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1234     42 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1234) = PTR13
 43 $MOD_TEST:   got expected PTR13 -> PTR12 resul     43 $MOD_TEST:   got expected PTR13 -> PTR12 result
 44 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1235     44 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1235) = PTR16
 45 $MOD_TEST:   got expected PTR16 -> PTR15 resul     45 $MOD_TEST:   got expected PTR16 -> PTR15 result
 46 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR1, i     46 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR1, id=0x1234, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR2 = PTR3
 47 $MOD_TEST:   got expected PTR3 -> PTR2 result      47 $MOD_TEST:   got expected PTR3 -> PTR2 result
 48 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR9, i     48 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR9, id=0x1234, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR7 = PTR8
 49 $MOD_TEST:   got expected PTR8 -> PTR7 result      49 $MOD_TEST:   got expected PTR8 -> PTR7 result
 50 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR14,      50 $MOD_TEST: klp_shadow_get_or_alloc(obj=PTR14, id=0x1234, size=8, gfp_flags=GFP_KERNEL), ctor=PTR4, ctor_data=PTR12 = PTR13
 51 $MOD_TEST:   got expected PTR13 -> PTR12 resul     51 $MOD_TEST:   got expected PTR13 -> PTR12 result
 52 $MOD_TEST: shadow_dtor(obj=PTR1, shadow_data=P     52 $MOD_TEST: shadow_dtor(obj=PTR1, shadow_data=PTR3)
 53 $MOD_TEST: klp_shadow_free(obj=PTR1, id=0x1234     53 $MOD_TEST: klp_shadow_free(obj=PTR1, id=0x1234, dtor=PTR17)
 54 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1234)     54 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1234) = PTR0
 55 $MOD_TEST:   got expected NULL result              55 $MOD_TEST:   got expected NULL result
 56 $MOD_TEST: shadow_dtor(obj=PTR9, shadow_data=P     56 $MOD_TEST: shadow_dtor(obj=PTR9, shadow_data=PTR8)
 57 $MOD_TEST: klp_shadow_free(obj=PTR9, id=0x1234     57 $MOD_TEST: klp_shadow_free(obj=PTR9, id=0x1234, dtor=PTR17)
 58 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1234)     58 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1234) = PTR0
 59 $MOD_TEST:   got expected NULL result              59 $MOD_TEST:   got expected NULL result
 60 $MOD_TEST: shadow_dtor(obj=PTR14, shadow_data=     60 $MOD_TEST: shadow_dtor(obj=PTR14, shadow_data=PTR13)
 61 $MOD_TEST: klp_shadow_free(obj=PTR14, id=0x123     61 $MOD_TEST: klp_shadow_free(obj=PTR14, id=0x1234, dtor=PTR17)
 62 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1234     62 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1234) = PTR0
 63 $MOD_TEST:   got expected NULL result              63 $MOD_TEST:   got expected NULL result
 64 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1235)     64 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1235) = PTR6
 65 $MOD_TEST:   got expected PTR6 -> PTR5 result      65 $MOD_TEST:   got expected PTR6 -> PTR5 result
 66 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1235)     66 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1235) = PTR11
 67 $MOD_TEST:   got expected PTR11 -> PTR10 resul     67 $MOD_TEST:   got expected PTR11 -> PTR10 result
 68 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1235     68 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1235) = PTR16
 69 $MOD_TEST:   got expected PTR16 -> PTR15 resul     69 $MOD_TEST:   got expected PTR16 -> PTR15 result
 70 $MOD_TEST: klp_shadow_free_all(id=0x1235, dtor     70 $MOD_TEST: klp_shadow_free_all(id=0x1235, dtor=PTR0)
 71 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1235)     71 $MOD_TEST: klp_shadow_get(obj=PTR1, id=0x1235) = PTR0
 72 $MOD_TEST:   got expected NULL result              72 $MOD_TEST:   got expected NULL result
 73 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1235)     73 $MOD_TEST: klp_shadow_get(obj=PTR9, id=0x1235) = PTR0
 74 $MOD_TEST:   got expected NULL result              74 $MOD_TEST:   got expected NULL result
 75 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1235     75 $MOD_TEST: klp_shadow_get(obj=PTR14, id=0x1235) = PTR0
 76 $MOD_TEST:   got expected NULL result              76 $MOD_TEST:   got expected NULL result
 77 % rmmod $MOD_TEST"                                 77 % rmmod $MOD_TEST"
 78                                                    78 
 79 exit 0                                             79 exit 0
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php