* [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own
@ 2024-02-14 19:30 James Prestwood
2024-02-14 19:30 ` [PATCH 2/2] auto-t: timestamp log files in test-runner James Prestwood
2024-02-22 15:30 ` [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own Denis Kenzior
0 siblings, 2 replies; 3+ messages in thread
From: James Prestwood @ 2024-02-14 19:30 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
When running this test with others the hostapd neighbors are already
grouped which lets the test pass. On its own this does not happen
and it fails.
---
autotests/testPSK-roam/failed_roam_test.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/autotests/testPSK-roam/failed_roam_test.py b/autotests/testPSK-roam/failed_roam_test.py
index 12e439f6..8cce8bb5 100644
--- a/autotests/testPSK-roam/failed_roam_test.py
+++ b/autotests/testPSK-roam/failed_roam_test.py
@@ -221,6 +221,8 @@ class Test(unittest.TestCase):
cls.rule_bss2 = hwsim.rules.create()
cls.rule_bss2.source = hwsim.get_radio('rad2').addresses[0]
+ HostapdCLI.group_neighbors(*cls.bss_hostapd)
+
@classmethod
def tearDownClass(cls):
IWD.clear_storage()
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] auto-t: timestamp log files in test-runner
2024-02-14 19:30 [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own James Prestwood
@ 2024-02-14 19:30 ` James Prestwood
2024-02-22 15:30 ` [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own Denis Kenzior
1 sibling, 0 replies; 3+ messages in thread
From: James Prestwood @ 2024-02-14 19:30 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
The log files become much more useful when there are timestamps
associated with each log.
---
tools/utils.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/utils.py b/tools/utils.py
index 8219542e..5984fc69 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -6,6 +6,7 @@ import traceback
import shutil
import dbus
+from datetime import datetime
from gi.repository import GLib
from weakref import WeakValueDictionary
from re import fullmatch
@@ -125,7 +126,11 @@ class Process(subprocess.Popen):
@staticmethod
def _write_io(instance, data, stdout=True):
for f in instance.write_fds:
- f.write(data)
+ for c in data:
+ f.write(c)
+ if c == '\n':
+ stamp = datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M:%S.%f")
+ f.write(stamp + ': ')
# Write out a separator so multiple process calls per
# test are easer to read.
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own
2024-02-14 19:30 [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own James Prestwood
2024-02-14 19:30 ` [PATCH 2/2] auto-t: timestamp log files in test-runner James Prestwood
@ 2024-02-22 15:30 ` Denis Kenzior
1 sibling, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2024-02-22 15:30 UTC (permalink / raw)
To: James Prestwood, iwd
Hi James,
On 2/14/24 13:30, James Prestwood wrote:
> When running this test with others the hostapd neighbors are already
> grouped which lets the test pass. On its own this does not happen
> and it fails.
> ---
> autotests/testPSK-roam/failed_roam_test.py | 2 ++
> 1 file changed, 2 insertions(+)
>
Both applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-22 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 19:30 [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own James Prestwood
2024-02-14 19:30 ` [PATCH 2/2] auto-t: timestamp log files in test-runner James Prestwood
2024-02-22 15:30 ` [PATCH 1/2] auto-t: fix failed_roam_test to pass when run on its own Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox