Bug 40144 - `sip_cli_emulator.pl` warnings
Summary: `sip_cli_emulator.pl` warnings
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Marcel de Rooy
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2025-06-13 18:17 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-06-24 21:27 UTC (History)
5 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40144: Get rid of `sip_cli_emulator.pl` warnings (942 bytes, patch)
2025-06-13 18:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 40144: Get rid of `sip_cli_emulator.pl` warnings (988 bytes, patch)
2025-06-14 05:09 UTC, David Nind
Details | Diff | Splinter Review
Bug 40144: Get rid of `sip_cli_emulator.pl` warnings (1.06 KB, patch)
2025-06-24 14:24 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2025-06-13 18:17:04 UTC
Whiel debugging tests for 39911 I noticed a couple warnings that are useless (i.e. poor data handling instead of a feature alerting something).

The first patch on bug 39911 adds an explicit `die` to emulate a a crash. When running the `sip_cliemulator.pl` script some warnings showed up:

```shell
$ ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su tcohen -sp tomasito -l MPL --patron tcohen -m patron_information
Attempting socket connection to 127.0.0.1:6001...connected!
Use of uninitialized value $hold_mode in string eq at ./misc/sip_cli_emulator.pl line 127.
SEND: 9300CNtcohen|COtomasito|CPMPL|
Use of uninitialized value $data in concatenation (.) or string at ./misc/sip_cli_emulator.pl line 359.
READ:
Use of uninitialized value $data in pattern match (m//) at ./misc/sip_cli_emulator.pl line 311.
Login Failed!
```
Comment 1 Tomás Cohen Arazi (tcohen) 2025-06-13 18:34:21 UTC
Created attachment 183248 [details] [review]
Bug 40144: Get rid of `sip_cli_emulator.pl` warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 David Nind 2025-06-14 05:09:17 UTC
Created attachment 183253 [details] [review]
Bug 40144: Get rid of `sip_cli_emulator.pl` warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-06-14 05:13:17 UTC
Testing notes (using KTD):
1. Run ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su tcohen -sp tomasito -l MPL --patron tcohen -m patron_information
2. Notice the "Use of unitialized value in...." in the output:
     Attempting socket connection to 127.0.0.1:6001...connected!
     Use of uninitialized value $hold_mode in string eq at ./misc/
       sip_cli_emulator.pl line 127.
     SEND: 9300CNtcohen|COtomasito|CPMPL|
     READ: 940

     Login Failed!
3. Apply the patch.
4. Repeat step 1.
5. Notice that there is now no "Use of unitialized value in...." in the output:
     Attempting socket connection to 127.0.0.1:6001...connected!
     SEND: 9300CNtcohen|COtomasito|CPMPL|
     READ: 940

     Login Failed!
Comment 4 Marcel de Rooy 2025-06-24 14:24:29 UTC
Created attachment 183462 [details] [review]
Bug 40144: Get rid of `sip_cli_emulator.pl` warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Lucas Gass (lukeg) 2025-06-24 21:26:56 UTC
Nice work everyone!

Pushed to main for 25.11