Adding Testcases to modules
Hi All, I am implementing the custom module, module implementation is completed able to test It. I need to add the test cases for the modules I gone through src/tests/modules tried to run the exiting commands make tests make tests modules/always ---> testing always module Keep on getting (0) No reply from server for ID 206 socket 3 test.example.com_1 : FAILED Sent Access-Request Id 206 from 0.0.0.0:37541 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" Sent Access-Request Id 206 from 0.0.0.0:37541 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" Sent Access-Request Id 206 from 0.0.0.0:37541 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" See radclient.log for more details *make: *** [tests] Error 1* Even the radclient.log has not much info. Can anyone help me on how to run the perticular module testcases and what are the configuration to me made to set up the test module. Regards, Shivaprasad
On Oct 5, 2018, at 3:25 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
I am implementing the custom module, module implementation is completed able to test It. I need to add the test cases for the modules I gone through src/tests/modules tried to run the exiting commands make tests
That should work
make tests modules/always ---> testing always module
No, that's not the way "make" works. You can't just add random things and have it do what you want.
Keep on getting (0) No reply from server for ID 206 socket 3 test.example.com_1 : FAILED
Even for "make tests"? Alan DeKok.
On Fri, Oct 5, 2018 at 5:20 PM Alan DeKok <aland@deployingradius.com> wrote:
On Oct 5, 2018, at 3:25 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
I am implementing the custom module, module implementation is completed able to test It. I need to add the test cases for the modules I gone through src/tests/modules tried to run the exiting commands make tests
That should work
make tests modules/always ---> testing always module
No, that's not the way "make" works. You can't just add random things and have it do what you want.
Keep on getting (0) No reply from server for ID 206 socket 3 test.example.com_1 : FAILED
Even for "make tests"?
Yes Even simple make tests command is failing, I have not changed anything in exiting test modules just wanted to understand the how exiting test suite works so that I can add the testcases in similar way.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Oct 6, 2018, at 3:46 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
Yes Even simple make tests command is failing, I have not changed anything in exiting test modules
Then you changed raddb/radiusd.conf, or something else in raddb. The tests assume a default configuration. If you break the configuration, then the tests won't pass.
just wanted to understand the how exiting test suite works so that I can add the testcases in similar way.
The test suite is fairly simple. There's some magic in the Makefiles, but you can largely ignore that. Alan DeKok.
Hi Alan, Since You mentioned there may be some configuration change in my set up I download fresh code(freeradius-server-3.0.17.tar.gz) and retried the setup here is steps I am invoking. 1.Configure (./configure --prefix=/usr/local/freeradius-server-3.0.17) 2.make 3. sudo make Install 4. sudo /usr/local/afreeradius/sbin/radiusd -X (I got the SSL error here I fixed it by allowing ssl # allow_vulnerable_openssl = no allow_vulnerable_openssl = 'CVE-2016-6304' ) **this is the only change I have done to fix the SSL issue and to make the server up. 5. make tests (changed directory to src/tests and run the make tests command). the make tests failing after some time. I am not getting where I am doing wrong. I have captured the log and added here. Starting server... failed Last log entries were: Mon Oct 8 20:02:01 2018 : Debug: Loading rlm_eap_gtc with path: /scratch/myfolder/todel/freeradius-server-3.0.17/build/lib/.libs/rlm_eap_gtc.so Mon Oct 8 20:02:01 2018 : Debug: # Linked to sub-module rlm_eap_gtc Mon Oct 8 20:02:01 2018 : Debug: gtc { Mon Oct 8 20:02:01 2018 : Debug: challenge = "Password: " Mon Oct 8 20:02:01 2018 : Debug: auth_type = "PAP" Mon Oct 8 20:02:01 2018 : Debug: } Mon Oct 8 20:02:01 2018 : Debug: Loading rlm_eap_tls with path: /scratch/myfolder/todel/freeradius-server-3.0.17/build/lib/.libs/rlm_eap_tls.so Mon Oct 8 20:02:01 2018 : Debug: # Linked to sub-module rlm_eap_tls Mon Oct 8 20:02:01 2018 : Debug: tls { Mon Oct 8 20:02:01 2018 : Debug: tls = "tls-common" Mon Oct 8 20:02:01 2018 : Debug: } Mon Oct 8 20:02:01 2018 : Debug: tls-config tls-common { Mon Oct 8 20:02:01 2018 : Debug: verify_depth = 0 Mon Oct 8 20:02:01 2018 : Debug: ca_path = "/scratch/myfolder/todel/freeradius-server-3.0.17/raddb//certs" Mon Oct 8 20:02:01 2018 : Debug: pem_file_type = yes Mon Oct 8 20:02:01 2018 : Debug: private_key_file = "/scratch/myfolder/todel/freeradius-server-3.0.17/raddb//certs/server.pem" Mon Oct 8 20:02:01 2018 : Error: Unable to check file "/scratch/myfolder/todel/freeradius-server-3.0.17/raddb//certs/server.pem": No such file or directory Mon Oct 8 20:02:01 2018 : Error: rlm_eap_tls: Failed initializing SSL context Mon Oct 8 20:02:01 2018 : Error: rlm_eap (EAP): Failed to initialise rlm_eap_tls Mon Oct 8 20:02:01 2018 : Error: /scratch/myfolder/todel/freeradius-server-3.0.17/raddb//mods-enabled/eap[14]: Instantiation failed for module "eap" ok Running tests: mschapv1_1 : FAILED Sent Access-Request Id 111 from 0.0.0.0:41497 to 127.0.0.1:12340 length 127 User-Name = "bob" MS-CHAP-Challenge = 0xb9634adc358b2ab3 MS-CHAP-Response = 0xb9010000000000000000000000000000000000000000000000007a42408782f745ef90a86fd21b0d9294132750f4af66a419 Test-Name = "mschapv1" Test-Number = 1 Sent Access-Request Id 111 from 0.0.0.0:41497 to 127.0.0.1:12340 length 127 User-Name = "bob" MS-CHAP-Challenge = 0xb9634adc358b2ab3 MS-CHAP-Response = 0xb9010000000000000000000000000000000000000000000000007a42408782f745ef90a86fd21b0d9294132750f4af66a419 Test-Name = "mschapv1" Test-Number = 1 Sent Access-Request Id 111 from 0.0.0.0:41497 to 127.0.0.1:12340 length 127 User-Name = "bob" MS-CHAP-Challenge = 0xb9634adc358b2ab3 MS-CHAP-Response = 0xb9010000000000000000000000000000000000000000000000007a42408782f745ef90a86fd21b0d9294132750f4af66a419 Test-Name = "mschapv1" Test-Number = 1 digest-auth-int_1 : FAILED Sent Access-Request Id 44 from 0.0.0.0:60432 to 127.0.0.1:12340 length 282 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Message-Authenticator = 0x Test-Name = "digest-auth-int" Test-Number = 1 Sent Access-Request Id 44 from 0.0.0.0:60432 to 127.0.0.1:12340 length 282 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Message-Authenticator = 0x Test-Name = "digest-auth-int" Test-Number = 1 Sent Access-Request Id 44 from 0.0.0.0:60432 to 127.0.0.1:12340 length 282 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Message-Authenticator = 0x Test-Name = "digest-auth-int" Test-Number = 1 digest-auth_int-MD5_1 : FAILED Sent Access-Request Id 183 from 0.0.0.0:55935 to 127.0.0.1:12340 length 268 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5" Test-Number = 1 Sent Access-Request Id 183 from 0.0.0.0:55935 to 127.0.0.1:12340 length 268 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5" Test-Number = 1 Sent Access-Request Id 183 from 0.0.0.0:55935 to 127.0.0.1:12340 length 268 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5" Test-Number = 1 digest-auth_int-MD5_2 : FAILED Sent Access-Request Id 248 from 0.0.0.0:35738 to 127.0.0.1:12340 length 268 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5" Test-Number = 2 Sent Access-Request Id 248 from 0.0.0.0:35738 to 127.0.0.1:12340 length 268 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5" Test-Number = 2 Sent Access-Request Id 248 from 0.0.0.0:35738 to 127.0.0.1:12340 length 268 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5" Test-Number = 2 digest-auth_int-MD5_Sess_1 : FAILED Sent Access-Request Id 209 from 0.0.0.0:45227 to 127.0.0.1:12340 length 278 User-Name = "bob" Digest-Response = "91984da2d8663716e91554859c22ca70" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5_Sess" Test-Number = 1 Sent Access-Request Id 209 from 0.0.0.0:45227 to 127.0.0.1:12340 length 278 User-Name = "bob" Digest-Response = "91984da2d8663716e91554859c22ca70" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5_Sess" Test-Number = 1 Sent Access-Request Id 209 from 0.0.0.0:45227 to 127.0.0.1:12340 length 278 User-Name = "bob" Digest-Response = "91984da2d8663716e91554859c22ca70" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5_Sess" Test-Number = 1 digest-auth_int-MD5_Sess_2 : FAILED Sent Access-Request Id 90 from 0.0.0.0:53615 to 127.0.0.1:12340 length 278 User-Name = "bob" Digest-Response = "91984da2d8663716e91554859c22ca70" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5_Sess" Test-Number = 2 Sent Access-Request Id 90 from 0.0.0.0:53615 to 127.0.0.1:12340 length 278 User-Name = "bob" Digest-Response = "91984da2d8663716e91554859c22ca70" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5_Sess" Test-Number = 2 Sent Access-Request Id 90 from 0.0.0.0:53615 to 127.0.0.1:12340 length 278 User-Name = "bob" Digest-Response = "91984da2d8663716e91554859c22ca70" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-MD5_Sess" Test-Number = 2 digest-auth_int-noalgo_1 : FAILED Sent Access-Request Id 48 from 0.0.0.0:53832 to 127.0.0.1:12340 length 264 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-noalgo" Test-Number = 1 Sent Access-Request Id 48 from 0.0.0.0:53832 to 127.0.0.1:12340 length 264 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-noalgo" Test-Number = 1 Sent Access-Request Id 48 from 0.0.0.0:53832 to 127.0.0.1:12340 length 264 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-noalgo" Test-Number = 1 digest-auth_int-noalgo_2 : FAILED Sent Access-Request Id 111 from 0.0.0.0:56273 to 127.0.0.1:12340 length 264 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-noalgo" Test-Number = 2 Sent Access-Request Id 111 from 0.0.0.0:56273 to 127.0.0.1:12340 length 264 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-noalgo" Test-Number = 2 Sent Access-Request Id 111 from 0.0.0.0:56273 to 127.0.0.1:12340 length 264 User-Name = "bob" Digest-Response = "bdbeebb2da6adb6bca02599c2239e192" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050a617574682d696e74 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Digest-Attributes = 0x07226331656430313862386563346133623137306330393231663562353634653438 Test-Name = "digest-auth_int-noalgo" Test-Number = 2 digest-auth-MD5_1 : FAILED Sent Access-Request Id 101 from 0.0.0.0:55694 to 127.0.0.1:12340 length 224 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5" Test-Number = 1 Sent Access-Request Id 101 from 0.0.0.0:55694 to 127.0.0.1:12340 length 224 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5" Test-Number = 1 Sent Access-Request Id 101 from 0.0.0.0:55694 to 127.0.0.1:12340 length 224 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5" Test-Number = 1 digest-auth-MD5_2 : FAILED Sent Access-Request Id 197 from 0.0.0.0:47385 to 127.0.0.1:12340 length 224 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5" Test-Number = 2 Sent Access-Request Id 197 from 0.0.0.0:47385 to 127.0.0.1:12340 length 224 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5" Test-Number = 2 Sent Access-Request Id 197 from 0.0.0.0:47385 to 127.0.0.1:12340 length 224 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x06054d4435 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5" Test-Number = 2 digest-auth-MD5_Sess_1 : FAILED Sent Access-Request Id 128 from 0.0.0.0:56588 to 127.0.0.1:12340 length 234 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5_Sess" Test-Number = 1 Sent Access-Request Id 128 from 0.0.0.0:56588 to 127.0.0.1:12340 length 234 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5_Sess" Test-Number = 1 Sent Access-Request Id 128 from 0.0.0.0:56588 to 127.0.0.1:12340 length 234 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5_Sess" Test-Number = 1 digest-auth-MD5_Sess_2 : FAILED Sent Access-Request Id 14 from 0.0.0.0:57050 to 127.0.0.1:12340 length 234 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5_Sess" Test-Number = 2 Sent Access-Request Id 14 from 0.0.0.0:57050 to 127.0.0.1:12340 length 234 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5_Sess" Test-Number = 2 Sent Access-Request Id 14 from 0.0.0.0:57050 to 127.0.0.1:12340 length 234 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x060a4d44352d53657373 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-MD5_Sess" Test-Number = 2 digest-auth-noalgo_1 : FAILED Sent Access-Request Id 77 from 0.0.0.0:36327 to 127.0.0.1:12340 length 220 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-noalgo" Test-Number = 1 Sent Access-Request Id 77 from 0.0.0.0:36327 to 127.0.0.1:12340 length 220 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-noalgo" Test-Number = 1 Sent Access-Request Id 77 from 0.0.0.0:36327 to 127.0.0.1:12340 length 220 User-Name = "bob" Digest-Response = "89eb0059246c02b2f6ee02c7961d5ea3" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-auth-noalgo" Test-Number = 1 digest-md5-sess_1 : FAILED Sent Access-Request Id 206 from 0.0.0.0:40586 to 127.0.0.1:12340 length 229 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x060a4d44352d73657373 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-md5-sess" Test-Number = 1 Sent Access-Request Id 206 from 0.0.0.0:40586 to 127.0.0.1:12340 length 229 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x060a4d44352d73657373 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-md5-sess" Test-Number = 1 Sent Access-Request Id 206 from 0.0.0.0:40586 to 127.0.0.1:12340 length 229 User-Name = "bob" Digest-Response = "e4e4ea61d186d07a92c9e1f6919902e9" Digest-Attributes = 0x010c62696c6f78692e636f6d Digest-Attributes = 0x022464636439386237313032646432663065386231316430663630306266623063303933 Digest-Attributes = 0x0308494e56495445 Digest-Attributes = 0x04147369703a626f624062696c6f78692e636f6d Digest-Attributes = 0x060a4d44352d73657373 Digest-Attributes = 0x0a05626f62 Digest-Attributes = 0x050661757468 Digest-Attributes = 0x090a3030303030303031 Digest-Attributes = 0x080a3061346631313362 Test-Name = "digest-md5-sess" Test-Number = 1 test.example.com_1 : FAILED Sent Access-Request Id 48 from 0.0.0.0:46169 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" Sent Access-Request Id 48 from 0.0.0.0:46169 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" Sent Access-Request Id 48 from 0.0.0.0:46169 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" See radclient.log for more details *logs of radclient.log* Sent Access-Request Id 48 from 0.0.0.0:46169 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" Sent Access-Request Id 48 from 0.0.0.0:46169 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bob" Sent Access-Request Id 48 from 0.0.0.0:46169 to 127.0.0.1:12340 length 96 User-Name = "bob@test.example.com" User-Password = "bob" Test-Name = "test.example.com" Test-Number = 1 Cleartext-Password = "bo *b"* *Regards,* *Shivaprasad* On Sun, Oct 7, 2018 at 2:02 AM Alan DeKok <aland@deployingradius.com> wrote:
On Oct 6, 2018, at 3:46 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
Yes Even simple make tests command is failing, I have not changed anything in exiting test modules
Then you changed raddb/radiusd.conf, or something else in raddb.
The tests assume a default configuration. If you break the configuration, then the tests won't pass.
just wanted to understand the how exiting test suite works so that I can add the testcases in similar way.
The test suite is fairly simple. There's some magic in the Makefiles, but you can largely ignore that.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Oct 8, 2018, at 11:04 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
Since You mentioned there may be some configuration change in my set up I download fresh code(freeradius-server-3.0.17.tar.gz) and retried the setup here is steps I am invoking.
1.Configure (./configure --prefix=/usr/local/freeradius-server-3.0.17) 2.make 3. sudo make Install 4. sudo /usr/local/afreeradius/sbin/radiusd -X (I got the SSL error here I fixed it by allowing ssl # allow_vulnerable_openssl = no allow_vulnerable_openssl = 'CVE-2016-6304' ) **this is the only change I have done to fix the SSL issue and to make the server up.
5. make tests (changed directory to src/tests and run the make tests command).
No. Don't do that. You run "make tests" from the top-level directory: - configure - make - make tests It's that simple. You *don't* need to install it in order to run the tests. Alan DeKok.
Hi Alan, Thanks for help I able to run default test suite. configure - make - make test (not tests) worked after some ssl fix. Now I want to add testcases to my new module can you help me, what steps or config I need to do for adding testcases tp my module. Here is my understanding - Create module in src/tests/modules (I am referring the files module). - Do I need to add entry or need config change to make them run. Regards, Shivaprasad On Mon, Oct 8, 2018 at 8:39 PM Alan DeKok <aland@deployingradius.com> wrote:
On Oct 8, 2018, at 11:04 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
Since You mentioned there may be some configuration change in my set up I download fresh code(freeradius-server-3.0.17.tar.gz) and retried the
setup
here is steps I am invoking.
1.Configure (./configure --prefix=/usr/local/freeradius-server-3.0.17) 2.make 3. sudo make Install 4. sudo /usr/local/afreeradius/sbin/radiusd -X (I got the SSL error here I fixed it by allowing ssl # allow_vulnerable_openssl = no allow_vulnerable_openssl = 'CVE-2016-6304' ) **this is the only change I have done to fix the SSL issue and to make the server up.
5. make tests (changed directory to src/tests and run the make tests command).
No. Don't do that. You run "make tests" from the top-level directory:
- configure - make - make tests
It's that simple.
You *don't* need to install it in order to run the tests.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Oct 10, 2018, at 3:05 PM, shivu prasad <shivaprasad2452@gmail.com> wrote:
Hi Alan,
Thanks for help I able to run default test suite. configure - make - make test (not tests) worked after some ssl fix.
Sure.
Now I want to add testcases to my new module can you help me, what steps or config I need to do for adding testcases tp my module. Here is my understanding
- Create module in src/tests/modules (I am referring the files module). - Do I need to add entry or need config change to make them run.
See the existing examples. src/tests/modules/always/module.conf - the configuration for your module src/tests/modules/always/*.unlang Tests to run for the modules Alan DeKok.
Hi Alan, Thanks for help, I created the test module and run it is working for authorize method but authenticate method is not calling only, I checked radiusd.conf(src/tests/modules/radiusd.conf), in authenticate only Pap is there. authenticate { pap } I try adding my module there but its throwing the error. even I try the updating the auth type after authorize like below slimier to default config in sites-enabled/default server default { authorize { # # Include the test file specified by the # KEYWORD environment variable. # $INCLUDE $ENV{MODULE_TEST_UNLANG} if (ok) { update control{ Auth-Type := idcs } } #pap } authenticate { $INCLUDE $ENV{MODULE_TEST_UNLANG} #pap } } but still it throwing the below error Debug: my_reject Tue Oct 30 17:20:44 2018 : Error: src/tests/modules//radiusd.conf[43]: Unknown Auth-Type "control" in authenticate sub-section. # build/tests/modules/always/replace.log MODULE_TEST_DIR=src/tests/modules/always/ MODULE_TEST_UNLANG=src/tests/modules/always/replace.unlang FR_LIBRARY_PATH=./build/lib/.libs build/make/jlibtool --quiet --mode=execute ./build/bin/local/unittest -D share -d src/tests/modules/ -i build/tests/modules/always/replace.attrs -f build/tests/modules/always/replace.attrs -xx make: *** [build/tests/modules/always/replace] Error 1 any input to how to resolve and add test-case to authenticate method. Regards, Shivaprasad On Thu, Oct 11, 2018 at 1:05 AM Alan DeKok <aland@deployingradius.com> wrote:
On Oct 10, 2018, at 3:05 PM, shivu prasad <shivaprasad2452@gmail.com> wrote:
Hi Alan,
Thanks for help I able to run default test suite. configure - make - make test (not tests) worked after some ssl fix.
Sure.
Now I want to add testcases to my new module can you help me, what steps or config I need to do for adding testcases tp my module. Here is my understanding
- Create module in src/tests/modules (I am referring the files module). - Do I need to add entry or need config change to make them run.
See the existing examples.
src/tests/modules/always/module.conf
- the configuration for your module
src/tests/modules/always/*.unlang
Tests to run for the modules
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Oct 30, 2018, at 8:09 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
I created the test module and run it is working for authorize method but authenticate method is not calling only,
The automated module tests are not intended to test different kinds of authentication. You can write your own tests for your module. Alan DeKok.
Hi Alan, I saw in the test modules *ldap *module but its not enabled currently, the auth schema we use is similar to ldap, If ldap can test the their authentication module using existing test framework. then we can also test it, can you point me how to enable the ldap testcase . Regards, Shivaprasad On Tue, Oct 30, 2018 at 6:59 PM Alan DeKok <aland@deployingradius.com> wrote:
On Oct 30, 2018, at 8:09 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
I created the test module and run it is working for authorize method but authenticate method is not calling only,
The automated module tests are not intended to test different kinds of authentication.
You can write your own tests for your module.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Nov 13, 2018, at 5:25 AM, shivu prasad <shivaprasad2452@gmail.com> wrote:
I saw in the test modules *ldap *module but its not enabled currently, the auth schema we use is similar to ldap, If ldap can test the their authentication module using existing test framework. then we can also test it, can you point me how to enable the ldap testcase .
All of the tests are documented in the config files && comments. There is no documentation describing how the tests work. Alan DeKok.
participants (2)
-
Alan DeKok -
shivu prasad