Skip to content

Feat/ldax control block#38

Open
varunchennamadhava wants to merge 2 commits into
devfrom
feat/ldax-control-block
Open

Feat/ldax control block#38
varunchennamadhava wants to merge 2 commits into
devfrom
feat/ldax-control-block

Conversation

@varunchennamadhava

@varunchennamadhava varunchennamadhava commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

💡 Issue Reference

#27 LDAX

💻 What does this address?

LDAX control block information

📟 Implementation Details

Control Block addition using documentation and shipped out header files.

📋 Is there a test case?

Test cases were included in test case suite and checked manually.

@varunchennamadhava varunchennamadhava changed the base branch from main to dev June 1, 2026 14:14
@varunchennamadhava varunchennamadhava marked this pull request as draft June 1, 2026 14:14
@varunchennamadhava varunchennamadhava force-pushed the feat/ldax-control-block branch from f28fc18 to 0724056 Compare June 1, 2026 15:33
Signed-off-by: varunchennamadhava <varunchennamadhava@gmail.com>
@varunchennamadhava varunchennamadhava force-pushed the feat/ldax-control-block branch from 0724056 to 84eba63 Compare June 1, 2026 15:36
Signed-off-by: varunchennamadhava <varunchennamadhava@gmail.com>
@varunchennamadhava varunchennamadhava marked this pull request as ready for review June 1, 2026 15:50
@lcarcaramo lcarcaramo self-requested a review June 1, 2026 16:02
assb_json["assbtasb"] = formatter_.getHex<uint32_t>(&(p_assb->assbtasb));
assb_json["assbvab"] = formatter_.getHex<uint32_t>(&(p_assb->assbvab));
assb_json["assbldax"] = formatter_.getHex<uint32_t>(&(p_assb->assbldax));
// assb_json["assbldax"] = formatter_.getHex<uint64_t>(&(p_assb->assbldax));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment.

formatter_.uint<uint64_t>(p_assb->assbldax));
assb_json["assbldax"] =
CBXP::LDAX(cbxp_options)
.get(const_cast<void*>(reinterpret_cast<const void*>(p_ldax)));

@lcarcaramo lcarcaramo Jun 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should be able to do this in one line of code like for the include processing code for other control blocks, no?

ascb_json["ascbassb"] = CBXP::ASSB(cbxp_options).get(p_ascb->ascbassb);

// ldax_json["ldax_obtainshomespace"] =
// formatter_.getString(p_ldax->ldax_obtainshomespace, 8);
// ldax_json["ldax_obtainshomespacechar"] =
// formatter_.getString(p_ldax->ldax_obtainshomespacechar, 8);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be commented out? All fields are programming interfaces except for LDAX_GetmainsHomeSpace.

https://www.ibm.com/docs/en/zos/3.2.0?topic=isg-ihaldax-information

Comment thread tests/test.py
for entry in cbdata:
self.assertIs(type(entry), dict)

def test_cbxp_can_extract_ldax(self):

@lcarcaramo lcarcaramo Jun 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to new naming convention to differentiate extract and format tests.

  • test_cbxp_extract_ for extract tests.
  • test_cbxp_format_ for format tests.

Comment thread tests/test.py
self.assertIs(type(cbdata), dict)
self.assertIs(type(cbdata["flccvt"]), dict)
self.assertIs(type(cbdata["flccvt"]["cvtasvt"]), dict)
self.assertIs(type(cbdata["flccvt"]["cvtasvt"]["asvtenty"]), list)

@lcarcaramo lcarcaramo Jun 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add asserts for ascb, assb, and ldax?

Comment thread tests/test.sh
run_with_expected_exit_code 0 ./dist/cbxp extract -f "ascb.assb.ldax.ldax_ldasiza=11505664" -i ascb.assb.ldax asvt
run_with_expected_exit_code 0 ./dist/cbxp extract -f "cvt.asvt.ascb.assb.ldax.ldax_tcthwm=348160" -i cvt.asvt.ascb.assb.ldax psa
run_with_expected_exit_code 0 ./dist/cbxp extract -f "ldax_tcthwm=348160" ldax
run_with_expected_null_response ./dist/cbxp extract -f "cvt.asvt.ascb.assb.ldax.ldax_id=INVALID" -i cvt.asvt.ascb.assb.ldax psa

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that testing with the values you are using for ldax_ldasiza and ldax_tcthwm may not always result in a filter being matched as the values may not be present in any LDAX control blocks on any given system at any given time. I guess this is good enough for testing that the filters are accepted though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But for the Python tests, this will likely cause your tests to fail...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the Python tests will still pass because the test cases check to see if anything matched the filter, but consider using more reliable filters for these tests.

@ElijahSwiftIBM ElijahSwiftIBM self-requested a review June 1, 2026 18:36
Comment on lines +87 to +132
ldax_json["ldax_header"] = formatter_.getString(p_ldax->ldax_header, 8);
ldax_json["ldax_id"] = formatter_.getString(p_ldax->ldax_id, 4);
ldax_json["ldax_version"] =
formatter_.getBitmap<uint8_t>(p_ldax->ldax_version);
ldax_json["ldax_ldaascb"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldaascb));
ldax_json["ldax_ldastrta"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldastrta));
ldax_json["ldax_ldasiza"] = p_ldax->ldax_ldasiza;
ldax_json["ldax_ldaestra"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldaestra));
ldax_json["ldax_ldaesiza"] = p_ldax->ldax_ldaesiza;
ldax_json["ldax_ldacrgtp"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldacrgtp));
ldax_json["ldax_ldaergtp"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldaergtp));
ldax_json["ldax_ldalimit"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldalimit));
ldax_json["ldax_ldavvrg"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldavvrg));
ldax_json["ldax_ldaelim"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldaelim));
ldax_json["ldax_ldaevvrg"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldaevvrg));
ldax_json["ldax_ldaloal"] =
formatter_.getBitmap<uint32_t>(p_ldax->ldax_ldaloal);
ldax_json["ldax_ldahial"] =
formatter_.getBitmap<uint32_t>(p_ldax->ldax_ldahial);
ldax_json["ldax_ldaeloal"] =
formatter_.getBitmap<uint32_t>(p_ldax->ldax_ldaeloal);
ldax_json["ldax_ldaehial"] =
formatter_.getBitmap<uint32_t>(p_ldax->ldax_ldaehial);
// ldax_json["ldax_tctvalus"] = formatter_.getString(p_ldax->ldax_tctvalus,
// 16);
ldax_json["ldax_tcthwm"] = p_ldax->ldax_tcthwm;
ldax_json["ldax_tctlwm"] = p_ldax->ldax_tctlwm;
ldax_json["ldax_tctehwm"] = p_ldax->ldax_tctehwm;
ldax_json["ldax_tctelwm"] = p_ldax->ldax_tctelwm;
ldax_json["ldax_curhighbot"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_curhighbot));
ldax_json["ldax_curehighbot"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_curehighbot));
ldax_json["ldax_ldasmad"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldasmad));
ldax_json["ldax_ldasmsz"] =
formatter_.getHex<uint32_t>(&(p_ldax->ldax_ldasmsz));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lcarcaramo can disagree with me, but even though this is how the fields are named in the header file, I think we should remove the ldax_ from these json keys for consistency with the other control blocks we have implemented.

@lcarcaramo lcarcaramo Jun 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is consistent with the field names being used for the assb control block, so I think this is good, no?

assb_json["assb_cms_lockinst_addr"] =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants