diff mbox series

[2/4] tpmevlog/tpmevlogdump: remove debug messages

Message ID 20210617201153.67045-2-alex.hung@canonical.com
State Rejected
Headers show
Series [1/4] tpmevlog: add to batch tests | expand

Commit Message

Alex Hung June 17, 2021, 8:11 p.m. UTC
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/tpm/tpmevlog/tpmevlog.c         | 3 ---
 src/tpm/tpmevlogdump/tpmevlogdump.c | 3 ---
 2 files changed, 6 deletions(-)

Comments

Colin Ian King June 18, 2021, 10:07 p.m. UTC | #1
On 17/06/2021 21:11, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/tpm/tpmevlog/tpmevlog.c         | 3 ---
>  src/tpm/tpmevlogdump/tpmevlogdump.c | 3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c
> index 95406663..00380638 100644
> --- a/src/tpm/tpmevlog/tpmevlog.c
> +++ b/src/tpm/tpmevlog/tpmevlog.c
> @@ -446,9 +446,6 @@ static int tpmevlog_test1(fwts_framework *fw)
>  			int fd;
>  			size_t length;
>  
> -			fwts_log_nl(fw);
> -			fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
> -
>  			snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name);
>  
>  			if ((fd = open(path, O_RDONLY)) >= 0) {
> diff --git a/src/tpm/tpmevlogdump/tpmevlogdump.c b/src/tpm/tpmevlogdump/tpmevlogdump.c
> index a569d29b..d6ade05e 100644
> --- a/src/tpm/tpmevlogdump/tpmevlogdump.c
> +++ b/src/tpm/tpmevlogdump/tpmevlogdump.c
> @@ -485,9 +485,6 @@ static int tpmevlogdump_test1(fwts_framework *fw)
>  			int fd;
>  			size_t length;
>  
> -			fwts_log_nl(fw);
> -			fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
> -
>  			snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name);
>  
>  			if ((fd = open(path, O_RDONLY)) >= 0) {
> 


Acked-by: Colin Ian King <colin.king@canonical.com>
ivanhu June 21, 2021, 2:32 a.m. UTC | #2
On 6/18/21 4:11 AM, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/tpm/tpmevlog/tpmevlog.c         | 3 ---
>  src/tpm/tpmevlogdump/tpmevlogdump.c | 3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c
> index 95406663..00380638 100644
> --- a/src/tpm/tpmevlog/tpmevlog.c
> +++ b/src/tpm/tpmevlog/tpmevlog.c
> @@ -446,9 +446,6 @@ static int tpmevlog_test1(fwts_framework *fw)
>  			int fd;
>  			size_t length;
>  
> -			fwts_log_nl(fw);
> -			fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
> -
>  			snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name);
>  
>  			if ((fd = open(path, O_RDONLY)) >= 0) {
> diff --git a/src/tpm/tpmevlogdump/tpmevlogdump.c b/src/tpm/tpmevlogdump/tpmevlogdump.c
> index a569d29b..d6ade05e 100644
> --- a/src/tpm/tpmevlogdump/tpmevlogdump.c
> +++ b/src/tpm/tpmevlogdump/tpmevlogdump.c
> @@ -485,9 +485,6 @@ static int tpmevlogdump_test1(fwts_framework *fw)
>  			int fd;
>  			size_t length;
>  
> -			fwts_log_nl(fw);
> -			fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
> -
>  			snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name);
>  
>  			if ((fd = open(path, O_RDONLY)) >= 0) {
> 

This is not debug message, this tells the TPM eventlog comes from which
tpm device, I think we should keep this for those may have multi-TPM
chipsets platforms in the future.

Ivan
Alex Hung June 21, 2021, 4:08 a.m. UTC | #3
On Sun, Jun 20, 2021 at 8:32 PM ivanhu <ivan.hu@canonical.com> wrote:

>
>
> On 6/18/21 4:11 AM, Alex Hung wrote:
> > Signed-off-by: Alex Hung <alex.hung@canonical.com>
> > ---
> >  src/tpm/tpmevlog/tpmevlog.c         | 3 ---
> >  src/tpm/tpmevlogdump/tpmevlogdump.c | 3 ---
> >  2 files changed, 6 deletions(-)
> >
> > diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c
> > index 95406663..00380638 100644
> > --- a/src/tpm/tpmevlog/tpmevlog.c
> > +++ b/src/tpm/tpmevlog/tpmevlog.c
> > @@ -446,9 +446,6 @@ static int tpmevlog_test1(fwts_framework *fw)
> >                       int fd;
> >                       size_t length;
> >
> > -                     fwts_log_nl(fw);
> > -                     fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
> > -
> >                       snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH
> "/%s/binary_bios_measurements", tpmdir->d_name);
> >
> >                       if ((fd = open(path, O_RDONLY)) >= 0) {
> > diff --git a/src/tpm/tpmevlogdump/tpmevlogdump.c
> b/src/tpm/tpmevlogdump/tpmevlogdump.c
> > index a569d29b..d6ade05e 100644
> > --- a/src/tpm/tpmevlogdump/tpmevlogdump.c
> > +++ b/src/tpm/tpmevlogdump/tpmevlogdump.c
> > @@ -485,9 +485,6 @@ static int tpmevlogdump_test1(fwts_framework *fw)
> >                       int fd;
> >                       size_t length;
> >
> > -                     fwts_log_nl(fw);
> > -                     fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
> > -
> >                       snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH
> "/%s/binary_bios_measurements", tpmdir->d_name);
> >
> >                       if ((fd = open(path, O_RDONLY)) >= 0) {
> >
>
> This is not debug message, this tells the TPM eventlog comes from which
> tpm device, I think we should keep this for those may have multi-TPM
> chipsets platforms in the future.
>
> Ivan
>

Thanks for clarifications. Maybe I can re-work it for a pretty format
later.
diff mbox series

Patch

diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c
index 95406663..00380638 100644
--- a/src/tpm/tpmevlog/tpmevlog.c
+++ b/src/tpm/tpmevlog/tpmevlog.c
@@ -446,9 +446,6 @@  static int tpmevlog_test1(fwts_framework *fw)
 			int fd;
 			size_t length;
 
-			fwts_log_nl(fw);
-			fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
-
 			snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name);
 
 			if ((fd = open(path, O_RDONLY)) >= 0) {
diff --git a/src/tpm/tpmevlogdump/tpmevlogdump.c b/src/tpm/tpmevlogdump/tpmevlogdump.c
index a569d29b..d6ade05e 100644
--- a/src/tpm/tpmevlogdump/tpmevlogdump.c
+++ b/src/tpm/tpmevlogdump/tpmevlogdump.c
@@ -485,9 +485,6 @@  static int tpmevlogdump_test1(fwts_framework *fw)
 			int fd;
 			size_t length;
 
-			fwts_log_nl(fw);
-			fwts_log_info_verbatim(fw, "%s", tpmdir->d_name);
-
 			snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name);
 
 			if ((fd = open(path, O_RDONLY)) >= 0) {