@@ -310,9 +310,9 @@ def test_tcb_version_tables(network, args):
310
310
new_node = network .create_node ("local://localhost" )
311
311
network .join_node (new_node , args .package , args , timeout = 3 )
312
312
network .trust_node (new_node , args )
313
- except Exception as e :
313
+ except TimeoutError as e :
314
314
thrown_exception = e
315
- assert thrown_exception is None , "New node should not have been able to join"
315
+ assert thrown_exception is not None , "New node should not have been able to join"
316
316
317
317
LOG .info ("Adding new cpuid's TCB version" )
318
318
network .consortium .add_snp_tcb_version (primary , cpuid , tcb_version )
@@ -778,43 +778,43 @@ def run(args):
778
778
) as network :
779
779
network .start_and_open (args )
780
780
781
- # test_verify_quotes(network, args)
782
- #
783
- # # Measurements
784
- # test_measurements_tables(network, args)
785
- # if not snp.IS_SNP:
786
- # test_add_node_with_untrusted_measurement(network, args)
787
- #
788
- # # Host data/security policy
789
- # test_host_data_tables(network, args)
790
- # test_add_node_with_untrusted_host_data(network, args)
791
- #
781
+ test_verify_quotes (network , args )
782
+
783
+ # Measurements
784
+ test_measurements_tables (network , args )
785
+ if not snp .IS_SNP :
786
+ test_add_node_with_untrusted_measurement (network , args )
787
+
788
+ # Host data/security policy
789
+ test_host_data_tables (network , args )
790
+ test_add_node_with_untrusted_host_data (network , args )
791
+
792
792
if snp .IS_SNP :
793
- # # Virtual has no security policy, _only_ host data (unassociated with anything)
794
- # test_add_node_with_stubbed_security_policy(network, args)
795
- # test_start_node_with_mismatched_host_data(network, args)
796
- # test_add_node_without_security_policy(network, args)
793
+ # Virtual has no security policy, _only_ host data (unassociated with anything)
794
+ test_add_node_with_stubbed_security_policy (network , args )
795
+ test_start_node_with_mismatched_host_data (network , args )
796
+ test_add_node_without_security_policy (network , args )
797
797
test_tcb_version_tables (network , args )
798
- #
799
- # # Endorsements
800
- # test_endorsements_tables(network, args)
801
- # test_add_node_with_no_uvm_endorsements(network, args)
802
- #
803
- # if not snp.IS_SNP:
804
- # # NB: Assumes the current nodes are still using args.package, so must run before test_update_all_nodes
805
- # test_proposal_invalidation(network, args)
806
- #
807
- # # This is in practice equivalent to either "unknown measurement" or "unknown host data", but is explicitly
808
- # # testing that (without artifically removing/corrupting those values) a replacement package differs
809
- # # in one of these values
810
- # test_add_node_with_different_package(network, args)
811
- # test_update_all_nodes(network, args)
812
- #
813
- # # Run again at the end to confirm current nodes are acceptable
814
- # test_verify_quotes(network, args)
815
- #
816
- # if snp.IS_SNP:
817
- # test_add_node_with_no_uvm_endorsements_in_kv(network, args)
798
+
799
+ # Endorsements
800
+ test_endorsements_tables (network , args )
801
+ test_add_node_with_no_uvm_endorsements (network , args )
802
+
803
+ if not snp .IS_SNP :
804
+ # NB: Assumes the current nodes are still using args.package, so must run before test_update_all_nodes
805
+ test_proposal_invalidation (network , args )
806
+
807
+ # This is in practice equivalent to either "unknown measurement" or "unknown host data", but is explicitly
808
+ # testing that (without artifically removing/corrupting those values) a replacement package differs
809
+ # in one of these values
810
+ test_add_node_with_different_package (network , args )
811
+ test_update_all_nodes (network , args )
812
+
813
+ # Run again at the end to confirm current nodes are acceptable
814
+ test_verify_quotes (network , args )
815
+
816
+ if snp .IS_SNP :
817
+ test_add_node_with_no_uvm_endorsements_in_kv (network , args )
818
818
819
819
820
820
if __name__ == "__main__" :
0 commit comments