Skip to content

[#607] New v70004/sub_level_map_hide-gtmde270421 subtest to verify that subscript-level mapping does not hide data

Release note (http://tinco.pair.com/bhaskar/gtm/doc/articles/GTM_V7.0-004_Release_Notes.html#GTM-DE270421) says:

GT.M handles $ORDER(), $ZPREVIOUS(), $QUERY(), $NEXT(), and MERGE operations which traverse subscript-level mappings correctly. Previously, these operations could return gvns which should have been excluded by the global directory. In the case of MERGE, the target could contain data from excluded subtrees. (GTM-DE270421)

The tests create 2 glds, one with one region, anther one with two regions and subscript-level mapping. The M program generates some data for mixed glds, then iterates over all nodes, using different iterator instructions, listed in Release Notes. This test prints the test database, and some meta values:

  • enumerated: number of nodes enumerated by the tested command (under certain circumstances, some nodes may be skipped),
  • has_value: enumerated nodes with valid values (under some circustances, some enumerated nodes report UNDEF error),
  • total_count: the number of data items set (constant value).

The second part of the test runs the MERGE command, it copies the values from the test global to a target one, which has no mappings set.

Both part of the tests executed two times. The first round is using 1reg.gld for generating data and 2reg.gld for walk tests. This is the scenario, which previous versions failed, so it needs testing.

The second round is using 2reg.gld for both data generation and walk tests. This setup has never failed, so it's unnecessary to test it, but it's a good explanation of how mapping tests works.

Edited by Erno Zalka

Merge request reports