From a880ff1e154e419a3a4bb35287a7bb208850fbf1 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Tue, 8 Aug 2023 13:38:56 -0700 Subject: [PATCH] tests: Updated directory structure -Changed copyright message to reflect correct year. - Updated directory structure. - Changed directory name to snake case. - Added a README.md for checkpoint tests. Change-Id: Id350addb9cce6740a20a5a45171f80306b711efa --- tests/gem5/checkpoint_tests/README.md | 11 ++++++ .../configs}/arm-hello-restore-checkpoint.py | 2 +- .../configs}/arm-hello-save-checkpoint.py | 2 +- .../configs}/mips-hello-restore-checkpoint.py | 2 +- .../configs}/mips-hello-save-checkpoint.py | 2 +- .../power-hello-restore-checkpoint.py | 2 +- .../configs}/power-hello-save-checkpoint.py | 2 +- .../sparc-hello-restore-checkpoint.py | 2 +- .../configs}/sparc-hello-save-checkpoint.py | 2 +- .../configs}/x86-fs-restore-checkpoint.py | 2 +- .../configs}/x86-fs-save-checkpoint.py | 2 +- .../configs}/x86-hello-restore-checkpoint.py | 2 +- .../configs}/x86-hello-save-checkpoint.py | 2 +- .../test-checkpoints.py | 38 ++++++++++++------- 14 files changed, 48 insertions(+), 25 deletions(-) create mode 100644 tests/gem5/checkpoint_tests/README.md rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/arm-hello-restore-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/arm-hello-save-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/mips-hello-restore-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/mips-hello-save-checkpoint.py (98%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/power-hello-restore-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/power-hello-save-checkpoint.py (98%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/sparc-hello-restore-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/sparc-hello-save-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/x86-fs-restore-checkpoint.py (98%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/x86-fs-save-checkpoint.py (98%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/x86-hello-restore-checkpoint.py (97%) rename tests/gem5/{checkpoint-tests => checkpoint_tests/configs}/x86-hello-save-checkpoint.py (98%) rename tests/gem5/{checkpoint-tests => checkpoint_tests}/test-checkpoints.py (92%) diff --git a/tests/gem5/checkpoint_tests/README.md b/tests/gem5/checkpoint_tests/README.md new file mode 100644 index 0000000000..64767169ba --- /dev/null +++ b/tests/gem5/checkpoint_tests/README.md @@ -0,0 +1,11 @@ +# Checkpoint tests + +These tests run hello world binary for arm, x86, and power isa and ubuntuboot workload for x86 isa using checkpoints. +Each binary is run in two parts: +- Save checkpoint: A binary is run for a set amount of ticks and then a checkpoint is taken. This test checks if the checkpoint is taken. + +- Resotre checkpoint: The same binary and board in the respective save test are used with the saved checkpoint (the checkpoint is uploaded to gem5 resources). This test checks if the binary ran properly. + +```bash +./main.py run gem5/checkpoint_tests/ +``` diff --git a/tests/gem5/checkpoint-tests/arm-hello-restore-checkpoint.py b/tests/gem5/checkpoint_tests/configs/arm-hello-restore-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/arm-hello-restore-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/arm-hello-restore-checkpoint.py index 2076c8965e..0ce9a7606a 100644 --- a/tests/gem5/checkpoint-tests/arm-hello-restore-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/arm-hello-restore-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/arm-hello-save-checkpoint.py b/tests/gem5/checkpoint_tests/configs/arm-hello-save-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/arm-hello-save-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/arm-hello-save-checkpoint.py index d0ebf7afe0..a731b38a58 100644 --- a/tests/gem5/checkpoint-tests/arm-hello-save-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/arm-hello-save-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/mips-hello-restore-checkpoint.py b/tests/gem5/checkpoint_tests/configs/mips-hello-restore-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/mips-hello-restore-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/mips-hello-restore-checkpoint.py index 5e42f4d9b6..167c026f04 100644 --- a/tests/gem5/checkpoint-tests/mips-hello-restore-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/mips-hello-restore-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/mips-hello-save-checkpoint.py b/tests/gem5/checkpoint_tests/configs/mips-hello-save-checkpoint.py similarity index 98% rename from tests/gem5/checkpoint-tests/mips-hello-save-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/mips-hello-save-checkpoint.py index 271d900304..afcf237818 100644 --- a/tests/gem5/checkpoint-tests/mips-hello-save-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/mips-hello-save-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/power-hello-restore-checkpoint.py b/tests/gem5/checkpoint_tests/configs/power-hello-restore-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/power-hello-restore-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/power-hello-restore-checkpoint.py index 191cd50ec7..05479bcca7 100644 --- a/tests/gem5/checkpoint-tests/power-hello-restore-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/power-hello-restore-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/power-hello-save-checkpoint.py b/tests/gem5/checkpoint_tests/configs/power-hello-save-checkpoint.py similarity index 98% rename from tests/gem5/checkpoint-tests/power-hello-save-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/power-hello-save-checkpoint.py index 1dcd421830..6fb99a2534 100644 --- a/tests/gem5/checkpoint-tests/power-hello-save-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/power-hello-save-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/sparc-hello-restore-checkpoint.py b/tests/gem5/checkpoint_tests/configs/sparc-hello-restore-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/sparc-hello-restore-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/sparc-hello-restore-checkpoint.py index f8bc3949a5..0bc2e122cd 100644 --- a/tests/gem5/checkpoint-tests/sparc-hello-restore-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/sparc-hello-restore-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/sparc-hello-save-checkpoint.py b/tests/gem5/checkpoint_tests/configs/sparc-hello-save-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/sparc-hello-save-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/sparc-hello-save-checkpoint.py index 9c50b5cff9..2f995e5a53 100644 --- a/tests/gem5/checkpoint-tests/sparc-hello-save-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/sparc-hello-save-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/x86-fs-restore-checkpoint.py b/tests/gem5/checkpoint_tests/configs/x86-fs-restore-checkpoint.py similarity index 98% rename from tests/gem5/checkpoint-tests/x86-fs-restore-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/x86-fs-restore-checkpoint.py index f43b931135..0a3264d576 100644 --- a/tests/gem5/checkpoint-tests/x86-fs-restore-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/x86-fs-restore-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/x86-fs-save-checkpoint.py b/tests/gem5/checkpoint_tests/configs/x86-fs-save-checkpoint.py similarity index 98% rename from tests/gem5/checkpoint-tests/x86-fs-save-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/x86-fs-save-checkpoint.py index 87741235f0..891130af2b 100644 --- a/tests/gem5/checkpoint-tests/x86-fs-save-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/x86-fs-save-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/x86-hello-restore-checkpoint.py b/tests/gem5/checkpoint_tests/configs/x86-hello-restore-checkpoint.py similarity index 97% rename from tests/gem5/checkpoint-tests/x86-hello-restore-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/x86-hello-restore-checkpoint.py index 8562751708..c60675eb24 100644 --- a/tests/gem5/checkpoint-tests/x86-hello-restore-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/x86-hello-restore-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/x86-hello-save-checkpoint.py b/tests/gem5/checkpoint_tests/configs/x86-hello-save-checkpoint.py similarity index 98% rename from tests/gem5/checkpoint-tests/x86-hello-save-checkpoint.py rename to tests/gem5/checkpoint_tests/configs/x86-hello-save-checkpoint.py index 5211230af6..5611e795d4 100644 --- a/tests/gem5/checkpoint-tests/x86-hello-save-checkpoint.py +++ b/tests/gem5/checkpoint_tests/configs/x86-hello-save-checkpoint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tests/gem5/checkpoint-tests/test-checkpoints.py b/tests/gem5/checkpoint_tests/test-checkpoints.py similarity index 92% rename from tests/gem5/checkpoint-tests/test-checkpoints.py rename to tests/gem5/checkpoint_tests/test-checkpoints.py index 2edc5785c1..903a777deb 100644 --- a/tests/gem5/checkpoint-tests/test-checkpoints.py +++ b/tests/gem5/checkpoint_tests/test-checkpoints.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023 The Regents of the University of California +# Copyright (c) 2023 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -51,7 +51,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "arm-hello-save-checkpoint.py", ), config_args=[ @@ -71,7 +72,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "arm-hello-restore-checkpoint.py", ), config_args=[], @@ -88,7 +90,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "x86-hello-save-checkpoint.py", ), config_args=[ @@ -108,7 +111,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "x86-hello-restore-checkpoint.py", ), config_args=[], @@ -125,7 +129,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "x86-fs-save-checkpoint.py", ), config_args=[ @@ -145,7 +150,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "x86-fs-restore-checkpoint.py", ), config_args=[], @@ -162,7 +168,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "power-hello-save-checkpoint.py", ), config_args=[ @@ -182,7 +189,8 @@ gem5_verify_config( config.base_dir, "tests", "gem5", - "checkpoint-tests", + "checkpoint_tests", + "configs", "power-hello-restore-checkpoint.py", ), config_args=[], @@ -199,7 +207,8 @@ gem5_verify_config( # config.base_dir, # "tests", # "gem5", -# "checkpoint-tests", +# "checkpoint_tests", +# "configs", # "mips-hello-save-checkpoint.py", # ), # config_args=[ @@ -219,7 +228,8 @@ gem5_verify_config( # config.base_dir, # "tests", # "gem5", -# "checkpoint-tests", +# "checkpoint_tests", +# "configs", # "mips-hello-restore-checkpoint.py", # ), # config_args=[], @@ -236,7 +246,8 @@ gem5_verify_config( # config.base_dir, # "tests", # "gem5", -# "checkpoint-tests", +# "checkpoint_tests", +# "configs", # "sparc-hello-save-checkpoint.py", # ), # config_args=[ @@ -256,7 +267,8 @@ gem5_verify_config( # config.base_dir, # "tests", # "gem5", -# "checkpoint-tests", +# "checkpoint_tests", +# "configs", # "sparc-hello-restore-checkpoint.py", # ), # config_args=[],