* Fixed systemd-sonic-generator for multi-asic 1. In function insert_instance_number instance_string was malloced for 2 char size which was limiting the instance number value in instance_name to 1 digit. Fixed insert_instance_number to use asprintf to generate instancd_name for any number of instances. Added _GNU_SOURCE to CFLAGS for asprintf. 2. Fixed get_unit_files() to use calloc instead of malloc. Uninitialized memory was causing incorrect string mismatch error while comparing unit file name string. 3. Increased MAX_NUM_TARGETS and MAX_NUM_INSTALL_LINES values to 48 to handle more asic instances. 4. Added build UT support for systemd-sonic-generator: a. Refactor systemd-sonic-generator.c to be used with UT infra. b. Added UT infra to run build UT for systemd-sonic-generator c. Added functional level and program level UT class and test cases. * Resolved review comments. 1. Explicitly setting global pointers to NULL in definitions. 2. Added a space before ": public" in class definitions to align style with SONiC C++ files. * Merged strtok_r statements in single command. Signed-off-by: Anand Mehra <anamehra@cisco.com>
14 lines
242 B
Desktop File
14 lines
242 B
Desktop File
[Unit]
|
|
Description=Multi instance b Test service
|
|
|
|
Requires=multi_inst_a.service
|
|
StartLimitIntervalSec=1200
|
|
StartLimitBurst=3
|
|
[Service]
|
|
User=root
|
|
ExecStop=/usr/bin/test.sh stop
|
|
Restart=always
|
|
RestartSec=30
|
|
[Install]
|
|
WantedBy=multi-user.target
|